Skip to content

.NET: Simplify A2A client-server sample - #7891

Merged
SergeyMenshykh merged 4 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-simplify-a2a-policy-sample
Aug 27, 2026
Merged

.NET: Simplify A2A client-server sample#7891
SergeyMenshykh merged 4 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-simplify-a2a-policy-sample

Conversation

@SergeyMenshykh

Copy link
Copy Markdown
Contributor

Motivation & Context

The A2A client-server sample currently includes several agents and coordination layers, making the basic setup harder to follow. This streamlines it into a focused policy-agent example.

Description & Review Guide

  • What are the major changes? Keep one policy agent, use Foundry Responses, simplify the client and server, correct the HTTP request, and update setup guidance.
  • What is the impact of these changes? The sample is smaller and quicker to run while retaining agent discovery and both A2A bindings.
  • What do you want reviewers to focus on? The simplified end-to-end flow and instructions.

Related Issue

N/A - no matching open issue was found.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) - a workflow keeps the label and title prefix in sync automatically.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9bde6d5d-8515-4ce3-abff-1e30a0b25f45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Simplifies the A2A sample into a focused Foundry-backed policy-agent flow.

Changes:

  • Replaces the multi-agent setup with one policy agent.
  • Simplifies client discovery, invocation, configuration, and documentation.
  • Updates the JSON-RPC request and retains both A2A bindings.

Reviewed changes

Copilot reviewed 12 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Streamlines end-to-end instructions.
A2AServer/README.md Adds server-specific guidance.
A2AServer/Program.cs Hosts the Foundry policy agent.
A2AServer/PolicyAgentCard.cs Defines policy-agent discovery metadata.
A2AServer/Models/InvoiceQuery.cs Removes invoice mock tooling.
A2AServer/HostAgentFactory.cs Removes multi-provider agent factory.
A2AServer/A2AServer.http Updates policy-agent requests.
A2AServer/A2AServer.csproj Removes unused dependencies.
A2AClient/README.md Documents the simplified client.
A2AClient/Program.cs Directly discovers and invokes the agent.
A2AClient/HostClientAgent.cs Removes coordinating host agent.
A2AClient/A2AClient.csproj Removes obsolete dependencies.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread dotnet/samples/05-end-to-end/A2AClientServer/A2AServer/PolicyAgentCard.cs Outdated
Comment thread dotnet/samples/05-end-to-end/A2AClientServer/A2AClient/Program.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9bde6d5d-8515-4ce3-abff-1e30a0b25f45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9bde6d5d-8515-4ce3-abff-1e30a0b25f45
@SergeyMenshykh
SergeyMenshykh force-pushed the sergeymenshykh-simplify-a2a-policy-sample branch from 8b9e7ff to 579e619 Compare August 26, 2026 16:59
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net labels Aug 26, 2026
@SergeyMenshykh SergeyMenshykh mentioned this pull request Aug 26, 2026
11 tasks

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAF Automated Review — Iteration 1

Result: Findings reported
Scope: full PR (3 commit(s)): 5c9e0b1b7193, 2e51389ecbcf, 579e619fb06e
Model: gpt-5.6-sol

Overview

The review found 1 verified inline finding(s).

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.

Affected areas: dotnet/samples/05-end-to-end/A2AClientServer/A2AClient/README.md

