beeai-framework

beeai-framework

Build production-ready AI agents in both Python and Typescript.

Stars: 2796

Visit
 screenshot

BeeAI Framework is a versatile tool for building production-ready multi-agent systems. It offers flexibility in orchestrating agents, seamless integration with various models and tools, and production-grade controls for scaling. The framework supports Python and TypeScript libraries, enabling users to implement simple to complex multi-agent patterns, connect with AI services, and optimize token usage and resource management.

README:

BeeAI Framework

Build production-ready multi-agent systems in Python or TypeScript.

Python library Typescript library Apache 2.0 Follow on Bluesky Join our Discord LF AI & Data

Latest updates

Date Language Update Description
2025/08/25 Python 🚀 ACP is now part of A2A under the Linux Foundation! 👉 Learn more
2025/06/03 Python Release experimental Requirement Agent.
2025/05/15 Python New protocol integrations: ACP and MCP.
2025/02/19 Python Launched Python library alpha. See getting started guide.
2025/02/07 TypeScript Introduced Backend module to simplify working with AI services (chat, embedding).
2025/01/28 TypeScript Added support for DeepSeek R1, check out the Competitive Analysis Workflow example.
2025/01/09 TypeScript Introduced Workflows, a way of building multi-agent systems. Added support for Model Context Protocol.
2024/12/09 TypeScript Added support for LLaMa 3.3. See multi-agent workflow example using watsonx or explore other available providers.
2024/11/21 TypeScript Added an experimental Streamlit agent.

For a full changelog, see our releases page.


What is BeeAI Framework?

BeeAI Framework is a comprehensive toolkit for building intelligent, autonomous agents and multi-agent systems. It provides everything you need to create agents that can reason, take actions, and collaborate to solve complex problems.

[!TIP] Get started quickly with the beeai-framework-py-starter [Python] or beeai-framework-ts-starter [TypeScript] template.

Key Features

Feature Description
🤖 Agents Create intelligent agents that can reason, act, and adapt
🔄 Workflows Orchestrate multi-agent systems with complex execution flows
🔌 Backend Connect to any LLM provider with unified interfaces
🔧 Tools Extend agents with web search, weather, code execution, and more
🔍 RAG Build retrieval-augmented generation systems with vector stores and document processing
📝 Templates Build dynamic prompts with enhanced Mustache syntax
🧠 Memory Manage conversation history with flexible memory strategies
📊 Observability Monitor agent behavior with events, logging, and robust error handling
🚀 Serve Host agents in servers with support for multiple protocols such as A2A and MCP
💾 Cache Optimize performance and reduce costs with intelligent caching
💿 Serialization Save and load agent state for persistence across sessions

Quickstart

Installation

To install the Python library:

pip install beeai-framework

To install the TypeScript library:

npm install beeai-framework

Multi-Agent Example

import asyncio

from beeai_framework.agents.experimental import RequirementAgent
from beeai_framework.agents.experimental.requirements.conditional import ConditionalRequirement
from beeai_framework.backend import ChatModel
from beeai_framework.errors import FrameworkError
from beeai_framework.middleware.trajectory import GlobalTrajectoryMiddleware
from beeai_framework.tools import Tool
from beeai_framework.tools.handoff import HandoffTool
from beeai_framework.tools.search.wikipedia import WikipediaTool
from beeai_framework.tools.think import ThinkTool
from beeai_framework.tools.weather import OpenMeteoTool


async def main() -> None:
    knowledge_agent = RequirementAgent(
        llm=ChatModel.from_name("ollama:granite3.3:8b"),
        tools=[ThinkTool(), WikipediaTool()],
        requirements=[ConditionalRequirement(ThinkTool, force_at_step=1)],
        role="Knowledge Specialist",
        instructions="Provide answers to general questions about the world.",
    )

    weather_agent = RequirementAgent(
        llm=ChatModel.from_name("ollama:granite3.3:8b"),
        tools=[OpenMeteoTool()],
        role="Weather Specialist",
        instructions="Provide weather forecast for a given destination.",
    )

    main_agent = RequirementAgent(
        name="MainAgent",
        llm=ChatModel.from_name("ollama:granite3.3:8b"),
        tools=[
            ThinkTool(),
            HandoffTool(
                knowledge_agent,
                name="KnowledgeLookup",
                description="Consult the Knowledge Agent for general questions.",
            ),
            HandoffTool(
                weather_agent,
                name="WeatherLookup",
                description="Consult the Weather Agent for forecasts.",
            ),
        ],
        requirements=[ConditionalRequirement(ThinkTool, force_at_step=1)],
        # Log all tool calls to the console for easier debugging
        middlewares=[GlobalTrajectoryMiddleware(included=[Tool])],
    )

    question = "If I travel to Rome next weekend, what should I expect in terms of weather, and also tell me one famous historical landmark there?"
    print(f"User: {question}")

    try:
        response = await main_agent.run(question, expected_output="Helpful and clear response.")
        print("Agent:", response.answer.text)
    except FrameworkError as err:
        print("Error:", err.explain())


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

Source: python/examples/agents/experimental/requirement/handoff.py

Running the example

[!Note]

To run this example, be sure that you have installed ollama with the granite3.3:8b model downloaded.

To run projects, use:

python [project_name].py

Explore more in our examples for Python and TypeScript.


Contribution guidelines

BeeAI framework is open-source and we ❤️ contributions.

To help build BeeAI, take a look at our:

Bugs

We use GitHub Issues to manage bugs. 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. By participating, you are expected to uphold this code. Please read the full text so that you know 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.

Maintainers

For information about maintainers, see MAINTAINERS.md.

Contributors

Special thanks to our contributors for helping us improve BeeAI framework.

Contributors list

Developed by contributors to the BeeAI project, this initiative is part of the Linux Foundation AI & Data program. Its development follows open, collaborative, and community-driven practices.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for beeai-framework

Similar Open Source Tools

For similar tasks

For similar jobs