Skip to content
Multi-agent systems

How do AI agents communicate and share state?

Inside one application, agents usually communicate through the framework: a shared state object that every step reads and writes, or messages passed when one agent hands a task to another or calls it as a tool. Across separate systems, they communicate over a protocol — A2A is the open standard for agent-to-agent communication, while MCP connects agents to tools and data. What matters most is how much context is passed: Cognition's first principle is to share full agent traces, not just individual messages.

Published
22 October 2026
Sources checked
22 October 2026
From
Kramiva

01

Within one application

LangGraph models a system as a graph whose nodes read and update shared state; a checkpointer saves that state after each step, keyed by a thread identifier, so a run can be inspected, resumed or edited by a person. The OpenAI Agents SDK passes control through hand-offs, or keeps one agent in charge and calls others as tools. Microsoft Agent Framework and Google's ADK offer comparable workflow constructs.

02

Across systems: the A2A protocol

When agents run as separate services, possibly from different vendors, they need a shared protocol. A2A — started by Google and now a Linux Foundation project — defines how agents discover each other and exchange work over JSON-RPC 2.0 on HTTP(S).

  • Agent Card: a JSON description of an agent's identity, skills, endpoint and authentication
  • Task: a stateful unit of work with an ID and a lifecycle
  • Message and Part: a turn of communication and its content pieces
  • Artifact: an output the agent produces for the task

03

What to share

Cognition's two principles are the clearest guidance here: share context, including full traces rather than just the last message; and remember that actions carry implicit decisions, so conflicting decisions produce bad results. Anthropic's research system found the same in practice — vague task descriptions from the lead agent led subagents to duplicate work or miss parts of it.

04

Trade-offs

Sharing everything keeps agents consistent but fills context windows and raises cost. Sharing summaries is cheaper but loses detail an agent may need. Cross-system protocols allow agents from different teams or vendors to work together, at the price of network calls, authentication and a larger security surface.

Where Kramiva fits

Kramiva's AI automations log every decision with what was proposed, on what basis and who approved it — the record you need when several steps or services share one task.

Sources

  1. LangGraph persistence — LangChain
  2. OpenAI Agents SDK documentation — OpenAI
  3. Agent2Agent (A2A) Protocol documentation — A2A Project (Linux Foundation)
  4. A2A key concepts — A2A Project (Linux Foundation)
  5. Don't Build Multi-Agents — Cognition, 12 June 2025
  6. How we built our multi-agent research system — Anthropic, 13 June 2025

Accessed 22 October 2026. Kramiva is not affiliated with these publishers.

Start

Tell us what you are building.

A short brief gets you a real reply from a founder within one business day — an honest read on fit, scope, and budget.