Worked example: Google A2A
0 · What A2A expects
Endpoint
Purpose
Typical caller
1 · Planner → Coder flow (with memory)
sequenceDiagram
participant UI as Browser
participant GW as Attach Gateway
participant PL as Planner Agent
participant CD as Coder Agent
participant WV as Weaviate
UI ->> GW: POST /a2a/tasks/send { messages:[…], target:"planner" }
Note right of UI: Authorization: Bearer JWT
GW ->> PL: same body + X‑Attach‑User / Session
PL ->> WV: MemoryEvent(role=planner, content=plan)
PL -->> GW: { mem_id:123, plan:"…" }
GW ->> CD: POST /a2a/tasks/send { mem_id:123, … }
CD ->> WV: fetch plan 123
CD ->> WV: MemoryEvent(role=coder, content=answer)
CD -->> GW: TaskStatus(state="done", result=answer)
GW -->> UI: state="done"2 · Skeleton agents
Planner – saves a plan, returns mem_id
mem_idCoder – receives mem_id, fetches plan, prepends it
mem_id, fetches plan, prepends it3 · Smoke‑test locally
4 · cURL only
5 · What Attach handles vs. what you write
Layer
Provided by attach‑gateway
You supply
Last updated