@@ -11,7 +11,7 @@ A proof-of-concept implementation of a multi-agent task management system that d
1111 - Automatic pool management and cleanup
1212 - Agent lifecycle management (create, destroy, acquire, release)
1313
14- - ** Task Runner ** : Handles task scheduling and execution with robust controls
14+ - ** Task Manager ** : Handles task scheduling and execution with robust controls
1515
1616 - Task scheduling with configurable intervals
1717 - Permission-based task management
@@ -27,6 +27,42 @@ A proof-of-concept implementation of a multi-agent task management system that d
2727
2828## Architecture
2929
30+ ``` mermaid
31+ graph TD
32+ BS[Bee Supervisor System]
33+
34+ BS --> AR[Agent Registry]
35+ BS --> TR[Task Manager]
36+
37+ %% Agent Registry Section
38+ AR --> AT[Agent Types]
39+ AR --> AP[Agent Pool]
40+ AR --> AL[Agent Lifecycle]
41+
42+ %% Agent Lifecycle Core Functions
43+ AL --> Create[Create]
44+ AL --> Acquire[Acquire]
45+ AL --> Release[Release]
46+
47+ %% Task Manager Section
48+ TR --> TS[Task Scheduler]
49+ TR --> TE[Task Executor]
50+ TR --> TH[Task History]
51+
52+ %% Integration
53+ AR <--> TR
54+
55+ classDef default fill:#f9f9f9,stroke:#333,stroke-width:1px,color:black
56+ classDef registry fill:#e1f5fe,stroke:#0288d1,stroke-width:2px,color:black
57+ classDef runner fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:black
58+
59+ class BS default
60+ class AR,AT,AP,AL,Create,Acquire,Release registry
61+ class TR,TS,TE,TH runner
62+ ```
63+
64+
65+
3066The system consists of two main components:
3167
3268### Agent Registry
@@ -40,7 +76,7 @@ Key features:
4076- Agent lifecycle hooks
4177- Dynamic scaling of agent pools
4278
43- ### Task Runner
79+ ### Task Manager
4480
4581Handles task execution and scheduling.
4682
@@ -68,6 +104,54 @@ The following showcase demonstrates the system's capabilities through a poetry g
681044 . ** Task Execution** : Each agent generates a unique poem for its assigned topic
691055 . ** Result Collection** : The supervisor collects and presents all generated poems
70106
107+ ``` mermaid
108+ sequenceDiagram
109+ participant S as Supervisor
110+ participant AR as Agent Registry
111+ participant P as Poet Pool
112+ participant A as Poet Agents
113+ participant T as Task Manager
114+ participant R as Results
115+
116+ %% Agent Type Registration and Pool Creation
117+ S->>AR: Register "poet" agent type
118+ AR->>P: Initialize pool (size: 5)
119+ loop Create 5 Poet Agents
120+ AR->>A: Create poet agent
121+ A-->>P: Add to pool
122+ end
123+ P-->>AR: Pool ready (5 agents)
124+
125+ %% Task Distribution
126+ rect rgb(248, 248, 248)
127+ Note over S,R: <b>Poetry Generation Process</b>
128+
129+ %% Schedule Tasks
130+ S->>T: <b>Schedule "Bee" poem task</b>
131+ S->>T: <b>Schedule "Hive" poem task</b>
132+ S->>T: <b>Schedule "Queen" poem task</b>
133+ S->>T: <b>Schedule "Sun" poem task</b>
134+ S->>T: <b>Schedule "Flowers" poem task</b>
135+
136+ %% Task Execution
137+ loop For each topic
138+ T->>AR: <b>Request available poet</b>
139+ AR->>P: <b>Get poet from pool</b>
140+ P-->>T: <b>Provide poet agent</b>
141+ T->>A: <b>Generate poem for topic</b>
142+ A-->>R: <b>Submit generated poem</b>
143+ T->>AR: <b>Release poet agent</b>
144+ AR->>P: <b>Return poet to pool</b>
145+ end
146+ end
147+
148+ %% Result Collection
149+ R->>S: Collect all poems
150+ S->>S: Present poems collection
151+
152+ Note over S,R: Final output: 5 poems (Bee, Hive, Queen, Sun, Flowers)
153+ ```
154+
71155### Run
72156
73157` npm start <<< "Hi, can you create poem about each of these topics: bee, hive, queen, sun, flowers?" `
0 commit comments