Skip to main content

A2A Client

A2ARemoteAgent lets you connect to any A2A-compliant agent and use it as if it were a local Agentium agent. It supports discovery, synchronous calls, streaming, and can be used as a tool or team member.

Discovery

First, discover the remote agent by fetching its Agent Card:

Direct Calls

Synchronous (message/send)

Streaming (message/stream)


As a Tool

Wrap the remote agent as a ToolDef so an orchestrator agent can call it:
The tool is automatically named a2a_{agentName} and uses the agent’s description from the Agent Card.

As a Team Member

Remote A2A agents can participate in Agentium Teams alongside local agents:

Authentication

Pass custom headers for authenticated A2A servers:

Configuration

string
required
Base URL of the remote A2A agent (e.g. "http://localhost:3001").
Record<string, string>
Custom headers sent with every request (useful for authentication).
string
Override the agent name (otherwise discovered from the Agent Card).
number
default:"60000"
Request timeout in milliseconds.

API