Skip to content

Commit 5ec7e7c

Browse files
committed
refine examples/babyagi
1 parent f7678d1 commit 5ec7e7c

File tree

3 files changed

+163
-36
lines changed

3 files changed

+163
-36
lines changed

docs/Examples/BabyAGI.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,28 @@
22

33
[BabyAGI](https://github.com/yoheinakajima/babyagi) was one of the first multi-agent systems that used LLMs for performing useful tasks. It makes use of several different types of agents, such as a task creation agent and an execution agent, as shown in the diagram below.
44

5-
![](/img/babyagi.png)
5+
![BabyAGI Architecture](/img/babyagi.png)
66

77
However, here's Yohei (creator of BabyAGI) admitting that [BabyAGI isn't a true multi-agent system](https://x.com/yoheinakajima/status/1781183534998380576) since the agents use the same LLM and code base, and run on the same server.
88

9-
Using the Naptha SDK and node infrastructure, we implemented BabyAGI as a true multi-agent system for the first time. You can check out a demo video of this multi-node workflow [here](https://www.youtube.com/watch?v=nzV04zOA0f0).
9+
Using the Naptha SDK and node infrastructure, we implemented BabyAGI as a true multi-agent system for the first time. You can check out a demo video of this multi-node workflow [here](https://www.youtube.com/watch?v=nzV04zOA0f0).
10+
11+
<iframe width="560" height="315" src="https://www.youtube.com/embed/nzV04zOA0f0" title="BabyAGI Multi-Node Demo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
1012

1113
## Prerequisities
1214

13-
Make sure you have the Naptha SDK installed.
15+
Make sure you have the Naptha SDK [installed](/docs/GettingStarted/Installation).
1416

1517
## Modules Used
1618

1719
The BabyAGI multi-node workflow is made up of the following components, which you can find on the Naptha GitHub:
20+
| Module | Description | Repository |
21+
|--------|-------------|------------|
22+
| Orchestrator Flow | Multi-agent task solving across a network of multiple nodes. | [GitHub](https://github.com/NapthaAI/babyagi) |
23+
| Task Initiator | BabyAGI task initiator agent. | [GitHub](https://github.com/NapthaAI/babyagi_task_initiator) |
24+
| Task Executor | BabyAGI task executor agent. | [GitHub](https://github.com/NapthaAI/babyagi_task_executor) |
25+
| Task Finalizer | BabyAGI task finalizer agent. | [GitHub](https://github.com/NapthaAI/babyagi_task_finalizer) |
1826

19-
* [BabyAGI Orchestrator Flow](https://github.com/NapthaAI/babyagi)
20-
* [BabyAGI Task Initiator](https://github.com/NapthaAI/babyagi_task_initiator)
21-
* [BabyAGI Task Finalizer](https://github.com/NapthaAI/babyagi_task_finalizer)
22-
* [BabyAGI Task Executor](https://github.com/NapthaAI/babyagi_task_executor)
2327

2428
## Run
2529

@@ -29,4 +33,13 @@ You can run the BabyAGI flow from the SDK using the following command:
2933
naptha run babyagi -p "objective='Research the history of football'" --worker_nodes "http://node.naptha.ai:7001,http://node1.naptha.ai:7001"
3034
```
3135

32-
This runs the flow across three nodes in total - one orchestrator node (whichever you have set as the ```NODE_URL``` in the .env file of the Naptha SDK), and two worker nodes (that you have set using the ```--worker_nodes``` flag).
36+
### Configuration Breakdown:
37+
- `objective`: Your desired research or task objective
38+
- `worker_nodes`: Comma-separated list of worker node URLs
39+
40+
This runs the flow across three nodes in total - one orchestrator node (whichever you have set as the ```NODE_URL``` in the .env file of the Naptha SDK),
41+
and two worker nodes (that you have set using the ```--worker_nodes``` flag).
42+
43+
:::tip
44+
Start with simple objectives to understand the workflow, then gradually increase complexity as you become familiar with the system.
45+
:::

docs/Overview.md

Lines changed: 136 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,46 +19,157 @@ Distributed multi-agent workflows can run on one or more Naptha nodes (rather th
1919

2020
Overall, the Naptha web not only enables growth *within* organizations and platforms, but also *across* various organizations and platforms.
2121

22-
<div style={{
23-
display: 'grid',
24-
gridTemplateColumns: 'repeat(2, 1fr)',
22+
<div style={{
23+
display: 'grid',
24+
gridTemplateColumns: 'repeat(2, 1fr)',
2525
gap: '1rem',
2626
marginTop: '2rem'
2727
}}>
2828
<a href="/docs/Examples/HelloWorld" style={{
29+
display: 'block',
30+
position: 'relative',
31+
margin: '0.5rem 0',
32+
padding: '1rem 1.5rem',
33+
backgroundColor: 'white',
34+
border: '1px solid rgba(17, 24, 39, 0.1)',
35+
borderRadius: '0.75rem',
36+
overflow: 'hidden',
37+
width: '100%',
38+
cursor: 'pointer',
2939
textDecoration: 'none',
3040
color: 'inherit',
31-
padding: '1.5rem',
32-
backgroundColor: 'white',
33-
border: '1px solid #eee',
34-
borderRadius: '8px'
41+
transition: 'border-color 0.2s ease'
3542
}}>
36-
<h3 style={{ margin: 0, marginBottom: '0.5rem' }}>🚀 Quickstarts</h3>
37-
<p style={{ margin: 0 }}>Get started in 2 minutes with our example agents and workflows</p>
43+
<div style={{ fontSize: '1.5rem', marginBottom: '0.25rem' }}>
44+
🚀
45+
</div>
46+
<h2 style={{
47+
fontSize: '1rem',
48+
fontWeight: 600,
49+
color: '#111827',
50+
marginTop: '0.5rem',
51+
marginBottom: '0.25rem'
52+
}}>
53+
Quickstarts
54+
</h2>
55+
<p style={{
56+
fontSize: '0.875rem',
57+
lineHeight: '1.25rem',
58+
color: '#4B5563',
59+
margin: 0
60+
}}>
61+
Get started in 2 minutes with our example agents and workflows
62+
</p>
3863
</a>
39-
40-
<a href="/docs/NapthaModules/overview" style={{
64+
65+
<a href="/NapthaModules/overview" style={{
66+
display: 'block',
67+
position: 'relative',
68+
margin: '0.5rem 0',
69+
padding: '1rem 1.5rem',
70+
backgroundColor: 'white',
71+
border: '1px solid rgba(17, 24, 39, 0.1)',
72+
borderRadius: '0.75rem',
73+
overflow: 'hidden',
74+
width: '100%',
75+
cursor: 'pointer',
4176
textDecoration: 'none',
4277
color: 'inherit',
43-
padding: '1.5rem',
44-
backgroundColor: 'white',
45-
border: '1px solid #eee',
46-
borderRadius: '8px'
78+
transition: 'border-color 0.2s ease'
4779
}}>
48-
<h3 style={{ margin: 0, marginBottom: '0.5rem' }}>🤖 Naptha Modules</h3>
49-
<p style={{ margin: 0 }}>Build and deploy agents, tools, environments, and more</p>
80+
<div style={{ fontSize: '1.5rem', marginBottom: '0.25rem' }}>
81+
🤖
82+
</div>
83+
<h2 style={{
84+
fontSize: '1rem',
85+
fontWeight: 600,
86+
color: '#111827',
87+
marginTop: '0.5rem',
88+
marginBottom: '0.25rem'
89+
}}>
90+
Naptha Modules
91+
</h2>
92+
<p style={{
93+
fontSize: '0.875rem',
94+
lineHeight: '1.25rem',
95+
color: '#4B5563',
96+
margin: 0
97+
}}>
98+
Build and deploy agents, tools, environments, and more
99+
</p>
50100
</a>
51-
52-
<a href="/docs/NapthaNodes/what-are-nodes" style={{
101+
102+
<a href="/NapthaNodes/what-are-nodes" style={{
103+
display: 'block',
104+
position: 'relative',
105+
margin: '0.5rem 0',
106+
padding: '1rem 1.5rem',
107+
backgroundColor: 'white',
108+
border: '1px solid rgba(17, 24, 39, 0.1)',
109+
borderRadius: '0.75rem',
110+
overflow: 'hidden',
111+
width: '100%',
112+
cursor: 'pointer',
53113
textDecoration: 'none',
54114
color: 'inherit',
55-
padding: '1.5rem',
56-
backgroundColor: 'white',
57-
border: '1px solid #eee',
58-
borderRadius: '8px'
115+
transition: 'border-color 0.2s ease'
59116
}}>
60-
<h3 style={{ margin: 0, marginBottom: '0.5rem' }}>🌐 Naptha Nodes</h3>
61-
<p style={{ margin: 0 }}>Run your own node and join the decentralized AI network</p>
117+
<div style={{ fontSize: '1.5rem', marginBottom: '0.25rem' }}>
118+
🌐
119+
</div>
120+
<h2 style={{
121+
fontSize: '1rem',
122+
fontWeight: 600,
123+
color: '#111827',
124+
marginTop: '0.5rem',
125+
marginBottom: '0.25rem'
126+
}}>
127+
Naptha Nodes
128+
</h2>
129+
<p style={{
130+
fontSize: '0.875rem',
131+
lineHeight: '1.25rem',
132+
color: '#4B5563',
133+
margin: 0
134+
}}>
135+
Run your own node and join the decentralized AI network
136+
</p>
62137
</a>
63138

139+
<a href="/GettingStarted/Installation" style={{
140+
display: 'block',
141+
position: 'relative',
142+
margin: '0.5rem 0',
143+
padding: '1rem 1.5rem',
144+
backgroundColor: 'white',
145+
border: '1px solid rgba(17, 24, 39, 0.1)',
146+
borderRadius: '0.75rem',
147+
overflow: 'hidden',
148+
width: '100%',
149+
cursor: 'pointer',
150+
textDecoration: 'none',
151+
color: 'inherit',
152+
transition: 'border-color 0.2s ease'
153+
}}>
154+
<div style={{ fontSize: '1.5rem', marginBottom: '0.25rem' }}>
155+
📚
156+
</div>
157+
<h2 style={{
158+
fontSize: '1rem',
159+
fontWeight: 600,
160+
color: '#111827',
161+
marginTop: '0.5rem',
162+
marginBottom: '0.25rem'
163+
}}>
164+
Documentation
165+
</h2>
166+
<p style={{
167+
fontSize: '0.875rem',
168+
lineHeight: '1.25rem',
169+
color: '#4B5563',
170+
margin: 0
171+
}}>
172+
Explore our comprehensive guides and references
173+
</p>
174+
</a>
64175
</div>

sidebars.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ const sidebars: SidebarsConfig = {
2222
label: 'Examples',
2323
items: [
2424
'Examples/HelloWorld',
25-
// 'Examples/GenerateImage',
26-
// 'Examples/SimpleRAG',
25+
'Examples/GenerateImage',
26+
'Examples/Image2Image',
27+
'Examples/MultiOlas',
2728
'Examples/MultiplayerChat',
28-
'Examples/BabyAGI',
29+
'Examples/OlasPrediction',
30+
'Examples/SimpleRAG',
31+
'Examples/BabyAGI',
2932
],
3033
},
3134
{

0 commit comments

Comments
 (0)