@@ -2,24 +2,32 @@ sequenceDiagram
22 autonumber
33 participant C as Client/SDK
44 participant M as MCP Server<br/ >(AI Assistants)
5- participant G as Gateway API
6- participant W as Workflow Runtime<br/ >(Agent -Core)
7- participant J as Job Scheduler
8- participant D as Data Stores
5+ participant G as Gateway API<br/ >(FastAPI , async)
6+ participant A as Auth Service<br/ >(JWT , OTP)
7+ participant AC as Agent -Core<br/ >(Workflow DAG)
8+ participant W as Worker<br/ >(Pub/Sub + Cloud Tasks)
9+ participant D as PostgreSQL
910 participant R as Recipient Agent
1011
1112 Note over M , G : MCP path (AI assistants via JSON-RPC)
12- M ->> G : proxy tool call → REST API
13- G -->> M : JSON response → MCP result
13+ M ->> G : proxy tool call -> REST API
14+ G -->> M : JSON response -> MCP result
1415
1516 Note over C , G : Direct API path (SDK/CLI)
1617 C ->> G : API request
17- G ->> D : write request/audit envelope
18- G ->> W : start or continue workflow
19- W ->> R : deliver step/intent
20- R -->> W : callback/progress
21- W ->> D : persist state + events
22- W ->> J : set next wakeup if waiting
23- J -->> W : tick due run
24- W -->> G : latest status
18+ G ->> A : validate x-api-key + Bearer token
19+ A -->> G : auth result
20+ G ->> D : write intent + audit envelope
21+ G ->> AC : start or continue workflow
22+ AC ->> R : deliver step/intent (SSE/http/poll)
23+ R -->> AC : callback/progress
24+ AC ->> D : persist state + events
25+
26+ Note over W , AC : Async pipeline (Pub/Sub + Cloud Tasks)
27+ G ->> W : publish intent.created (Pub/Sub)
28+ W ->> AC : lifecycle events
29+ W ->> D : persist step state
30+ W -->> W : Cloud Tasks: timeout + reminder jobs
31+ W -->> AC : tick due run (scheduled wakeup)
32+ AC -->> G : latest status
2533 G -->> C : response/read model
0 commit comments