-
Notifications
You must be signed in to change notification settings - Fork 465
.NET Workflows - Support agent level function invocation for declarative workflow #1442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Workflows - Support agent level function invocation for declarative workflow #1442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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