Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enables function calling capabilities for declarative workflow agents, allowing agents to either auto-execute functions when available or request function execution from the caller through a tool request/response mechanism.
- Added agent-level function invocation support with auto-execute and caller-requested modes
- Implemented new tool request/response event system for function calls
- Added comprehensive integration tests for both execution modes
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
ToolInputWorkflowTest.cs |
New integration test class validating both auto-invoke and request-invoke function execution modes |
FunctionTool.yaml |
Test workflow configuration that invokes agents with function tools multiple times |
MenuPlugin.cs |
Test plugin providing menu-related functions for integration testing |
ToolAgent.yaml |
Agent configuration defining menu-related function tools |
InvokeAzureAgentExecutor.cs |
Enhanced executor to handle function calls and tool request/response workflow |
WorkflowActionVisitor.cs |
Updated to support the new multi-step agent invocation pattern with tool handling |
WorkflowAgentProvider.cs |
Added properties for function configuration and concurrent invocation settings |
AzureAgentProvider.cs |
Enhanced to configure function invocation capabilities on chat client agents |
AgentToolRequest.cs/AgentToolResponse.cs |
New event classes for function call request/response communication |
ChatMessageExtensions.cs |
Added extension method to convert function results to chat messages |
WorkflowHarness.cs |
Updated test harness to support tool request/response scenarios and improved logging |
IntegrationTest.cs |
Modified to accept function tools for agent configuration |
AgentFactory.cs |
Added new tool agent configuration and menu plugin registration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...et/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/ToolInputWorkflowTest.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/Events/AgentToolResponse.cs
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/WorkflowAgentProvider.cs
Show resolved
Hide resolved
alliscode
approved these changes
Oct 14, 2025
TaoChenOSU
approved these changes
Oct 14, 2025
dotnet/samples/GettingStarted/Workflows/Declarative/ExecuteWorkflow/Program.cs
Show resolved
Hide resolved
ReubenBond
pushed a commit
to ReubenBond/agent-framework
that referenced
this pull request
Oct 28, 2025
…ive workflow (microsoft#1442) * Checkpoint * Checkpoint * Checkpoint * Good * Namespace * Namespace * Dun * Async Test * AgentId * Portable pattern * Portable2 * Portable3 * Respond to comments * Namespace * Function call selection * ToHashSet * ToHashSet * Updated * Parameter name * Final * Tests
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
…ive workflow (microsoft#1442) * Checkpoint * Checkpoint * Checkpoint * Good * Namespace * Namespace * Dun * Async Test * AgentId * Portable pattern * Portable2 * Portable3 * Respond to comments * Namespace * Function call selection * ToHashSet * ToHashSet * Updated * Parameter name * Final * Tests
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 and Context
Enable function calling for declarative workflows (when an agent within the workflow has a function tool).
Description
An agent that defines a function will either have that function auto-executed (if available) or else a request is made to the caller via
AgentToolRequest. The caller may then respond withAgentToolResponse.Integration tests add for both auto-execute and caller-requested modes.
Sample updated
Contribution Checklist