Repository navigation
.NET: Add A2A agent basic usage sample - #10340
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the new basic A2A sample.
No open issues 🎉
What changed in this PR
Adds a minimal A2A starting sample to the .NET sample collection, showing how to discover a remote agent and send a message using default settings.
Changes:
- Discover an agent with
A2ACardResolver, callRunAsync(), and print the response. - Document prerequisites and run instructions, including a local echo-server option.
- Register the project in the solution and link it from the A2A sample catalog.
| File | Description |
|---|---|
dotnet/samples/02-agents/A2A/README.md |
Links the basic sample as the starting example. |
dotnet/samples/02-agents/A2A/A2AAgent_BasicUsage/README.md |
Documents setup, execution, and expected output. |
dotnet/samples/02-agents/A2A/A2AAgent_BasicUsage/Program.cs |
Implements discovery and a single message exchange. |
dotnet/samples/02-agents/A2A/A2AAgent_BasicUsage/A2AAgent_BasicUsage.csproj |
Defines the .NET 10 console project and dependencies. |
dotnet/agent-framework-dotnet.slnx |
Adds the sample project to the solution. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (1 commit(s)): ee5cd5b906e7
Model: gpt-5.6-sol
Overview
The PR adds a focused one-shot A2A sample and integrates it consistently into the solution and sample catalog. The resolver-to-agent path is covered by existing tests that verify card discovery, endpoint selection, and default protocol behavior. The remaining publishable risk is that the documented localhost URL does not match the linked echo server, so the advertised starter workflow fails as written.
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/02-agents/A2A/A2AAgent_BasicUsage/README.md
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 1 most impacted file.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Motivation
The A2A samples demonstrate individual features but lack a minimal starting example using default settings.
Description
A2AAgent_BasicUsageto discover a remote agent, send one message, and display its response.AI assistance: implementation, documentation, and this PR description.
Related Issue
N/A - standalone sample addition.