Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i-am-bee/bee-agent-framework
The framework for building scalable agentic applications.
https://github.com/i-am-bee/bee-agent-framework
agents ai bee-agent-framework llm-agent
Last synced: about 17 hours ago
JSON representation
The framework for building scalable agentic applications.
- Host: GitHub
- URL: https://github.com/i-am-bee/bee-agent-framework
- Owner: i-am-bee
- License: apache-2.0
- Created: 2024-08-23T14:03:06.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-11T17:01:59.000Z (5 days ago)
- Last Synced: 2024-11-11T18:18:32.134Z (5 days ago)
- Topics: agents, ai, bee-agent-framework, llm-agent
- Language: TypeScript
- Homepage: https://i-am-bee.github.io/bee-agent-framework/
- Size: 1.21 MB
- Stars: 915
- Watchers: 20
- Forks: 91
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
Bee Agent Framework
Open-source framework for building, deploying, and serving powerful agentic workflows at scale.
The Bee Agent Framework makes it easy to build scalable agent-based workflows with your model of choice. The framework is been designed to perform robustly with [IBM Granite](https://www.ibm.com/granite?adoper=255252_0_LS1) and [Llama 3.x](https://ai.meta.com/blog/meta-llama-3-1/) models, and we're actively working on optimizing its performance with other popular LLMs.
Our goal is to empower developers to adopt the latest open-source and proprietary models with minimal changes to their current agent implementation.## Key Features
- π€ **AI agents**: Use our powerful [Bee agent](/docs/agents.md) refined for Llama 3.1, [Granite Agent](/docs/agents.md#granitebeeagent-for-granite-30) for Granite 3.0, or [build your own](/docs/agents.md).
- π οΈ **Tools**: Use our [built-in tools](/docs/tools.md) or [create your own](/docs/tools.md) in Javascript/Python.
- π©βπ» **Code interpreter**: Run code safely in a [sandbox container](https://github.com/i-am-bee/bee-code-interpreter).
- πΎ **Memory**: Multiple [strategies](/docs/memory.md) to optimize token spend.
- βΈοΈ **Serialization** Handle complex agentic workflows and easily pause/resume them [without losing state](/docs/serialization.md).
- π **Instrumentation**: Use [Instrumentation](/docs/instrumentation.md) based on [Emitter](/docs/emitter.md) to have full visibility of your agentβs inner workings.
- ποΈ **Production-level** control with [caching](/docs/cache.md) and [error handling](/docs/errors.md).
- π **API**: Integrate your agents using an OpenAI-compatible [Assistants API](https://github.com/i-am-bee/bee-api) and [Python SDK](https://github.com/i-am-bee/bee-python-sdk).
- π₯οΈ **Chat UI**: Serve your agent to users in a [delightful UI](https://github.com/i-am-bee/bee-ui) with built-in transparency, explainability, and user controls.
- ... more on our [Roadmap](#roadmap)## Getting started
> [!TIP]
>
> π Would you like a fully set-up TypeScript project with Bee, Code Interpreter, and Observability? Check out our [Bee Framework Starter](https://github.com/i-am-bee/bee-agent-framework-starter).> [!TIP]
>
> π Would you like to work with Bee in your web browser? See [Bee Stack](https://github.com/i-am-bee/bee-stack)### Installation
```shell
npm install bee-agent-framework
```or
```shell
yarn add bee-agent-framework
```### Example
```ts
import { BeeAgent } from "bee-agent-framework/agents/bee/agent";
import { OllamaChatLLM } from "bee-agent-framework/adapters/ollama/chat";
import { TokenMemory } from "bee-agent-framework/memory/tokenMemory";
import { DuckDuckGoSearchTool } from "bee-agent-framework/tools/search/duckDuckGoSearch";
import { OpenMeteoTool } from "bee-agent-framework/tools/weather/openMeteo";const llm = new OllamaChatLLM(); // default is llama3.1 (8B), it is recommended to use 70B model
const agent = new BeeAgent({
llm, // for more explore 'bee-agent-framework/adapters'
memory: new TokenMemory({ llm }), // for more explore 'bee-agent-framework/memory'
tools: [new DuckDuckGoSearchTool(), new OpenMeteoTool()], // for more explore 'bee-agent-framework/tools'
});const response = await agent
.run({ prompt: "What's the current weather in Las Vegas?" })
.observe((emitter) => {
emitter.on("update", async ({ data, update, meta }) => {
console.log(`Agent (${update.key}) π€ : `, update.value);
});
});console.log(`Agent π€ : `, response.result.text);
```β‘οΈ See a more [advanced example](/examples/agents/bee.ts).
β‘οΈ you can run this example after local installation, using the command `yarn start examples/agents/simple.ts`
> [!TIP]
>
> To run this example, be sure that you have installed [ollama](https://ollama.com) with the [llama3.1](https://ollama.com/library/llama3.1) model downloaded.> [!TIP]
>
> Documentation is available at https://i-am-bee.github.io/bee-agent-framework/### Local Installation
> [!NOTE]
>
> `yarn` should be installed via Corepack ([tutorial](https://yarnpkg.com/corepack))1. Clone the repository `git clone [email protected]:i-am-bee/bee-agent-framework`.
2. Install dependencies `yarn install`.
3. Create `.env` (from `.env.template`) and fill in missing values (if any).
4. Start the agent `yarn run start:bee` (it runs `/examples/agents/bee.ts` file).β‘οΈ All examples can be found in the [examples](/examples) directory.
β‘οΈ To run an arbitrary example, use the following command `yarn start examples/agents/bee.ts` (just pass the appropriate path to the desired example).
### π¦ Modules
The source directory (`src`) provides numerous modules that one can use.
| Name | Description |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| [**agents**](/docs/agents.md) | Base classes defining the common interface for agent. |
| [**llms**](/docs/llms.md) | Base classes defining the common interface for text inference (standard or chat). |
| [**template**](/docs/templates.md) | Prompt Templating system based on `Mustache` with various improvements. |
| [**memory**](/docs/memory.md) | Various types of memories to use with agent. |
| [**tools**](/docs/tools.md) | Tools that an agent can use. |
| [**cache**](/docs/cache.md) | Preset of different caching approaches that can be used together with tools. |
| [**errors**](/docs/errors.md) | Error classes and helpers to catch errors fast. |
| [**adapters**](/docs/llms.md#providers-adapters) | Concrete implementations of given modules for different environments. |
| [**logger**](/docs/logger.md) | Core component for logging all actions within the framework. |
| [**serializer**](/docs/serialization.md) | Core component for the ability to serialize/deserialize modules into the serialized format. |
| [**version**](/docs/version.md) | Constants representing the framework (e.g., latest version) |
| [**emitter**](/docs/emitter.md) | Bringing visibility to the system by emitting events. |
| **internals** | Modules used by other modules within the framework. |To see more in-depth explanation see [overview](/docs/overview.md).
## Tutorials
π§ Coming soon π§
## Roadmap
- Bee agent performance optimization with additional models
- Examples, tutorials, and docs
- Improvements to building custom agents
- Multi-agent orchestration## Contribution guidelines
The Bee Agent Framework is an open-source project and we β€οΈ contributions.
If you'd like to contribute to Bee, please take a look at our [contribution guidelines](./CONTRIBUTING.md).
### Bugs
We are using [GitHub Issues](https://github.com/i-am-bee/bee-agent-framework/issues) to manage our public bugs. We keep a close eye on this, so before filing a new issue, please check to make sure it hasn't already been logged.
### Code of conduct
This project and everyone participating in it are governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please read the [full text](./CODE_OF_CONDUCT.md) so that you can read which actions may or may not be tolerated.
## Legal notice
All content in these repositories including code has been provided by IBM under the associated open source software license and IBM is under no obligation to provide enhancements, updates, or support. IBM developers produced this code as an open source project (not as an IBM product), and IBM makes no assertions as to the level of quality nor security, and will not be maintaining this code going forward.
## Contributors
Special thanks to our contributors for helping us improve Bee Agent Framework.