.NET: docs: Improve AsFunctionTool Disclaimers - #7854
Open
Mahdi Azarboon (azarboon) wants to merge 3 commits into
Open
.NET: docs: Improve AsFunctionTool Disclaimers#7854Mahdi Azarboon (azarboon) wants to merge 3 commits into
Mahdi Azarboon (azarboon) wants to merge 3 commits into
Conversation
Mahdi Azarboon (azarboon)
requested review from
SergeyMenshykh,
chetantoshniwal,
Peter Ibekwe (peibekwe),
Roger Barreto (rogerbarreto) and
westey (westey-m)
as code owners
August 25, 2026 03:46
Mahdi Azarboon (azarboon)
deployed
to
github-app-auth
August 25, 2026 03:46 — with
GitHub Actions
Active
Mahdi Azarboon (azarboon)
deployed
to
github-app-auth
August 25, 2026 03:46 — with
GitHub Actions
Active
Mahdi Azarboon (azarboon)
deployed
to
github-app-auth
August 25, 2026 03:46 — with
GitHub Actions
Active
5 tasks
Mahdi Azarboon (azarboon)
deployed
to
github-app-auth
August 25, 2026 03:48 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
Pull request overview
Clarifies when to use agents exposed as function tools and their limitations.
Changes:
- Describes function-tool composition scenarios.
- Adds determinism and human-in-the-loop guidance.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| This sample demonstrates how to use one agent as a function tool for another agent. | ||
|
|
||
| Function tools expose operations through structured inputs and outputs making them useful for many different integration scenarios. |
| Using `yourAIAgent.AsAIFunction()` exposes an agent as a function, enabling them to be used by other agents as tools allowing interesting agent composition scenarios. | ||
|
|
||
| > [!NOTE] | ||
| > Wrapping an AI Model driven agent exposed as an `AIFunction` doesn't make your agent deterministic, it will return the original agent output as the function result. The determinism of the result is completely dependent on how your agent is configured. |
|
|
||
| > [!IMPORTANT] | ||
| > Agents exposed through `.AsAIFunction()` are intended for background and non-interactive workflows, and are not suited for workflows that require human-in-the-loop approval. | ||
| > For interactive, human-in-the-loop workflows, use the [Microsoft.Agent.AI.Workflow](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/03-workflows) guidance. |
Member
|
Mahdi Azarboon (@azarboon) This PR is a simple single doc file update, no new PR was necessary for this change, the PR updates are normally triggered by us automatically and resolved by git itself.
|
Member
|
Mahdi Azarboon (@azarboon) Please address the copilot review comments I think they are valid. Thanks |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Roger Barreto (rogerbarreto)
enabled auto-merge
August 26, 2026 16:44
Roger Barreto (rogerbarreto)
deployed
to
github-app-auth
August 26, 2026 16:56 — with
GitHub Actions
Active
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation & Context
I've created this new and improved PR based on Roger Barreto (@rogerbarreto)'s recommendation in #7803. The previous PR was becoming outdated and required frequent branch updates, so I created this one instead.
The content has already been vetted and revised, so it should be ready for review and merge.
Function tools are ideal for scenarios where determinism and predictability are critical, helping users avoid potential issues. This aspect is not currently documented on GitHub or Microsoft Learn. Since this example demonstrates a Function Tool, this update addresses that gap by highlighting potential use cases and benefits of this approach. The current example is simple and may cause users to underestimate the advantages of using Function Tools.
Description & Review Guide
This update is purely documentation and introduces no code changes. It adds content clarifying the use cases and potential benefits of Function Tools to guide users effectively.
Related Issue
Fixes #
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.