Overview of BeeAI Framework Caching
mainBaseCache interface, allowing different implementations to be used interchangeably.repository·main·Indexed 25 days ago
https://github.com/i-am-bee/beeai-frameworkA comprehensive toolkit for building production-ready, autonomous multi-agent systems in Python and TypeScript. It provides modular components for reasoning, tool usage, RAG, and complex workflow orchestration, including support for ReAct agents, various memory management strategies (sliding window, token-based, summarization), and integration with LLM providers like Amazon Bedrock, Ollama, and watsonx. The framework also supports exposing agents and tools via the Agent Communication Protocol (ACP) and Model Context Protocol (MCP).
BaseCache interface, allowing different implementations to be used interchangeably.The Backend module provides a unified interface for interacting with various AI model types. It uses a provider-based architecture, which allows developers to switch between different AI service providers (e.g., OpenAI, Anthropic) without changing the core application logic.
Currently supported model types include:
ChatModel class)EmbeddingModel class)Note: Audio and Image models are planned for future support. The backend is available in both Python and TypeScript.
The Backend module provides a unified interface for interacting with various AI model types in the BeeAI framework. It uses a provider-based architecture, which allows you to switch between different AI service providers without changing your core application logic.
Currently, the Backend module supports:
ChatModel classEmbeddingModel classNote: Audio and Image models are planned for future support.
This module is available in both Python and TypeScript.
Tools extend agent capabilities beyond text processing, allowing interaction with external systems, data sources, and execution of actions. They are supported in both Python and TypeScript.
| Tool | Description |
|---|---|
MCP | Discover and use tools exposed by arbitrary MCP Server |
Think | Gives an agent a place to think |
Handoff | Delegates a task to an expert agent |
OpenAPI | Consume external APIs |
OpenMeteo | Retrieve weather information for specific locations and dates |
DuckDuckGo | Search for data on DuckDuckGo |
Wikipedia | Search for data on Wikipedia |
VectorStoreSearch | Search for documents in a vector database |
Python | Run arbitrary Python code in a sandboxed environment |
Sandbox | Run custom Python functions in a sandboxed environment |
Shell | Run a command and capture its output (pluggable backend) |
FileRead | Read a text file via a pluggable file backend |
FileEdit | Overwrite or search-and-replace a text file with a unified diff |
Glob | List files matching a glob pattern |
Grep | Recursively search files for a regex (uses ripgrep when available) |
BeeAI Framework is a toolkit for building autonomous agents and multi-agent systems. Key capabilities include:
Memory in BeeAI allows agents to store, recall, and utilize information from past interactions to maintain context. The framework provides four primary memory strategies:
| Type | Description |
|---|---|
UnconstrainedMemory | Unlimited storage for all messages |
SlidingMemory | Keeps only the most recent $k$ entries |
TokenMemory | Manages token usage to stay within model context limits |
SummarizeMemory | Maintains a single summarization of the conversation |
Supported in both Python and TypeScript.
BeeAI framework provides several memory strategies to allow agents to store, recall, and utilize information from past interactions. These implementations are supported in both Python and TypeScript.
| Type | Description |
|---|---|
UnconstrainedMemory | Unlimited storage for all messages |
SlidingMemory | Keeps only the most recent $k$ entries |
TokenMemory | Manages token usage to stay within model context limits |
SummarizeMemory | Maintains a single summarization of the conversation |
The BeeAI Framework provides several key components for building RAG pipelines, often acting as adapters for LangChain or Llama-Index:
| Component | Description | Compatibility |
|---|---|---|
| Document Loaders | Loads content from formats like PDFs, web pages, and text files. | LangChain (transitioning to BeeAI) |
| Text Splitters | Splits long documents into chunks (e.g., fixed length or context-preserving). | LangChain (transitioning to BeeAI) |
| Document | The basic data structure for text, metadata, and retrieval scores. | BeeAI |
| Vector Store | Stores document embeddings and enables semantic similarity retrieval. | LangChain (transitioning to BeeAI/Llama-Index) |
| Document Processors | Refines documents during the lifecycle (e.g., reranking and filtering). | Llama-Index |
Serve module allows you to expose BeeAI Framework components (such as Tools, Agents, Chat Models, or Runnables) to external clients via a server. It supports various protocols including A2A, MCP, Agent Stack, and OpenAI APIs.The python/examples directory contains various implementations demonstrating how to use the BeeAI Framework for building AI agents and applications. Key categories include:
The examples repository is organized into several functional areas to help you learn different parts of the framework: