You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/introduction/hello-world.mdx
+33-25Lines changed: 33 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,31 +3,30 @@ title: "Build Hello World"
3
3
description: "Start building your own agent with a simple Hello World example"
4
4
---
5
5
6
-
Now that your BeeAI Platform is up and running, and you have a basic understanding of how to run the agent via either the GUI or CLI, let’s get to some coding.
6
+
Now that your BeeAI Platform is up and running, and you know how to run an agent via the GUI or CLI, it’s time to create your first agent.
7
7
8
-
To build an agent that automatically appears in the platform, all you need to do is use the BeeAI SDK library, which handles the registration process for you.
9
-
10
-
Although building a “Hello World” agent is straightforward, we’ve streamlined the process for you with a starter repository that you can begin editing right away.
8
+
With the BeeAI SDK, you can build an agent that automatically registers with the platform — no extra setup required.
11
9
10
+
To make things even easier, we’ve provided a starter repository. You can clone it and start coding immediately, so you can focus on your agent logic instead of boilerplate setup.
12
11
13
12
## Prerequisites
14
13
15
-
- BeeAI Platform installed (see [Quickstart](/introduction/quickstart))
1. Go to [the template repository](https://github.com/i-am-bee/beeai-platform-agent-starter)
29
+
1. Go to the [template repository](https://github.com/i-am-bee/beeai-platform-agent-starter)
31
30
2. Click "Use this template" → "Create a new repository"
32
31
3. Clone your new repository locally
33
32
</Tab>
@@ -40,9 +39,17 @@ cd my-agent
40
39
uv run server
41
40
```
42
41
42
+
<Tip>
43
+
**Enable auto-reload during development:** Add `watchfiles` to automatically restart your server when code changes:
44
+
```bash
45
+
uv run watchfiles beeai_agents.agent.run
46
+
```
47
+
</Tip>
48
+
43
49
</Step>
44
-
<Steptitle="Then in another terminal">
50
+
<Steptitle="Run your agent">
45
51
52
+
In another terminal:
46
53
47
54
```bash
48
55
beeai run example_agent "Alice"
@@ -52,13 +59,13 @@ beeai run example_agent "Alice"
52
59
53
60
You should see: "Ciao Alice!" 🎉
54
61
55
-
With your first agent up and running, you can now modify the code to do whatever you want.
62
+
With your first agent running, you can now modify it to do anything you want.
56
63
57
64
## Implement Your Agent Logic
58
65
59
-
Navigate to [src/beeai_agents/agent.py](https://github.com/i-am-bee/beeai-platform-agent-starter/blob/main/src/beeai_agents/agent.py) and replace the example with your agent implementation.
66
+
Navigate to [src/beeai_agents/agent.py](https://github.com/i-am-bee/beeai-platform-agent-starter/blob/main/src/beeai_agents/agent.py) and replace the example with your agent logic.
60
67
61
-
The example implementation doesn’t do much. It’s intended purely for demonstration purposes.
68
+
The starter example is minimal and intended for demonstration purposes only:
62
69
63
70
```python
64
71
import os
@@ -98,7 +105,7 @@ Add the `@server.agent` decorator to your function so the platform recognizes it
98
105
</Step>
99
106
100
107
<Steptitle="Name your agent">
101
-
Whatever you name the function will be the agent’s name in the platform.
108
+
The function name becomes the agent’s name in the platform.
102
109
</Step>
103
110
104
111
<Steptitle="Describe your agent">
@@ -127,19 +134,20 @@ The agent function should be asynchronous and yield results as they’re ready.
127
134
128
135
## Starting from Scratch
129
136
130
-
Want to build your agent without using our starter repo?
131
-
132
-
All you need to do is set up an empty Python project, install `beeai-sdk` as a dependency, and then use the code above.
137
+
If you prefer not to use the starter repo:
138
+
- Create an empty Python project
139
+
- Install `beeai-sdk`
140
+
- Copy the example code above
133
141
134
-
There’s no magic in the starter repo. It simply provides some basic Python scaffolding, a simple GitHub workflow, and a Dockerfile, most of which are entirely optional.
142
+
The starter repo mainly provides basic scaffolding, a GitHub workflow, and a Dockerfile — all optional.
135
143
136
144
## Next Steps
137
145
138
-
Now that you've built your Hello World agent, you can:
139
-
-Explore how to provide more [GUI configuration](/build-agents/agent-details)options through the concept of`AgentDetail`
140
-
- Leverage [LLM Access](/build-agents/llm-access) in your agent
141
-
-Understand how [Messages](/build-agents/messages)are used for communication between Agent and the Client
142
-
- Build beautiful GUI for your agents with [GUI Components](/build-agents/gui-components)
143
-
- Request structured input from the user using[forms](/build-agents/forms)
144
-
-Learn how to work with [files](/build-agents/files)
145
-
-[Share your agent](/how-to/share-agents) with the others
146
+
After building your Hello World agent, you can:
147
+
-Provide more [GUI configuration](/build-agents/agent-details)via`AgentDetail`
148
+
- Leverage [LLM Access](/build-agents/llm-access)
149
+
-Explore [Messages](/build-agents/messages) for communication between agents and clients
150
+
- Build beautiful GUIs for your agents with [GUI components](/build-agents/gui-components)
0 commit comments