Skip to content
🎩 askTheodor Try free
🍳 A2A cookbook · recipes for the shared identity layer

Call a worker from anything.

Four inbound call shapes, one outbound flow, and ten things people actually build. Everything below runs behind your guardrails — opt-in exposure, bearer auth, kill-switch, and audit.

Four ways to call a worker

The bridge is bound to localhost and reachable externally only through a tunnel you start in Settings → A2A. Pick the shape that fits the caller.

Discover

Public Agent Card — capability discovery, no auth.

# Discover (public, no auth) → Agent Card listing your exposed workers as "skills"
GET  https://<host>/.well-known/agent.json

Sync

Run to completion; the cited answer comes back on the same request.

# (1) SYNC — run to completion, answer on the same request
POST https://<host>/a2a/v1/message/send
Authorization: Bearer <a2a token>

{ "message": { "role": "user",
    "parts": [ { "kind": "text", "text": "Research the EU market for X, with sources." } ] },
  "skillId": "<persona uuid, optional — defaults to Theodor>" }

→ { "message": { "role": "agent",
      "parts": [ { "kind": "text", "text": "…cited summary…" } ] },
    "conversationId": "…" }

Stream

SSE status events for long tasks — see tools fire as they run.

# (2) STREAMING — Server-Sent Events for long tasks
POST https://<host>/a2a/v1/message/stream        (same body + Bearer)

event: {"type":"status","state":"working","tool":"deep_research"}
event: {"type":"status","state":"completed","message":{ … }}

Push + lifecycle

Fire-and-forget with a webhook callback; poll or cancel by task id.

# (3) ASYNC PUSH — fire-and-forget; result POSTed to your webhook later
POST …/message/send
  body adds:  "pushNotification": { "url": "https://you/cb", "token": "…" }
→ 202 { "taskId": "…" }

# (4) LIFECYCLE — poll or cancel a push-mode task by id
POST …/a2a/v1/tasks/get      { "taskId": "…" }
  → { "status": "working|completed|failed|canceled", "message": …, "conversationId": "…" }
POST …/a2a/v1/tasks/cancel   { "taskId": "…" }   → { "status": "canceling" }

📤 The other direction — a worker hires an agent

Theodor delegates a sub-task to an outside specialist, fetches what it built, and continues the workflow — inside one org chart, one delegation tree, one audit log. Token resolution happens server-side.

# A worker hires another agent — URL + token resolved server-side, never in-context
a2a_delegate(agent="OpenHands", task="implement the CSV export and add a test")

# CLI agents run via shell + fs; the worker fetches the artifact and continues
shell: openhands --task "…" --dir ./work/feature-x   →   fs_read ./work/feature-x/export.rs

Ten things people build with it

1 Plug a Research Analyst into a LangGraph / CrewAI pipeline for the cited-research step. Inbound · sync
2 Let a partner's procurement agent hand RFP drafting to your Sales worker. Inbound · expose + bearer
3 Have Theodor hire OpenHands to build a feature, then a Reviewer checks it and opens the PR. Outbound + Reviewer
4 Run a nightly competitor scan (Deep Research) and POST the report to your Slack bot. Inbound · push
5 Build a mixed crew: your analyst + a vendor's legal-review agent in one task graph. Outbound · by name
6 Expose a support worker so a customer's chatbot answers from your product docs. Inbound · Library RAG
7 From a CI bot, ask the Eng worker to triage a failing build — with live progress. Inbound · stream
8 Let a Raycast / CLI script ask Theodor a question without opening the app. Inbound · sync
9 Delegate “summarize these 200 PDFs” to a specialist OCR agent, then draft the board memo. Outbound + own worker
10 A CrewAI crew hires your Eng worker as its “refactor-planner” member. Inbound · skill