Agent-to-Agent (A2A) Protocol
Agent discovery and task delegation via the A2A protocol
textrawl implements the Agent-to-Agent (A2A) protocol, a standard discovery mechanism that lets other AI agents find this knowledge server, learn its capabilities, and delegate natural-language tasks to it. This makes Textrawl usable as a knowledge backend inside a larger multi-agent system, not just as an MCP server for a single client.
Agent Card
A public, unauthenticated endpoint returning the agent card — a JSON description of the agent's identity, capabilities, and skills. An orchestrator agent points at the server URL and reads this card to auto-discover what Textrawl can do.
Example agent card
The url field is derived from OAUTH_SERVER_URL (falling back to http://localhost:<PORT>), so set that env var in production to advertise the correct origin.
Task Delegation
Accepts an A2A task message and routes its text through Textrawl's unified search pipeline (documents + memories + conversations, gated by ENABLE_MEMORY / ENABLE_CONVERSATIONS). Unlike the agent card, this endpoint requires authentication — send Authorization: Bearer <API_BEARER_TOKEN>.
Request
Response
Security
GET /.well-known/agent.jsonis publicly readable by design — the agent card exposes only capability metadata, no knowledge content.POST /.well-known/agent/tasksis protected by bearer auth. Discovery is open; actually querying your knowledge still requiresAPI_BEARER_TOKEN.
How to Use
- Deploy Textrawl with
OAUTH_SERVER_URL(or a reverse-proxy origin) andAPI_BEARER_TOKENset. - Point an orchestrator agent at the server origin; it fetches
/.well-known/agent.jsonand registers the four skills. - The orchestrator delegates natural-language tasks via
POST /.well-known/agent/taskswith the bearer token.
Related
- MCP Tools Overview - The full tool surface available over MCP
- Architecture Overview - Transports, request flow, and components