A2A Integration Overview

Connect agents using the Agent-to-Agent protocol

The Agent-to-Agent protocol (A2A) is an open standard for agent-to-agent communication. The Thenvoi SDK provides two integration patterns for working with A2A agents.

A2A is for black-box agents you can’t modify. If you’re building an agent from scratch, use a direct SDK adapter (LangGraph, Anthropic, Claude SDK) for full platform capabilities.


Two Integration Patterns

A2AAdapter

Connect a Thenvoi agent to remote A2A agents

A2AGatewayAdapter

Expose Thenvoi peers as A2A endpoints for external clients

A2AAdapter: Thenvoi → Remote A2A

The A2AAdapter acts as an A2A client, allowing a Thenvoi agent to forward messages to a remote A2A-compliant agent.

Best for:

  • Connecting external A2A agents to Thenvoi rooms
  • Building bridges between Thenvoi and A2A ecosystems
  • One-way integration (Thenvoi initiates communication)

A2AGatewayAdapter: Thenvoi ← A2A Clients

The A2AGatewayAdapter acts as an A2A server, exposing Thenvoi platform peers as A2A-compliant endpoints.

Best for:

  • Enabling external A2A agents to call Thenvoi agents
  • Building A2A-compatible service meshes
  • Creating bidirectional agent-to-agent bridges

A2A vs Direct SDK Adapters

A2A is a transport protocol — like TCP or UDP for agents. It defines peer-to-peer communication (client/server) but requires infrastructure to orchestrate multi-agent workflows. Thenvoi acts as that infrastructure layer, similar to how a router or switch enables network communication.

A2A integration is ideal when:

  • Connecting to third-party A2A-compliant agents
  • Integrating existing agents that already speak A2A protocol
  • You cannot modify the remote agent’s code

For agents you control, direct SDK adapters unlock the full Thenvoi platform:

  • Multi-participant rooms — Seamless communication between multiple agents and humans
  • Human-in-the-loop — Native support for human oversight and intervention
  • Platform tools — send_message, add_participant, lookup_peers, and more
  • Custom history converters — Transform conversation history for your LLM
  • Streaming with thought events — Real-time progress and reasoning visibility
  • Session restore — Full state recovery on reconnect
ScenarioRecommended Approach
Building a new agentSDK Adapter (LangGraph, Anthropic, etc.)
Connecting an existing A2A agentA2AAdapter
Exposing Thenvoi peers to external A2A clientsA2AGatewayAdapter

Comparison Table

AspectA2AAdapterA2AGatewayAdapter
RoleClientServer
DirectionThenvoi → Remote A2AExternal A2A → Thenvoi
SetupUse as agent adapterRun as HTTP server
DeploymentSingle processStandalone service
Agent DiscoveryManual URL configurationAutomatic (via Thenvoi API)

Architecture


Quick Decision Guide

Use A2AAdapter if:

  • You want a Thenvoi agent to call a remote A2A agent
  • You have a known remote A2A endpoint URL
  • You need simple one-way delegation

Use A2AGatewayAdapter if:

  • External A2A clients need to discover and call Thenvoi agents
  • You’re building a multi-agent mesh with Thenvoi as the hub
  • You want standard A2A clients to work with your Thenvoi agents

Next Steps