MisarMisar Docs

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

MethodPathDescription
GET/.well-known/a2a-agent-cardRFC 5785 canonical agent-card discovery (public).
GET/agentsList all agent cards (one per registered skill).
GET/agents/{agent_id}Fetch a single agent card.
POST/agents/{agent_id}/tasksSubmit a task — returns 202 Accepted.
GET/agents/{agent_id}/tasks/{task_id}Task status.
POST/agents/{agent_id}/tasks/{task_id}/cancelCancel a task.
GET/agents/{agent_id}/tasks/{task_id}/streamStream task events (SSE).
POST/agents/{agent_id}/tasks/{task_id}/respondResume a task in the input_required state.

Discover the agent card

GET/.well-known/a2a-agent-card

Return the canonical A2A agent card describing the gateway's capabilities and skills. No authentication required.

Request
curl https://api.misar.dev/.well-known/a2a-agent-card
200 — Agent card
{ "name": "MisarCoder", "version": "1.0", "skills": [] }

Submit a task

POST/agents/{agent_id}/tasks

Submit 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_idstringpathrequired

The agent/skill id (from /agents).

Request body

messageA2AMessagebodyrequired

An A2A message with parts (e.g. { type: "text", text: "..." }).

Request
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" }] } }'
202 — Accepted
{ "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.