Skip to content

Automated sync from private repo (2026-06-04)#751

Merged
foundry-samples-repo-sync[bot] merged 4 commits into
mainfrom
sync/private-to-public-20260604-211410
Jun 4, 2026
Merged

Automated sync from private repo (2026-06-04)#751
foundry-samples-repo-sync[bot] merged 4 commits into
mainfrom
sync/private-to-public-20260604-211410

Conversation

@foundry-samples-repo-sync
Copy link
Copy Markdown
Contributor

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 to main and clear the sync-marks cache.

Triggered by: workflow_dispatch
Run: https://github.com/microsoft-foundry/foundry-samples-pr/actions/runs/26979972047

qinezh and others added 4 commits June 4, 2026 18:42
* 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>
@foundry-samples-repo-sync foundry-samples-repo-sync Bot merged commit ca5cdac into main Jun 4, 2026
6 of 7 checks passed
@foundry-samples-repo-sync foundry-samples-repo-sync Bot deleted the sync/private-to-public-20260604-211410 branch June 4, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants