microsoft / microsoft/agent-framework
.NET: [Feature]: Consider passing AgentRunOptions to the underlying agents in WorkflowHostAgent.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
Description
When mapping a workflow as an agent with AsAgent(), the underlying workflow ignores the agentrunoptions.
Currently the AgentRunOptions are not passed to the underlying agents when the WorkflowHostAgent calls them. This means that any options set in AgentRunOptions or any other information that might be included (for example, if they are ChatClientAgentOptions with a ChatOptions and custom AdditionalProperties) can't be accessed.
Ideally the options would flow through InvokeStageAsync https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs#L153 and will be included in the TurnToken https://github.com/microsoft/agent-framework/blob/main/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs#L167 so that they can be accessed by the underlying agents.
Code Sample
Language/SDK
.NET
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with WorkflowHostAgent.cs at lines 123-139, then trace InvokeStageAsync in WorkflowSession.cs around line 153 and TurnToken around line 167. Follow how AgentRunOptions currently move through the workflow and identify the existing access point for underlying agents. Done means options, including additional information such as ChatOptions and custom properties, are available to those agents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100