# BeeAI Framework

> Build production AI agents in Python or TypeScript with shared components

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: Python, TypeScript
- Licence: Apache-2.0
- Repository: https://github.com/i-am-bee/beeai-framework
- Website: https://framework.beeai.dev
- Canonical page: https://ai-tldr.dev/tools/beeai-framework/

## In short

BeeAI Framework is an open-source toolkit for building autonomous agents and multi-agent systems. It ships in both Python and TypeScript and shares a common set of components across the two languages, so teams can stay on the stack they already use. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Python, TypeScript and licensed Apache-2.0.

## Overview

BeeAI Framework is an open-source toolkit for building autonomous agents and multi-agent systems. It ships in both Python and TypeScript and shares a common set of components across the two languages, so teams can stay on the stack they already use.

It is aimed at developers who need to wire LLMs to tools, memory, and other agents in real applications rather than one-off scripts. The Backend module gives a single interface to many LLM providers, and built-in tools (web search, weather, code execution) and RAG support cover common agent needs.

As a general agent framework, it sits alongside other orchestration libraries: you define agents, give them tools and rules, and let them reason, act, and hand work off to each other. The experimental Requirement Agent adds rules that constrain agent behavior for more predictable runs across different models.

## What it does

- Write agents in Python or TypeScript with a shared component model across both languages
- Backend module connects to many LLM providers through one unified interface
- Built-in tools for web search, weather, and code execution, plus support for custom tools
- Requirement Agent lets you set rules an agent must follow for more predictable behavior
- RAG module for retrieval-augmented generation with vector stores and document processing
- Workflows, memory, and Mustache-based prompt templates for multi-agent systems

## Getting started

Install the package for your language, then create an agent that uses a chat model and tools. The example below uses the Python Requirement Agent.

1. Install (Python)

   Install the Python package from PyPI.

```bash
pip install beeai-framework
```

2. Install (TypeScript)

   Or install the TypeScript package from npm.

```bash
npm install beeai-framework
```

3. Create a Requirement Agent

   Give the agent a chat model and tools. ChatModel.from_name selects an LLM provider; this example uses a local Ollama model.

```python
import asyncio

from beeai_framework.agents.requirement import RequirementAgent
from beeai_framework.backend import ChatModel
from beeai_framework.tools.search.wikipedia import WikipediaTool
from beeai_framework.tools.think import ThinkTool

async def main() -> None:
    agent = RequirementAgent(
        llm=ChatModel.from_name("ollama:granite3.3:8b"),
        tools=[ThinkTool(), WikipediaTool()],
        role="Knowledge Specialist",
        instructions="Provide answers to general questions about the world.",
    )
    response = await agent.run("Tell me one famous landmark in Rome.")
    print("Agent:", response.last_message.text)

if __name__ == "__main__":
    asyncio.run(main())
```

## When to use it

- Build a multi-agent system where a main agent hands tasks off to specialist agents
- Connect an agent to multiple LLM providers behind one interface and swap models without rewriting code
- Add retrieval-augmented generation over your own documents using the RAG module
- Constrain agent behavior with rules so runs stay predictable across different models