Comment thread dotnet/samples/05-end-to-end/A2AClientServer/A2AClient/README.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9bde6d5d-8515-4ce3-abff-1e30a0b25f45
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Aug 27, 2026
Merged via the queue into microsoft:main with commit 8c4e452 Aug 27, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in Agent Framework Aug 27, 2026
This was referenced Aug 31, 2026
Mohammed Sanaullah (sanaullahmohammed) pushed a commit to sanaullahmohammed/NexusOps that referenced this pull request Sep 3, 2026
Updated
[Microsoft.Agents.AI](https://github.com/microsoft/agent-framework) from
1.19.0 to 1.20.0.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.Agents.AI's
releases](https://github.com/microsoft/agent-framework/releases)._

## 1.20.0

## What's Changed
* .NET: Bump AWSSDK.Extensions.Bedrock.MEAI from 4.0.6.10 to 4.0.101.8
by @​dependabot[bot] in
microsoft/agent-framework#7829
* .NET: Stabilize Foundry recovery tests by @​rogerbarreto in
microsoft/agent-framework#7817
* .NET: fix: preserve Responses logprobs field by @​he-yufeng in
microsoft/agent-framework#5860
* .NET: Honor cancellation for Foundry-hosted workflow responses by
@​rogerbarreto with @​Copilot in
microsoft/agent-framework#7842
* .NET: Use Responses API for hosted web search in AG-UI by
@​rogerbarreto with @​Copilot in
microsoft/agent-framework#7843
* .NET: Bump Aspire.Hosting from 13.1.0 to 13.5.2 by @​dependabot[bot]
in microsoft/agent-framework#7826
* .NET: Suppress false positive Zip Slip alert by @​SergeyMenshykh in
microsoft/agent-framework#7858
* .NET: added Mem0Sharp integration for in-memory storage in agent
samples. by @​jihadkhawaja in
microsoft/agent-framework#7792
* .NET: Annotate DevUI aggregator static-analysis false positives by
@​SergeyMenshykh in
microsoft/agent-framework#7864
* .NET: Rename CommunityToolkit.VectorData.CosmosNoSql to AzureCosmosDB
by @​adamsitnik in
microsoft/agent-framework#7878
* .NET: chore: upgrades aspnet openapi dependency by @​baywet in
microsoft/agent-framework#7870
* .NET: Simplify A2A function tool samples by @​SergeyMenshykh in
microsoft/agent-framework#7861
* .NET: Bump Azure.AI.AgentServer.Invocations from 1.0.0-beta.5 to
1.0.0-beta.6 by @​dependabot[bot] in
microsoft/agent-framework#7886
* .NET: docs: updates the contributing information for CFS users by
@​baywet in microsoft/agent-framework#7869
* Bump CommunityToolkit.VectorData.InMemory from 1.0.0 to 1.0.1 by
@​dependabot[bot] in
microsoft/agent-framework#7888
* .NET: Remove retired OpenAI Assistants integration tests by
@​rogerbarreto in microsoft/agent-framework#7896
* .NET: Simplify A2A client-server sample by @​SergeyMenshykh in
microsoft/agent-framework#7891
* Bump Dapr.AI.Microsoft.Extensions from 1.18.4 to 1.18.5 by
@​dependabot[bot] in
microsoft/agent-framework#7889
* .NET: docs/workflow fileinput sample dotnet by @​baywet in
microsoft/agent-framework#7913
* .NET: Add timeout for wait-for-first-completion by @​westey-m in
microsoft/agent-framework#7911
* .NET: Fix duplicate Foundry AgentHost port binding by @​rogerbarreto
in microsoft/agent-framework#7932
* .NET: tests: removes dependency on fluent assersion because of
licensing concerns by @​baywet in
microsoft/agent-framework#7938
* .NET: docs(decisions): resolve duplicate ADR sequence numbers (0016,
0021, 0024) by @​jluocsa in
microsoft/agent-framework#6046
* .NET: Bump Azure.Core from 1.61.0 to 1.62.0 by @​dependabot[bot] in
microsoft/agent-framework#7954
* .NET: Improve Cosmos DB Emulator startup reliability by @​TheovanKraay
in microsoft/agent-framework#3932
* .NET: add public API analyzers by @​baywet in
microsoft/agent-framework#7935
* .NET: Update version for 1.20.0 release by @​SergeyMenshykh in
microsoft/agent-framework#7972

## New Contributors
* @​madanmishra1223 made their first contribution in
microsoft/agent-framework#7705
* @​YashvantHange made their first contribution in
microsoft/agent-framework#7850
* @​jihadkhawaja made their first contribution in
microsoft/agent-framework#7792
* @​adamsitnik made their first contribution in
microsoft/agent-framework#7878
* @​baywet made their first contribution in
microsoft/agent-framework#7870
* @​Namraa310806 made their first contribution in
microsoft/agent-framework#7901
* @​Sweetteabittersugar made their first contribution in
microsoft/agent-framework#7903
* @​shoemoney made their first contribution in
microsoft/agent-framework#7837
* @​jluocsa made their first contribution in
microsoft/agent-framework#6046

**Full Changelog**:
microsoft/agent-framework@dotnet-1.19.0...dotnet-1.20.0

Commits viewable in [compare
view](microsoft/agent-framework@dotnet-1.19.0...dotnet-1.20.0).
</details>

Updated
[Microsoft.Agents.AI.OpenAI](https://github.com/microsoft/agent-framework)
from 1.19.0 to 1.20.0.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.Agents.AI.OpenAI's
releases](https://github.com/microsoft/agent-framework/releases)._

## 1.20.0

## What's Changed
* .NET: Bump AWSSDK.Extensions.Bedrock.MEAI from 4.0.6.10 to 4.0.101.8
by @​dependabot[bot] in
microsoft/agent-framework#7829
* .NET: Stabilize Foundry recovery tests by @​rogerbarreto in
microsoft/agent-framework#7817
* .NET: fix: preserve Responses logprobs field by @​he-yufeng in
microsoft/agent-framework#5860
* .NET: Honor cancellation for Foundry-hosted workflow responses by
@​rogerbarreto with @​Copilot in
microsoft/agent-framework#7842
* .NET: Use Responses API for hosted web search in AG-UI by
@​rogerbarreto with @​Copilot in
microsoft/agent-framework#7843
* .NET: Bump Aspire.Hosting from 13.1.0 to 13.5.2 by @​dependabot[bot]
in microsoft/agent-framework#7826
* .NET: Suppress false positive Zip Slip alert by @​SergeyMenshykh in
microsoft/agent-framework#7858
* .NET: added Mem0Sharp integration for in-memory storage in agent
samples. by @​jihadkhawaja in
microsoft/agent-framework#7792
* .NET: Annotate DevUI aggregator static-analysis false positives by
@​SergeyMenshykh in
microsoft/agent-framework#7864
* .NET: Rename CommunityToolkit.VectorData.CosmosNoSql to AzureCosmosDB
by @​adamsitnik in
microsoft/agent-framework#7878
* .NET: chore: upgrades aspnet openapi dependency by @​baywet in
microsoft/agent-framework#7870
* .NET: Simplify A2A function tool samples by @​SergeyMenshykh in
microsoft/agent-framework#7861
* .NET: Bump Azure.AI.AgentServer.Invocations from 1.0.0-beta.5 to
1.0.0-beta.6 by @​dependabot[bot] in
microsoft/agent-framework#7886
* .NET: docs: updates the contributing information for CFS users by
@​baywet in microsoft/agent-framework#7869
* Bump CommunityToolkit.VectorData.InMemory from 1.0.0 to 1.0.1 by
@​dependabot[bot] in
microsoft/agent-framework#7888
* .NET: Remove retired OpenAI Assistants integration tests by
@​rogerbarreto in microsoft/agent-framework#7896
* .NET: Simplify A2A client-server sample by @​SergeyMenshykh in
microsoft/agent-framework#7891
* Bump Dapr.AI.Microsoft.Extensions from 1.18.4 to 1.18.5 by
@​dependabot[bot] in
microsoft/agent-framework#7889
* .NET: docs/workflow fileinput sample dotnet by @​baywet in
microsoft/agent-framework#7913
* .NET: Add timeout for wait-for-first-completion by @​westey-m in
microsoft/agent-framework#7911
* .NET: Fix duplicate Foundry AgentHost port binding by @​rogerbarreto
in microsoft/agent-framework#7932
* .NET: tests: removes dependency on fluent assersion because of
licensing concerns by @​baywet in
microsoft/agent-framework#7938
* .NET: docs(decisions): resolve duplicate ADR sequence numbers (0016,
0021, 0024) by @​jluocsa in
microsoft/agent-framework#6046
* .NET: Bump Azure.Core from 1.61.0 to 1.62.0 by @​dependabot[bot] in
microsoft/agent-framework#7954
* .NET: Improve Cosmos DB Emulator startup reliability by @​TheovanKraay
in microsoft/agent-framework#3932
* .NET: add public API analyzers by @​baywet in
microsoft/agent-framework#7935
* .NET: Update version for 1.20.0 release by @​SergeyMenshykh in
microsoft/agent-framework#7972

## New Contributors
* @​madanmishra1223 made their first contribution in
microsoft/agent-framework#7705
* @​YashvantHange made their first contribution in
microsoft/agent-framework#7850
* @​jihadkhawaja made their first contribution in
microsoft/agent-framework#7792
* @​adamsitnik made their first contribution in
microsoft/agent-framework#7878
* @​baywet made their first contribution in
microsoft/agent-framework#7870
* @​Namraa310806 made their first contribution in
microsoft/agent-framework#7901
* @​Sweetteabittersugar made their first contribution in
microsoft/agent-framework#7903
* @​shoemoney made their first contribution in
microsoft/agent-framework#7837
* @​jluocsa made their first contribution in
microsoft/agent-framework#6046

**Full Changelog**:
microsoft/agent-framework@dotnet-1.19.0...dotnet-1.20.0

Commits viewable in [compare
view](microsoft/agent-framework@dotnet-1.19.0...dotnet-1.20.0).
</details>

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants