Repository navigation
Description
Observed Behavior
When a WorkflowHostAgent (a workflow exposed with AsAIAgent()) is registered as the hosted agent behind MapFoundryResponses(), the Foundry Toolbox tools never reach any executor, and nothing reports it.
AgentFrameworkResponseHandler resolves the toolbox tools per request and appends them to ChatOptions.Tools, then calls the agent with new ChatClientAgentRunOptions(chatOptions) (dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/AgentFrameworkResponseHandler.cs, the block that does chatOptions.Tools = [.. chatOptions.Tools ?? [], .. toolboxResolution.Tools]).
WorkflowHostAgent.RunCoreAsync / RunCoreStreamingAsync accept AgentRunOptions? options but never read it (dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowHostAgent.cs; searching the file for ChatOptions, Tools or options usage finds only the parameter declarations). The toolbox tools are therefore dropped before the workflow starts.
Result: a workflow hosted as the top-level agent runs with no toolbox tools, even though AddFoundryToolboxes / TOOLBOX_NAME is configured and the toolbox resolved successfully. The agent answers as if the tools did not exist, with no error or warning.
Expected Behavior
One of these, documented:
- the handler or
WorkflowHostAgentmakes the per-request resolved tools available to the workflow (for example through a run-scoped service or the workflow context that executors can read), or - the host fails fast or logs a warning when toolbox tools were resolved for a request but the target agent cannot accept them.
Workaround in use
A thin DelegatingAIAgent wraps a normal ChatClientAgent. It receives the ChatClientAgentRunOptions, builds a workflow per request and hands the tools to the executors through a closure. This works, but every consumer has to rediscover that the tools are silently lost.
Reproduction
- Host
workflow.AsAIAgent()throughAddFoundryResponses()+MapFoundryResponses()withTOOLBOX_NAMEset to a toolbox that exposes at least one MCP tool. - Make an executor (or an agent inside the workflow) list or call the available tools.
- Observe that no toolbox tool is available, while a plain
ChatClientAgentregistered the same way sees them.
Package Versions
Microsoft.Agents.AI.Foundry.Hosting 1.28.0-preview.261106.1, Microsoft.Agents.AI.Workflows 1.28.0, Microsoft.Agents.AI.Abstractions 1.28.0
.NET Version
.NET 10
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
github-actions commentedon Nov 17, 2026
Routing result: inconclusive, not run. I did not execute a runtime reproduction (no live Foundry toolbox is available here). Source review of commit 82c49ab supports the report:
AgentFrameworkResponseHandler.csappends resolved toolbox tools tochatOptions.Tools(~line 338) and passesnew ChatClientAgentRunOptions(chatOptions)(~line 350).WorkflowHostAgent.csdeclaresAgentRunOptions? optionsinRunCoreAsync/RunCoreStreamingAsync(lines 155, 181) and has no otheroptionsusage, so the tools are not forwarded to the workflow.Support boundary: unclear. I found no maintained spec or docs promising per-request toolbox tools for workflows hosted as the top-level agent, so a maintainer needs to decide whether this is a bug or a scope or feature question. The cause is in this repository; ownership is split between Foundry.Hosting and Workflows. I routed to Foundry.Hosting, but Workflows may need to be involved.
Run: https://github.com/microsoft/agent-framework/actions/runs/44196395171