Skip to content

Template to quickly start working with Bee Agent Framework.

Notifications You must be signed in to change notification settings

i-am-bee/beeai-framework-ts-starter

Repository files navigation

🐝 BeeAI Framework Starter

This starter template lets you quickly start working with the BeeAI Framework in a second.

📚 See the documentation to learn more.

✨ Key Features

📦 Requirements

🛠️ Getting started

  1. Clone this repository or use it as a template.
  2. Install dependencies npm ci.
  3. Configure your project by filling in missing values in the .env file (default LLM provider is locally hosted Ollama).
  4. 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.

🏗 Infrastructure

Note

Docker distribution with support for compose is required, the following are supported:

  • Docker
  • Rancher - macOS users may want to use VZ instead of QEMU
  • Podman - requires compose and rootful machine (if your current machine is rootless, please create a new one, also ensure you have enabled Docker compatibility mode).

🔒Code interpreter

The Bee Code Interpreter is a gRPC service that an agent uses to execute an arbitrary Python code safely.

Instructions

  1. Start all services related to the Code Interpreter npm run infra:start --profile=code_interpreter
  2. Run the agent npm run start src/agent_code_interpreter.ts

Note

Code Interpreter runs on http://127.0.0.1:50081.

🔎 Observability

Get complete visibility of the agent's inner workings via OpenInference Instrumentation for BeeAI.

Instructions

Please use node version >= 20 to run this example.

  1. (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.

  1. Run the agent npm run start src/agent_observe.ts
  2. 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.

About

Template to quickly start working with Bee Agent Framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published