Overview
The A2A (Agent-to-Agent) protocol enables standardized agent discovery and inter-agent communication. aixyz implements A2A protocol version 0.3.0 with an agent card for discovery and a JSON-RPC endpoint for task execution.Endpoints
| Endpoint | Method | Description |
|---|---|---|
/.well-known/agent-card.json | GET | Agent discovery card with metadata, skills, and capabilities |
/agent | POST | JSON-RPC task handler, x402-gated if accepts is defined |
Agent Card
The agent card is automatically generated from youraixyz.config.ts. Other agents fetch this card to discover your agent’s capabilities.
JSON-RPC Endpoint
The/agent endpoint accepts JSON-RPC 2.0 requests. The primary method is tasks/send:
Using the A2A Adapter
TheuseA2A function wires up both endpoints on your server:
- A GET handler at
/.well-known/agent-card.jsonserving the agent card - A POST handler at
/agentrouting JSON-RPC requests toToolLoopAgentExecutor
Payment Integration
When an agent exports anaccepts configuration with scheme: "exact", the /agent endpoint is gated behind x402 payment. Clients must include a valid X-Payment header. Agents without accepts are served without payment requirements.