October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

Multi-Agent Orchestration in .NET Using A2A

A practical guide to multi-agent orchestration in .NET with A2A: when to choose A2A over in-process agent composition, how the client and ASP.NET Core server sides fit together, and the production concerns to settle first.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use A2A when one AI agent has to call another across a process, service, team, or organizational boundary. In .NET, Microsoft’s Agent Framework lets a client wrap a remote A2A agent as an ordinary AIAgent, and an ASP.NET Core host can expose a local agent through A2A endpoints. If the agents share one process and one team, in-process agent-as-tool composition is usually simpler and avoids a network hop. The rest of this article explains how to make that choice, how to build the client and server sides, and what to settle before the setup runs in production.

The client and server model

A2A works at the network boundary. It standardizes how a caller discovers a remote agent, how messages are exchanged, and how a task is coordinated. It does not decide the order of your local workflow steps, where state is kept, or how a failed run is recovered. Those belong to your application or to a workflow layer built on top.

As an Amazon Associate I earn from qualifying purchases.

Three pieces make up a working setup:

  • The server (remote agent host). An ASP.NET Core application that hosts a regular AIAgent, registers it for A2A, maps protocol endpoints, and publishes an Agent Card.
  • The client (caller). A .NET application that resolves an Agent Card or a direct endpoint, turns the result into an AIAgent, and calls it.
  • The Agent Card. The discovery document that describes the agent and the endpoints and bindings it supports. The client uses it to choose how to connect.

Because the client receives an AIAgent, calling code looks the same whether the agent is local or remote. That convenience can hide the fact that each call now crosses a network, so keep the boundary visible in the design.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A2A or in-process composition?

A2A is not a replacement for every multi-agent design. The comparison below uses the axes that matter when you make the decision.

Decision axis In-process agent composition A2A remote-agent composition
Boundary Same application and process, typically the same team Crosses a process, service, team, or organizational boundary
Interoperability Usually tied to the framework and runtime hosting both agents Protocol-based, so conforming frameworks and languages can interoperate
Latency Lower, with no network hop Adds HTTP and network latency to every call
Team ownership One team that controls both agents and their release timing Teams can deploy and release independently, and the remote agent’s internals stay opaque
Operations App-local lifecycle Needs planning for timeouts, retries, versioning, and remote conversation state
Discovery Application wiring An Agent Card, a registry or catalog, or a directly configured endpoint

Choose A2A when the agent you call is owned or deployed by someone else, when it must be replaced or upgraded on its own schedule, or when the interaction must work across languages or frameworks. Keep agents in-process when they belong to the same team and deployment, and when the calls are frequent or sit on a latency-sensitive path. Microsoft’s guidance is explicit that the in-process option is simpler and lower in overhead, and that every A2A call is an HTTP request.

A2A also does not define an execution graph. If a workflow needs explicit step ordering, persisted state, and recovery after a failure, add a workflow or orchestration layer. Microsoft points to explicit graph-based workflows for those needs. Use A2A for delegation between agents and the workflow layer for the sequence that ties them together.

How do I connect .NET agents with A2A?

Microsoft’s client documentation lists the .NET client package as Microsoft.Agents.AI.A2A. Install it with the command below. The package is still prerelease, and its APIs may change, so confirm the current NuGet version and the API names against Microsoft Learn before you pin a version.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dotnet add package Microsoft.Agents.AI.A2A --prerelease

A client has three documented ways to obtain an agent. Choose the one that matches how the remote agent is published.

Option 1: Resolve a well-known Agent Card

Use this when the remote host publishes its card at the standard path /.well-known/agent-card.json.

  1. Create an A2ACardResolver pointed at the remote host.
  2. Retrieve the Agent Card through the resolver.
  3. Call GetAIAgentAsync() to create an AIAgent from the card.

If the host does not serve a card at that path, resolution fails. Check the base URL and the path first.

Option 2: Convert a card from a catalog or registry

Enterprise catalogs can already return an AgentCard for each agent. In that case, skip the well-known lookup and convert the card you received into an AIAgent. The card then becomes the single source of truth for the agent’s endpoint and capabilities, so the catalog must be kept current.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Option 3: Connect to a known endpoint directly

When you already know the agent’s URI, create an A2AClient for that address and adapt it to an AIAgent, giving it the name and description your application will use. This is the simplest path for a fixed partner service, but it moves discovery work into configuration, which you then have to maintain.

Calling, streaming, and continuing a remote conversation

Application code calls the wrapped agent with standard methods: RunAsync for a request and response, and RunStreamingAsync for incremental output. For streaming, the hosting documentation associates the behavior with Server-Sent Events over HTTP+JSON, so the endpoint must support that binding.

Two behaviors are easy to misjudge:

  • Remote tools are not local tools. Wrapping a remote agent does not expose its tools to your code or to your local agents. To change what the remote agent can do, change its configuration on the server.
  • Conversation identity is your responsibility. If later turns must continue the same remote conversation, store and reuse the session or context identifier. Without it, each call starts a fresh exchange.

