microsoft-foundry / microsoft-foundry/foundry-samples
Foundry hosted-agent > FOUNDRY_AGENT_TOOLSET_ENDPOINT is not set; toolbox support is disabled
@eamonoreilly is already working on this.
Since Aug 13, 2026.
- Dominant language
- Bicep
- Stars
- 445
- Forks
- 494
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 38
Description
Summary
When the Teams-activity (Foundry Toolbox) C# sample is deployed as a hosted agent, AddFoundryToolboxes(toolboxName) loads zero tools at runtime. The container logs:
FOUNDRY_AGENT_TOOLSET_ENDPOINT is not set; toolbox support is disabled.
AddFoundryToolboxes reads the platform-injected FOUNDRY_AGENT_TOOLSET_ENDPOINT, but that variable is never injected into the hosted container — even though the toolbox is declared, created, and bound exactly as the sample prescribes. The agent therefore runs with no toolbox tools.
Environment
Sample: Teams-activity / Foundry Toolbox hosted agent (C#, Agent Framework)
Microsoft.Agents.AI.Foundry.Hosting 1.9.0-preview.*
azd extension azure.ai.agents 0.1.38-preview (also reproduced on 0.1.36-preview)
.NET 10, Linux hosted-agent container
Responses protocol (AgentHost.CreateBuilder + AddFoundryResponses + MapFoundryResponses)
Repro
azd ai agent init -m https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/csharp/hosted-agents/agent-framework/teams-activity/agent.manifest.yaml
azd provision && azd deploy.
azd ai toolbox list shows the toolbox (default version 1).
azd ai agent doctor reports all checks passing.
Invoke the deployed agent and ask it to enumerate its tools:
azd ai agent invoke '{"input": "List every tool you can call by its exact name. If you have zero tools, reply with exactly: NO_TOOLS."}'
Result: NO_TOOLS
Expected vs actual
Expected: the platform injects FOUNDRY_AGENT_TOOLSET_ENDPOINT into the hosted container (because the toolbox is bound to the agent via config.toolboxes), and AddFoundryToolboxes loads the toolbox's tools.
Actual: FOUNDRY_AGENT_TOOLSET_ENDPOINT is absent, AddFoundryToolboxes disables toolbox support, and the agent has no tools.
Notes
The toolbox resource is created and bound, and azd ai agent doctor is green — so this is not a provisioning or declaration error. The gap is specifically the runtime injection of FOUNDRY_AGENT_TOOLSET_ENDPOINT into the container.
FOUNDRY_AGENT_TOOLSET_ENDPOINT cannot be set manually as a workaround — FOUNDRY_/AGENT_ are reserved and rejected when set in agent.yaml.
Reproduces on the unmodified sample, so it is not specific to any particular toolbox, connection, or model.
Questions
What is responsible for injecting FOUNDRY_AGENT_TOOLSET_ENDPOINT into a hosted-agent container, and under what conditions?
Is toolbox-on-hosted-agent gated behind a per-account/project preview flag? If so, how is it enabled?
Is there a supported way for AddFoundryToolboxes to load a toolbox on a hosted agent today, or is this a known preview limitation?
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.
Assessment
This issue has not been assessed yet.