- 11 sessions from basic agent loop to autonomous teams - Python MVP implementations for each session - Mental-model-first docs in en/zh/ja - Interactive web platform with step-through visualizations - Incremental architecture: each session adds one mechanism
39 lines
1.7 KiB
JSON
39 lines
1.7 KiB
JSON
{
|
|
"version": "s10",
|
|
"title": "Team Protocols",
|
|
"description": "Request-response protocols for shutdown and plan approval",
|
|
"steps": [
|
|
{
|
|
"type": "user_message",
|
|
"content": "Work is done. Shut down the team gracefully.",
|
|
"annotation": "Can't just kill threads -- need coordinated shutdown"
|
|
},
|
|
{
|
|
"type": "tool_call",
|
|
"content": "shutdown_request(\n teammate: \"backend-dev\",\n request_id: \"req_abc123\"\n)",
|
|
"toolName": "shutdown_teammate",
|
|
"annotation": "request_id correlates the request with the response"
|
|
},
|
|
{
|
|
"type": "system_event",
|
|
"content": "[Shutdown FSM] req_abc123: pending\n Lead -> backend-dev inbox:\n { type: \"shutdown_request\", request_id: \"req_abc123\" }",
|
|
"annotation": "FSM tracks state: pending -> approved | rejected"
|
|
},
|
|
{
|
|
"type": "system_event",
|
|
"content": "[backend-dev] Received shutdown request req_abc123\n Current task: none (idle)\n Decision: approve\n -> lead inbox: { type: \"shutdown_response\", request_id: \"req_abc123\", approve: true }",
|
|
"annotation": "Teammate decides whether to approve based on its own state"
|
|
},
|
|
{
|
|
"type": "system_event",
|
|
"content": "[Shutdown FSM] req_abc123: approved\n backend-dev thread stopped\n Status: idle -> shutdown",
|
|
"annotation": "Same request_id pattern works for plan approval too"
|
|
},
|
|
{
|
|
"type": "assistant_text",
|
|
"content": "backend-dev shut down gracefully. The same request_id + FSM pattern handles plan approval: teammate submits plan, lead approves/rejects with the correlated request_id.",
|
|
"annotation": "One pattern (request_id correlation), two applications (shutdown + plan approval)"
|
|
}
|
|
]
|
|
}
|