Automated sync from private repo (2026-06-04)#751
Merged
foundry-samples-repo-sync[bot] merged 4 commits intoJun 4, 2026
Conversation
* feat: add A2A 01-delegation hosted agent sample
Adds a Python hosted-agent sample showing how an Agent Framework
Responses-protocol agent delegates tasks to a remote agent over the
Agent-to-Agent (A2A) protocol via a Foundry Toolbox A2A connection.
* update README and add sample.yaml
* add executor and caller agent for a2a sample
* add executor & caller agents
* remove redundant a2a_connection_name parameter from caller manifest
* add C# equivalent of a2a/01-delegation sample
Mirrors the python a2a/01-delegation sample with two Foundry-hosted Agent
Framework agents: a math-expert executor exposed over A2A and a concierge
caller that delegates to it through a Foundry Toolbox. The caller uses
GetToolboxToolsAsync to load the toolbox server-side, matching the
existing C# foundry-toolbox-server-side sample idiom.
* rename a2a/01-delegation defaults: toolbox + connection
- Toolbox: agent-tools -> a2a-delegation-tools (was too generic;
collides with other Foundry samples in the same project)
- Connection: a2a-conn -> math-expert-a2a (names the target the
connection points at, easier to navigate in the portal)
Applied to both python and csharp samples to keep them in sync.
* align a2a/01-delegation caller with responses/04-foundry-toolbox; skip caller in CI
- python caller/main.py: switch to sync main() + server.run() and add the
_ResilientResponsesHostServer get_history workaround, mirroring the
sister responses/04-foundry-toolbox sample. The previous async-with-Agent
pattern eagerly entered the MCPStreamableHTTPTool context at startup,
racing the platform /readiness probe and causing 424 session_not_ready.
- python caller/requirements.txt: use agent-framework[foundry] extra so
`from agent_framework.foundry import FoundryChatClient` resolves on 1.3+.
- python + csharp caller/.ci-skip: exclude the caller from the e2e
workflow. The caller depends on a Foundry Toolbox that is created
dynamically by executor/scripts/setup-a2a.sh against the deployed
executor, so a single-step azd deploy of the caller would fail when
the toolbox lookup hits a nonexistent toolbox.
* update script to fix the a2a url path
* use UserEntraToken for a2a connection auth type
* update
* rename Azure AI User role to Foundry User in a2a docs
* Move A2A connection + toolbox into caller manifest
Declare the RemoteA2A connection and a2a_preview toolbox as kind:
connection / kind: toolbox resources in the caller's
agent.manifest.yaml so azd provision creates them. Add an
a2a_executor_endpoint manifest parameter for the executor's A2A URL.
setup-a2a.{sh,ps1} now only PATCHes the executor to enable incoming
A2A and prints the URL to paste into the caller's azd ai agent init
prompt; the connection PUT and toolbox version POST are gone.
Applies to both Python and C# samples.
) The browser-automation samples and a generic note in the C# top-level README previously showed �zd ai agent init -m agent.manifest.yaml, which implies running init from inside the sample folder. That fails because the manifest directory would also be the parent of the generated src/<name> tree, and azd refuses with: ERROR: downloading agent.yaml: cannot copy agent files: target '...' is inside the manifest directory '...'. Move the manifest to a separate directory containing only the agent files. This change: - Updates the three affected READMEs to invoke init from one directory above the sample, e.g. �zd ai agent init -m ./<sample-name>/agent.manifest.yaml, matching the pattern used by every other sample. - Adds an [!IMPORTANT] callout next to each updated command that names the exact error users would otherwise see and points them at the parent-directory or remote-manifest-URL workflows (modeled after #744). Docs-only change. Affected files: - samples/csharp/hosted-agents/README.md - samples/python/hosted-agents/agent-framework/responses/14-browser-automation-agent/README.md - samples/python/hosted-agents/bring-your-own/responses/browser-automation/README.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sync `main.py` with the canonical sample in `microsoft/agent-framework` at `python/samples/04-hosting/foundry-hosted-agents/responses/04_foundry_toolbox/main.py`. Notable behavioural changes vs the previous local version: - Switch back to the async `main()` + `await server.run_async()` pattern and manage the `httpx.AsyncClient` with `async with`, matching the upstream sample. - Drop the local `_ResilientResponsesHostServer` wrapper around `context.get_history()`. The original SDK bug it worked around has been addressed upstream — the canonical sample uses the bare `ResponsesHostServer` and we should keep this file in lockstep so fixes flow through cleanly. - Add `FOUNDRY_TOOLBOX_ENDPOINT` as an explicit override for the MCP endpoint URL (falling back to the existing `FOUNDRY_PROJECT_ENDPOINT` + `TOOLBOX_NAME` construction when it isn't set). - Derive the local `MCPStreamableHTTPTool` name from the resolved URL when `TOOLBOX_NAME` is unset, so the tool name and the upstream toolbox always agree. - Add a `Callable[[], str]` annotation on `ToolboxAuth.__init__`'s `token_provider` argument. The contents of `main.py` are now byte-identical with the upstream sample. `.env.example`, `agent.yaml`, and `requirements.txt` already match the upstream layout and do not need to change.
* Add foundry-toolbox-mcp-skills C# Agent Framework sample Adds a hosted Agent Framework sample that discovers MCP-based skills from a Foundry Toolbox and exposes them via AgentSkillsProvider with progressive disclosure (advertise, load, read resources). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update model from gpt-5 to gpt-4.1 in agent.manifest.yaml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Swap a2a/01-delegation and foundry-toolbox-mcp-skills order in README Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: SergeyMenshykh <SergeMenshikh@outlook.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Automated sync from private repo.
Synced commits: 4
Authors: Eduard van Valkenburg,John Miller SergeyMenshykh,qinezh
Validation gate: mode=
none; tracked=0; blocked=0.Rollback point:
af94c90cd406292758ff3645225561717fdbe96e— to revert, force-push this SHA tomainand clear the sync-marks cache.Triggered by:
workflow_dispatchRun: https://github.com/microsoft-foundry/foundry-samples-pr/actions/runs/26979972047