Skip to main content

A2A Server

The A2A Server exposes your Agentium agents as standard A2A endpoints. Any A2A-compatible client — including agents built with LangGraph, CrewAI, AutoGen, or other frameworks — can discover and interact with your agents.

Setup


Agent Card

The server automatically generates an Agent Card at /.well-known/agent.json:
Each agent is listed as a skill. The card is auto-generated from agent metadata — no manual configuration needed.

JSON-RPC Methods

The server handles these A2A methods at the basePath:

message/send

Synchronous request/response. Runs the agent and returns the complete result.

message/stream

Server-Sent Events (SSE) streaming. Returns chunks as the agent generates output.

tasks/get

Retrieve a task by ID, optionally limiting history length.

tasks/cancel

Cancel a running task.

Agent Routing

When multiple agents are registered, the server resolves which agent to use:
  1. Explicit — Set metadata.agentName in the message to target a specific agent
  2. Name matching — The server checks if the message text mentions an agent name
  3. Default — Falls back to the first registered agent

Examples


Task Lifecycle

Each request creates a task that transitions through these states:
The task stores the full message history and any artifacts (tool results).

Configuration

Record<string, Agent>
required
Map of agent name to Agent instance.
string
default:"/"
Base path for the JSON-RPC endpoint.
object
Provider information included in the Agent Card.
  • organization (string) — Organization name
  • url (string) — Organization URL
string
default:"1.0.0"
Version string for the Agent Card.