This starter template lets you quickly start working with the BeeAI Framework in a second.
📚 See the documentation to learn more.
- 🔒 Safely execute an arbitrary Python Code via Bee Code Interpreter.
- 🔎 Get complete visibility into agents' decisions using our OpenInference Instrumentation for BeeAI package.
- 🚀 Fully fledged TypeScript project setup with linting and formatting.
- JavaScript runtime NodeJS > 18 (ideally installed via nvm).
- Container system like Rancher Desktop, Podman (VM must be rootfull machine) or Docker.
- LLM Provider either external WatsonX (OpenAI, Groq, ...) or local ollama.
- Clone this repository or use it as a template.
- Install dependencies
npm ci
. - Configure your project by filling in missing values in the
.env
file (default LLM provider is locally hostedOllama
). - Run the agent
npm run start src/agent.ts
To run an agent with a custom prompt, simply do this npm run start src/agent.ts <<< 'Hello Bee!'
🧪 More examples can be found here.
Tip
To use Bee agent with Python Code Interpreter refer to the Code Interpreter section.
Tip
To use Bee agent with OpenInference Instrumentation for BeeAI refer to the Observability section.
Note
Docker distribution with support for compose is required, the following are supported:
The Bee Code Interpreter is a gRPC service that an agent uses to execute an arbitrary Python code safely.
- Start all services related to the
Code Interpreter
npm run infra:start --profile=code_interpreter
- Run the agent
npm run start src/agent_code_interpreter.ts
Note
Code Interpreter runs on http://127.0.0.1:50081
.
Get complete visibility of the agent's inner workings via OpenInference Instrumentation for BeeAI.
Please use node version >= 20 to run this example.
- (Optional) In order to see spans in Phoenix, begin running a Phoenix server. This can be done in one command using docker.
docker run -p 6006:6006 -i -t arizephoenix/phoenix
or via the command line:
brew install i-am-bee/beeai/arize-phoenix
brew services start arize-phoenix
see https://docs.beeai.dev/observability/agents-traceability for more details.
- Run the agent
npm run start src/agent_observe.ts
- You should see your spans exported in your console. If you've set up a locally running Phoenix server, head to localhost:6006 to see your spans.