From 9c7e846828eba814aef523d36da17fda12d7f277 Mon Sep 17 00:00:00 2001 From: Timothy Date: Sun, 22 Feb 2026 18:03:31 -0800 Subject: [PATCH] chore: put event loop node zoom inside worker bee graph --- README.md | 16 +++++++++------- docs/architecture/README.md | 30 ++++++++++++++++-------------- docs/roadmap.md | 16 +++++++++------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 97ef4cb4..f82b10e5 100644 --- a/README.md +++ b/README.md @@ -293,22 +293,24 @@ flowchart TB %% ========================================= %% SYSTEM NODES %% ========================================= - subgraph EventLoopNode [Event Loop Node] - ELN_L["listener"] - ELN_SP["System Prompt
(Task)"] - ELN_EL["Event loop"] - ELN_C["Conversation"] - end - subgraph WorkerBees [Worker Bees] WB_C["Conversation"] WB_SP["System prompt"] + subgraph Graph [Graph] direction TB N1["Node"] --> N2["Node"] --> N3["Node"] N1 -.-> AN["Active Node"] N2 -.-> AN N3 -.-> AN + + %% Nested Event Loop Node + subgraph EventLoopNode [Event Loop Node] + ELN_L["listener"] + ELN_SP["System Prompt
(Task)"] + ELN_EL["Event loop"] + ELN_C["Conversation"] + end end end diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 7ae5fc42..08e52da0 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -21,22 +21,24 @@ flowchart TB %% ========================================= %% SYSTEM NODES %% ========================================= - subgraph EventLoopNode [Event Loop Node] - ELN_L["listener"] - ELN_SP["System Prompt
(Task)"] - ELN_EL["Event loop"] - ELN_C["Conversation"] - end - subgraph WorkerBees [Worker Bees] WB_C["Conversation"] WB_SP["System prompt"] + subgraph Graph [Graph] direction TB N1["Node"] --> N2["Node"] --> N3["Node"] N1 -.-> AN["Active Node"] N2 -.-> AN N3 -.-> AN + + %% Nested Event Loop Node + subgraph EventLoopNode [Event Loop Node] + ELN_L["listener"] + ELN_SP["System Prompt
(Task)"] + ELN_EL["Event loop"] + ELN_C["Conversation"] + end end end @@ -125,13 +127,13 @@ flowchart TB ### Key Subsystems -| Subsystem | Role | Description | -| --- | --- | --- | -| **Event Loop Node** | Entry point | Listens for external events (schedulers, webhooks, SSE), triggers the event loop, and spawns sub-agents. Its conversation mirrors the Worker Bees conversation for context continuity. | -| **Worker Bees** | Execution | A graph of nodes that execute the actual work. Each node in the graph can become the Active Node. Workers maintain their own conversation and system prompt, and read/write to shared memory. | -| **Judge** | Evaluation | Evaluates Worker Bee output against criteria (aligned with Worker system prompt) and principles (aligned with Queen Bee system prompt). Runs on a scheduled event loop and escalates to the Queen Bee when needed. | -| **Queen Bee** | Oversight | The orchestration layer. Subscribes to Active Node events via the Event Bus, receives escalation reports from the Judge, and has read/write access to shared memory and credentials. Users can talk directly to the Queen Bee. | -| **Infra** | Services | Shared infrastructure: Tool Registry (assigned to Event Loop Nodes), Write-through Conversation Memory (logs across RAM and disk), Shared Memory (state on disk), Event Bus (pub/sub in RAM), Credential Store (encrypted on disk or cloud), and Sub Agents. | +| Subsystem | Role | Description | +| ------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Event Loop Node** | Entry point | Listens for external events (schedulers, webhooks, SSE), triggers the event loop, and spawns sub-agents. Its conversation mirrors the Worker Bees conversation for context continuity. | +| **Worker Bees** | Execution | A graph of nodes that execute the actual work. Each node in the graph can become the Active Node. Workers maintain their own conversation and system prompt, and read/write to shared memory. | +| **Judge** | Evaluation | Evaluates Worker Bee output against criteria (aligned with Worker system prompt) and principles (aligned with Queen Bee system prompt). Runs on a scheduled event loop and escalates to the Queen Bee when needed. | +| **Queen Bee** | Oversight | The orchestration layer. Subscribes to Active Node events via the Event Bus, receives escalation reports from the Judge, and has read/write access to shared memory and credentials. Users can talk directly to the Queen Bee. | +| **Infra** | Services | Shared infrastructure: Tool Registry (assigned to Event Loop Nodes), Write-through Conversation Memory (logs across RAM and disk), Shared Memory (state on disk), Event Bus (pub/sub in RAM), Credential Store (encrypted on disk or cloud), and Sub Agents. | ### Data Flow Patterns diff --git a/docs/roadmap.md b/docs/roadmap.md index f9708001..5e86b2d0 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -19,22 +19,24 @@ flowchart TB %% ========================================= %% SYSTEM NODES %% ========================================= - subgraph EventLoopNode [Event Loop Node] - ELN_L["listener"] - ELN_SP["System Prompt
(Task)"] - ELN_EL["Event loop"] - ELN_C["Conversation"] - end - subgraph WorkerBees [Worker Bees] WB_C["Conversation"] WB_SP["System prompt"] + subgraph Graph [Graph] direction TB N1["Node"] --> N2["Node"] --> N3["Node"] N1 -.-> AN["Active Node"] N2 -.-> AN N3 -.-> AN + + %% Nested Event Loop Node + subgraph EventLoopNode [Event Loop Node] + ELN_L["listener"] + ELN_SP["System Prompt
(Task)"] + ELN_EL["Event loop"] + ELN_C["Conversation"] + end end end