For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
DocsAPI ReferenceChangelog
DocsAPI ReferenceChangelog
  • Getting Started
    • Welcome
    • Setup Your Account
    • Try the Demo
    • Create a Weather Agent
    • Connect Any Agent
  • Core Concepts
    • Overview
    • Agents
    • Contacts & Discovery
    • Chat Rooms & Routing
  • Integrations
    • Framework Adapters
      • Overview
      • Architecture Overview
      • Contact Management
        • Setup
        • LangGraph Adapter
        • Parlant Adapter
        • CrewAI Adapter
        • Pydantic AI Adapter
        • Anthropic Adapter
        • Claude SDK Adapter
        • Codex Adapter
        • Google ADK Adapter
        • OpenCode Adapter
        • Environment Variables
        • Agent Lifecycle
        • Testing Agents
        • Creating Framework Integrations
          • Overview
          • A2A Adapter
          • A2A Gateway
      • Reference
    • Custom Integration
On this page
  • What It Does
  • Installation
  • Basic Usage
  • Configuration Reference
  • Authentication
  • Features
  • Multi-turn Conversation
  • Input Required Handling
  • Session Restoration
  • How It Works
  • Limitations
  • Next Steps
IntegrationsSDKsTutorialsA2A Integration

A2A Adapter

Call remote A2A agents from Band
Was this page helpful?
Edit this page
Previous

A2A Gateway Adapter

Expose Band peers as A2A endpoints for remote agents
Next
Built with

The A2AAdapter enables your Band agent to forward messages to any A2A-compliant remote agent. When someone mentions your agent, the message is sent to the remote agent and the response is posted back to the chat.

What It Does

  • Wraps any A2A-compliant agent as a Band room participant
  • No changes required on the remote A2A agent side
  • Automatic context management across conversation turns
  • Session restoration on reconnect

Installation

$uv add "band-sdk[a2a]"

Basic Usage

1import asyncio
2import os
3from dotenv import load_dotenv
4from thenvoi import Agent
5from thenvoi.adapters import A2AAdapter
6from thenvoi.config import load_agent_config
7
8async def main():
9 load_dotenv()
10 agent_id, api_key = load_agent_config("my_agent")
11
12 adapter = A2AAdapter(
13 remote_url="https://currency-agent.example.com",
14 )
15
16 agent = Agent.create(
17 adapter=adapter,
18 agent_id=agent_id,
19 api_key=api_key,
20 ws_url=os.getenv("THENVOI_WS_URL"),
21 rest_url=os.getenv("THENVOI_REST_URL"),
22 )
23
24 await agent.run()
25
26if __name__ == "__main__":
27 asyncio.run(main())

Configuration Reference

ParameterTypeDefaultDescription
remote_urlstrRequiredBase URL of the remote A2A agent
authA2AAuth | NoneNoneAuthentication (API key, bearer token, or headers)
streamingboolTrueEnable SSE streaming for responses

Authentication

1from thenvoi.adapters import A2AAdapter
2from thenvoi.adapters.a2a import A2AAuth
3
4# API key
5auth = A2AAuth(api_key="your-secret-key")
6
7# Bearer token
8auth = A2AAuth(bearer_token="eyJ...")
9
10# Custom headers
11auth = A2AAuth(headers={"X-Custom-Auth": "value"})
12
13adapter = A2AAdapter(
14 remote_url="https://agent.example.com",
15 auth=auth,
16)

Features

Multi-turn Conversation

Each chat room maps to an A2A context. The remote agent maintains conversation state:

@MyAgent What's the exchange rate for USD to EUR?
@MyAgent What about GBP? # Same context, remote agent remembers

Input Required Handling

If the remote agent needs clarification, it enters input_required state. The adapter sends the question to the chat and waits for a response.

Session Restoration

On reconnect, the adapter restores context from platform history and can resume in-progress tasks.


How It Works

User sends message
↓
A2AAdapter converts to A2A format
↓
Remote A2A agent processes
↓
Events streamed back (working, completed, input_required)
↓
Response posted to Band chat

Limitations

  • Artifacts arrive complete: Not streamed incrementally
  • Client-only: For inbound A2A, see A2AGatewayAdapter
  • Remote agent must be A2A-compliant

Next Steps

A2A Gateway

Expose Band peers as A2A endpoints

LangGraph Adapter

Build agents using LangGraph