A2A Protocol
Agent-to-Agent v1.0 discovery and task lifecycle endpoints.
A2A version header
The gateway implements A2A Protocol v1.0. Every response on /.well-known/a2a* and /agents* carries an A2A-Version: 1.0 header. The agent card at /.well-known/a2a-agent-card is public; the /agents* endpoints require Authorization: Bearer <API_KEY> (or x-api-key). Base URL: https://api.misar.dev.
MisarCoder publishes its agents through the Agent-to-Agent (A2A) protocol so other agents can discover its capabilities and drive tasks.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /.well-known/a2a-agent-card | RFC 5785 canonical agent-card discovery (public). |
GET | /agents | List all agent cards (one per registered skill). |
GET | /agents/{agent_id} | Fetch a single agent card. |
POST | /agents/{agent_id}/tasks | Submit a task — returns 202 Accepted. |
GET | /agents/{agent_id}/tasks/{task_id} | Task status. |
POST | /agents/{agent_id}/tasks/{task_id}/cancel | Cancel a task. |
GET | /agents/{agent_id}/tasks/{task_id}/stream | Stream task events (SSE). |
POST | /agents/{agent_id}/tasks/{task_id}/respond | Resume a task in the input_required state. |
Discover the agent card
/.well-known/a2a-agent-cardReturn the canonical A2A agent card describing the gateway's capabilities and skills. No authentication required.
curl https://api.misar.dev/.well-known/a2a-agent-card{ "name": "MisarCoder", "version": "1.0", "skills": [] }Submit a task
/agents/{agent_id}/tasksSubmit a task to an agent. The task is accepted asynchronously (202); poll the status endpoint or subscribe to the SSE stream to follow it. Task status maps internal run states to A2A states (working, input_required, terminal states).
Path parameters
agent_idstringpathrequiredThe agent/skill id (from /agents).
Request body
messageA2AMessagebodyrequiredAn A2A message with parts (e.g. { type: "text", text: "..." }).
curl -X POST https://api.misar.dev/agents/researcher/tasks \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "message": { "parts": [{ "type": "text", "text": "Research X" }] } }'{ "id": "run_...", "status": "working" }Status codes
200— Card or status returned.202— Task accepted.401— Missing or invalid API key (on/agents*).404— Unknown agent or task.