Lesson 4 of 4 Multi-Agent Orchestration Patterns and Frameworks

Integrating Existing Agents with A2A and MCP

This lesson explains how existing agents in Foundry, Copilot Studio, third-party platforms or custom code join a new multi-agent solution through the A2A and MCP protocols, and the security controls the integration needs.

Learning outcomes

After completing this lesson, you will be able to:

  • Integrate an existing agent as a peer with A2A.
  • Wrap an existing agent's capability as an MCP tool.
  • Secure integrations across trust boundaries.

Integrating as a peer with A2A

With A2A, the existing agent stays independent. It publishes an agent card describing its skills and authentication, receives messages and manages tasks whose status and artefacts it reports, including streaming updates for long-running work. The calling agent discovers the card, authenticates and sends tasks. In Foundry, the A2A tool (preview) lets a Foundry agent call such an agent; the remote agent's answer returns to the calling agent, which keeps control of the conversation. Foundry agents can also be exposed as A2A endpoints (preview) for other platforms to call. A2A replaces the Connected Agents tool of the classic Foundry Agents API.

True or false

Existing agents as A2A peers

Exam skills 2.4.5

Check how A2A integrates an existing agent.

Log in to try this activity Interactive activities are free with an account.

Integrating as a tool with MCP

With MCP, an existing agent's capability is wrapped as a tool: a function such as assess_credit_risk(application) that the MCP server implements by calling the existing agent. This suits request-response interactions that need no multi-turn negotiation or long-running task tracking, and it lets any MCP-capable framework use the capability. The following table compares the two approaches.

A2A
RelationshipPeer agent, opaque internals
InteractionMessages and long-running tasks with updates
DiscoveryAgent card
Best forAgents owned by other teams or platforms
MCP
RelationshipTool called by an agent
InteractionSingle request and response
DiscoveryTool listing
Best forCapabilities used like functions
Sort into groups

A2A peer or MCP tool?

Exam skills 2.4.5

Decide whether each existing agent should be integrated through A2A or wrapped as an MCP tool.

Log in to try this activity Interactive activities are free with an account.

Securing the integration

Integrating an agent you do not control introduces trust boundaries. The following controls apply to both protocols.

  • Authenticate every call with OAuth 2.0 or Microsoft Entra ID tokens; avoid static shared keys.
  • Verify the agent card's origin and pin the endpoints of approved agents.
  • Send the minimum data the remote agent needs; strip identifiers it does not need.
  • Treat responses as untrusted input: validate them and scan them for injected instructions.
  • Place API Management in front of remote agents for policies, rate limits and logging, and propagate trace context.
Select all that apply

Securing a remote agent integration

Exam skills 2.4.5

Pick the controls that secure an integration with an agent you do not control.

Log in to try this activity Interactive activities are free with an account.
Worked example

A partner's agent

An airline wants its customer agent in Foundry to use a hotel partner's booking agent, which runs on another cloud. Bookings involve several exchanges (availability, holds, confirmation) and can take minutes. The partner supports OAuth 2.0.

A2A fits: the partner's agent card advertises the booking skill, the Foundry agent calls it through the A2A tool with an OAuth 2.0 connection, task updates cover the multi-step booking, and only the travel dates and party size are shared. Wrapping the partner agent as a single MCP tool would not support the multi-step exchange, and copying its logic into the airline's agent would duplicate the partner's system.

Check yourself

How should responses from a remote partner agent be treated?

Show answer

As untrusted input: authenticate the connection, share as little data as possible and validate what comes back.

Exam Tips

Remember for the exam

  • Peer agents with multi-step tasks: A2A. Function-like capabilities: MCP.
  • Foundry A2A tool and A2A endpoints are preview; they replace Connected Agents.
  • Authenticate, minimize shared data and treat remote responses as untrusted.