Fix DurableAgent workflow execution and parameter type hint warnings #263
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.
Overview
This PR addresses two issues: (1) incorrect warning messages for functions without parameters in the tool system, and (2) improper workflow execution patterns in
DurableAgentthat prevented proper agent runner integration. The changes ensureDurableAgentworkflows can be executed correctly usingAgentRunnerwhile eliminating false-positive warnings for parameterless tool functions.Key Changes
Tool System Fix
infer_func_schemaintool.py: Added condition to only warn about missing type hints when a function actually has parameters, preventing false warnings for parameterless functions.DurableAgent Workflow Improvements
@workflow_entrydecorator: Applied toagent_workflowmethod indurable.pyto properly register workflows withAgentRunnerctx.when_all()towf.when_all()for correct parallel task execution in DurableAgent workflowsQuickstart Updates
03_durable_agent.py: Refactored to useAgentRunnerpattern with proper configuration objects (AgentPubSubConfig, AgentStateConfig, etc.) and graceful shutdown handlingwf.when_all()instead ofctx.when_all()for fan-out/fan-in patterns