For long-running work, Microsoft documents background responses that return continuation tokens. A client can poll with the token for the result, or reconnect with it to an interrupted stream. Store the token alongside your own job record, because a lost token means the client has no handle on the remote work.

How do I expose an ASP.NET Core agent over A2A?

The server side uses Microsoft.Agents.AI.Hosting.A2A.AspNetCore, which brings in the core hosting logic. Microsoft’s example registers an agent, adds the A2A server, maps endpoints, and publishes a card. The sequence below follows that pattern.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Build the agent as you normally would and register it in dependency injection under a key.
  2. Call AddA2AServer("agent-name") for that agent’s DI key so the host knows which agent to expose.
  3. Map one or both protocol bindings. MapA2AHttpJson provides HTTP+JSON with SSE streaming, and MapA2AJsonRpc provides JSON-RPC 2.0 over HTTP.
  4. Publish the Agent Card with MapWellKnownAgentCard, and make sure its contents match the endpoints you just mapped.
  5. Configure authentication and deployment for your environment.
  6. Replace the default in-memory stores before any production traffic. The details are in the production section below.

Microsoft’s example uses Microsoft Foundry and Azure identity for the model and provider setup. Those are example choices, not protocol requirements, so you can host the agent with whatever model provider and identity system your organization already uses.

A host can serve only one Agent Card at the well-known path. Other agents on the same host can still be called directly, or found through a registry or another discovery mechanism.

What belongs in the Agent Card

The card is the contract clients rely on, so each field should be accurate on the day it is published. Include:

  • The agent’s name and description, written so a client can decide whether to use it.
  • The version of the agent.
  • Supported input and output modes.
  • The supported endpoint URL for each interface.
  • The protocol binding and protocol version for each interface.

Update the card whenever an interface or version changes. A card that still advertises a removed binding or an old protocol version sends clients to an endpoint that will refuse them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choosing a transport binding

The client can state its preferred binding, but the server has to support the binding the client picks. Mapping both bindings on the server gives clients a choice.

Binding Server mapping Streaming Notes
HTTP+JSON MapA2AHttpJson Server-Sent Events over HTTP+JSON Ordinary HTTP requests with SSE for streaming responses, as stated in Microsoft’s hosting documentation
JSON-RPC 2.0 over HTTP MapA2AJsonRpc Not stated in Microsoft’s hosting documentation Confirm streaming behavior against the current documentation before relying on it
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Production concerns

Most of the work after a demo succeeds is here. Settle each item below before the remote agent carries real traffic.

Durable session and task state

The default InMemoryAgentSessionStore and InMemoryTaskStore are intended for development. Session and task state is lost on restart and is not shared between service instances. Replace them with durable implementations if you need conversation continuity across restarts, background tasks that outlive a process, or more than one host instance. Test the replacement by restarting the host in the middle of a conversation and confirming that the client can continue it.

Reliability of remote calls

A remote agent is a distributed service, so plan for the failure modes that come with that:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Timeouts. Set a client-side timeout that matches the agent’s expected response time, and treat a timeout as unknown outcome rather than failure, since the remote agent may have finished the work.
  • Transient errors and retries. Define a retry policy. Retry only operations that are safe to repeat, or make the action idempotent on the remote side before you retry it.
  • Health monitoring. Watch the remote host the same way you watch any dependency, and alert on its availability and error rate.

Versioning and discovery

Protocol versions, package APIs, and card paths are all still moving. Pin package versions deliberately, recheck the well-known card path and protocol version when you upgrade, and publish card changes together with the interface changes they describe. If clients discover agents through a registry, keep its entries current, because a stale entry points clients at an endpoint that no longer matches the card.

Trust and authentication

Treat anything from an agent you do not control as untrusted input. That includes its Agent Card, messages, artifacts, and task status. Validate that content before your application acts on it, and decide explicitly which callers your host accepts. Microsoft’s hosting example does not mandate a particular authentication mechanism, so choose one that fits your environment and apply it to every mapped endpoint.

Deployment environment

Host the agent where its dependencies and identity can be managed consistently. Keep the Agent Card’s advertised URL aligned with the public address that clients actually reach, because a card that points to an internal name will break every client outside that network.

A2A and MCP are complementary

The official A2A Protocol site describes A2A and MCP as complementary. MCP standardizes how an agent connects to tools, APIs, and resources. A2A lets independent agents discover one another, delegate work, and exchange results. A common architecture uses MCP inside each agent to reach its tools and data, and A2A between agents to delegate work. The two protocols solve different boundaries, so choosing one does not rule out the other.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Where Microsoft’s guidance is current

Microsoft’s A2A journey page showed a last-updated date of 25 August 2026 when it was checked. Use Microsoft Learn’s client and hosting pages for implementation details, since package names, APIs, well-known paths, and default transport behavior are the parts most likely to change. The A2A Protocol site is the reference for the protocol framing and terminology.

The A2A Protocol overview describes the standard as “an open standard for seamless communication and collaboration between AI agents.” That phrasing is the protocol’s own, and the boundary-first approach in this article follows from it: adopt A2A where the boundary is real, and keep everything else in-process.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.