Skip to main content

Quick Start

Sending a Message

Receiving Messages (A2A Bridge)

When you set a2a=True on @hexr_agent, the bridge is automatic:

A2AClient

Methods

async method
Fetch the remote agent’s Agent Card.
Returns: AgentCard
async method
Send a message to the remote agent. Blocks until the task reaches a terminal state.
Returns: Task
async method
Poll a task’s current state.
async method
Request cooperative cancellation of a task.

Data Models

Message

Task States

AgentCard


Patterns

Fan-Out / Fan-In (Orchestrator)

Pipeline (Sequential)


Discovery

Agents are discovered via DNS + Agent Cards:
All A2A communication is over mTLS via Envoy sidecars. Both parties must have valid SPIFFE identities.

Task State Storage

Tasks are stored in Valkey (Redis-compatible) with:
  • SETNX for idempotent task creation
  • TTL for automatic cleanup (configurable, default 24h)
  • Task Reaper background goroutine for stuck tasks
  • Cooperative cancellation via cancel flags