Skip to content

.NET: Add A2A agent basic usage sample - #10340

Merged
SergeyMenshykh merged 2 commits into
mainfrom
sergeymenshykh-simple-a2a-sample
Nov 13, 2026
Merged

SergeyMenshykh merged 2 commits into
mainfrom
sergeymenshykh-simple-a2a-sample

Conversation

@SergeyMenshykh

Copy link
Copy Markdown
Collaborator

Motivation

The A2A samples demonstrate individual features but lack a minimal starting example using default settings.

Description

  • Add A2AAgent_BasicUsage to discover a remote agent, send one message, and display its response.
  • Document prerequisites and run instructions, including an echo-server option.
  • Register the project in the .NET solution and link it from the A2A sample catalog.

AI assistance: implementation, documentation, and this PR description.

Related Issue

N/A - standalone sample addition.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 13:43
@SergeyMenshykh
SergeyMenshykh deployed to github-app-auth November 13, 2026 13:43 — with GitHub Actions Active
@SergeyMenshykh
SergeyMenshykh deployed to github-app-auth November 13, 2026 13:43 — with GitHub Actions Active
@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 Nov 13, 2026

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.

🟢 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, call RunAsync(), 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

@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 (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

@github-code-quality

github-code-quality Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main 739a387 sergeymenshykh-simpl... c0619fb +/-
86% 86% 0%
View coverage of the 1 most impacted file.
File main 739a387 sergeymenshykh-simpl... c0619fb +/-
/home/runner/wo...SessionStore.cs 100% 56% -44%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 13, 2026 14:07 UTC

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 824cc4f Nov 13, 2026
39 checks passed
@SergeyMenshykh
SergeyMenshykh deleted the sergeymenshykh-simple-a2a-sample branch November 13, 2026 14:29
@github-project-automation github-project-automation Bot moved this from In Review to Done in Agent Framework Nov 13, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
github-app-auth — c0619fb6 Deployed Nov 13, 2026 by SergeyMenshykh via add_label #27805
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