Alexible, scalable and customizable agent to do your bidding.
- This code is NOT production ready. This package has been released as-is to enable collaboration and development.
- 0.1.0 will be the first official alpha release!
- Simple and extensible
- Customizable to your use case
- Retrievable memory and document store
- Serverless artchitecture, deployable in minutes at scale with Cloudflare and Supabase
- Multi-agent and room support
- Reflection and summarization
- Goal-directed behavior
npm install bgent
# evaluation mode
npm run shell
# for development
npm run dev # start the server
npm run shell:dev # start the shell in another terminal
This library uses Supabase as a database. You can set up a free account at supabase.io and create a new project.
const runtime = new BgentRuntime({
serverUrl: "https://api.openai.com/v1",
token: process.env.OPENAI_API_KEY,
supabase: createClient(
process.env.SUPABASE_URL,
process.env.SUPABASE_ANON_KEY,
),
});
There are two examples which are set up for cloudflare in src/agents
- The
simple
example is a simple agent that can be deployed to cloudflare workers - The
cj
example is a more complex agent that has the ability to introduce users to each other
Actions come in two flavors -- generic actions
which run at any time they are considered valid, and evaluators
which run when a condition is met at the end of a conversation turn.
You can pass your own custom actions and evaluators into the BgentRuntime instance. Check out the src/agents/cj
example for a simple example of how to do this.
Deploying to cloudflare is easy. npm run deploy
will walk you through a deployment with wrangler, Cloudflare's deployment tool.
If you like this library and want to contribute in any way, please feel free to submit a PR and I will review it. Please note that the goal here is simplicity and accesibility, using common language and few dependencies.