-
Notifications
You must be signed in to change notification settings - Fork 950
Python: Switch to new "run" method name. #2890
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
Python: Switch to new "run" method name. #2890
Conversation
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||||||||||||
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 updates the Python durable agent infrastructure to use a new, more general run method name for entity operations, aligning with the .NET implementation for platform-agnostic tooling. The existing run_agent method is maintained for backward compatibility with older clients.
Key Changes
- Adds a new
run()method toAgentEntitythat contains the agent execution logic - Updates
run_agent()to delegate to the newrun()method (preparing for future deprecation) - Updates all entity operation calls to use "run" instead of "run_agent"
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/azurefunctions/agent_framework_azurefunctions/_entities.py |
Adds new run() method and updates run_agent() to delegate to it; updates operation dispatcher and logging |
python/packages/azurefunctions/agent_framework_azurefunctions/_orchestration.py |
Updates entity call to use "run" operation name |
python/packages/azurefunctions/agent_framework_azurefunctions/_app.py |
Updates signal_entity calls to use "run" operation and updates documentation |
python/packages/azurefunctions/tests/test_entities.py |
Updates tests to call the new run() method and adds test coverage for the new method |
python/packages/azurefunctions/tests/test_orchestration.py |
Updates test assertion to expect "run" operation name |
python/packages/azurefunctions/tests/test_app.py |
Updates tests to use "run" operation and adds new test for the operation |
python/packages/azurefunctions/tests/integration_tests/README.md |
Adds environment variable configuration for DTS emulator |
Motivation and Context
Currently, the durable agent entities use an entity method name to invoke the agent that is specific to each supported platform (e.g.
RunAgentAsyncon .NET butrun_agenton Python). This makes it difficult for external tools (such as the Durable Task Scheduler Dashboard) to interact with durable agents in a platform agnostic manner.This change updates the Python durable agent infrastructure to use a new, more general
runmethod name. The existingrun_agentmethod will still be available to accommodate older MAF clients and any pending entity signals, but considered deprecated. After a reasonable time, therun_agentmethod will be removed.Resolves (for Python) #2234. A corresponding change is being made for .NET (#2843).
Description
Adds a new
runmethod to theAgentEntitythat performs the same logic as the existingrun_agentmethod. Therun_agentmethod then just delegates to the new method (in preparation for it being removed in the future).Contribution Checklist