<!-- Documentation header -->
---
summary: Agent-to-agent communication in OutSystems Developer Cloud (ODC) enables collaborative AI agents for modular problem solving, scalability, and cross-platform workflows.
tags:
  - Agentic
  - AI
  - Architecture
guid: 6c449182-a1d4-4584-9558-5292f761f97a
locale: en-us
app_type: reactive web apps
platform-version: odc
figma:
coverage-type:
  - understand
topic:
  - a2a-communication-flow
  - a2a-vs-mcp
  - understand-a2a-protocol
outsystems-tools:
  - odc studio
  - odc portal
audience:
  - Developer
isautopublish: true
---

# Agent-to-agent communication in ODC

Agent-to-agent (A2A) communication in ODC allows your ODC agentic apps to interact and collaborate with external agents.

This can be particularly useful in scenarios where different agents have specialized knowledge or capabilities, and they need to work together to achieve a common goal.

## What does A2A helps with?

A2A unlocks capabilities that a single agent might struggle with due to context window limits or specialized knowledge gaps:

* **Modular Problem Solving.** Complex tasks are broken down into smaller, manageable sub-tasks handled by specialists.

* **Reduced Hallucination.** By having a "Critic" agent review the output of a "Generator" agent, the accuracy of the final result increases.

* **Scalability.** You can add more specialized agents (e.g., a "Legal Agent" or a "Tax Agent") to a workflow without needing to retrain the core model.

* **Cross-Platform Collaboration.** An agent living in your browser could talk to an agent living in your company's private database to bridge the gap between public info and private data.

## Core components of agent-to-agent

Agent to Agent has three main roles:

* **End user**. This can be a human or an automated service. In the context of A2A, this is who initiates a request or defines a goal that requires assistance from one or more AI agents.

* **Client agent**. An agentic app that acts on behalf of the user. This is the agent that receives the user's request, and connects to the remote agent to delegate tasks and receive results.

* **Remote Agent**. An AI agent or an agentic system that exposes an HTTP endpoint implementing the A2A protocol. It receives requests from client agents, processes tasks, and returns results or status updates.
From the client's perspective, the remote agent operates as an opaque (black-box) system, meaning its internal workings, memory, or tools aren't exposed.

## Core architecture of an A2A connection

The A2A protocol defines a set of architectural components that structure all interactions. Understanding these building blocks is essential for designing a compliant and robust integration.

* **Agent Card**. A JSON metadata document describing a remote agent's identity, capabilities, endpoint, skills, and authentication requirements. It enables clients agents to discover remote agents and understand how to interact with them securely and effectively. By convention, this card is often hosted at a well-known path, such as `https://<domain>/.well-known/agent-card.json`.

* **Task**. A stateful unit of work initiated by a client agent, with a unique ID and defined lifecycle. It facilitates tracking of long-running operations and enables multi-turn interactions and collaboration.

* **Message**. A single turn of communication between a client and a remote agent, containing content and a role ("user" or "agent") which conveys instructions, context, questions, answers, or status updates that aren't necessarily formal artifacts.

* **Part**. The fundamental content container (for example, TextPart, FilePart, DataPart) used within Messages and Artifacts. It provides flexibility for agents to exchange various content types within messages and artifacts.

* **Artifact**. A tangible output generated by an agent during a task (for example, a document, image, or structured data) which delivers the concrete results of an agent's work, ensuring structured and retrievable outputs.

## Communication flow

A2A follows a standardized client-server model to ensure ease of integrations with enterprise systems. The communication workflow involves three phases:

* **Discovery**. A client agent identifies a potential remote agent and fetches its Agent Card to determine its capabilities and security requirements.

* **Authentication**. The client agent authenticates with remote agents according to one of the authentication methods specified in Agent Card.

* **Communication**. The client agent sends a request to create a Task. The communication occurs over HTTPS for secure transport, using JSON-RPC 2.0. For real-time updates or large outputs, the protocol supports streaming via Server-Sent Events (SSE).

## What's the difference between MCP vs A2A

MCP serves as a standardization layer for AI applications to communicate effectively with external services, such as APIs data sources, predefined functions and other tools. Meanwhile, the A2A protocol focuses on agent collaboration, facilitating communication between AI agents.

You can think of MCP as the tools that allows an agent to connect to various data sources and tools, while A2A is the management layer that orchestrates how different agents interact and collaborate with each other.

Both protocols are meant to complement each other. For example, a retail store might have its own inventory agent that uses MCP to interact with databases storing information about products and stock levels.

If the inventory agent detects products low in stock, it notifies an internal order agent, which then uses A2A to communicate with external supplier agents and place orders.


