-
Notifications
You must be signed in to change notification settings - Fork 1k
.NET: Durable Agent samples and automated validation for non-Azure Functions #3042
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
base: main
Are you sure you want to change the base?
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
|
||
| // Create a new agent thread | ||
| AgentThread thread = agentProxy.GetNewThread(); | ||
| AgentThreadMetadata? metadata = thread.GetService<AgentThreadMetadata>(); |
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.
We removed AgentThreadMetadata in a separate PR since it wasn't really used everywhere. In this case, there is already an alternative service exposed by the DurableAgentThread, which can be used to fetch the conversation id instead of using AgentThreadMetadata:
string conversationId = thread.GetService<AgentSessionId>().ToString()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.
OK, thanks for the heads up!
Motivation and Context
Durable Agents are intended to be available both in Azure Functions and non-Azure Functions contexts. The capability already exists for .NET, but no docs or samples have been created yet.
Description
This PR adds samples showing how to implement the various durable agent scenarios as simple console apps. No Azure Functions is required. Instead, apps use the Durable Task Scheduler directly.
All Azure Functions samples have been converted into their equivalent non-Azure Functions console apps with the exception of the MCP sample, which requires features specific to Azure Functions.
Contribution Checklist