beeai-framework

beeai-framework

Build production-ready AI agents in both Python and Typescript

Stars: 2136

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

Python library Typescript library License Bluesky Discord GitHub Repo stars

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

Latest updates 🚀

Date Language Update Description
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). See migration guide.
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.


Why BeeAI?

🏆 Build for your use case. Implement simple to complex multi-agent patterns using Workflows, start with a ReActAgent, or easily build your own agent architecture. There is no one-size-fits-all agent architecture, you need full flexibility in orchestrating agents and defining their roles and behaviors.

🔌 Seamlessly integrate with your models and tools. Get started with any model from Ollama, Groq, OpenAI, watsonx.ai, and more. Leverage tools from LangChain, connect to any server using the Model Context Protocol, or build your own custom tools. BeeAI is designed to integrate with the systems and capabilities you need.

🚀 Scale with production-grade controls. Optimize token usage through configurable memory strategies, persist and restore agent state via (de)serialization, generate structured outputs, and execute generated code in a sandboxed environment (coming soon). When things go wrong, the emitter system tracks the full agent workflow, generating detailed events for monitoring and analysis. Telemetry and logging capabilities capture key diagnostic data. When issues arise, BeeAI handles errors gracefully with clear, well-defined exceptions.


Installation

To install the Python library:

pip install beeai-framework

To install the TypeScript library:

npm install beeai-framework

For more guidance and starter examples in your desired language, head to the docs pages for Python and TypeScript.


Quick example

This example demonstrates how to build a multi-agent workflow using BeeAI framework in Python.

import asyncio
from beeai_framework.backend.chat import ChatModel
from beeai_framework.tools.search.wikipedia import WikipediaTool
from beeai_framework.tools.weather.openmeteo import OpenMeteoTool
from beeai_framework.workflows.agent import AgentWorkflow, AgentWorkflowInput

async def main() -> None:
    llm = ChatModel.from_name("ollama:granite3.1-dense:8b")
    workflow = AgentWorkflow(name="Smart assistant")

    workflow.add_agent(
        name="Researcher",
        role="A diligent researcher.",
        instructions="You look up and provide information about a specific topic.",
        tools=[WikipediaTool()],
        llm=llm,
    )

    workflow.add_agent(
        name="WeatherForecaster",
        role="A weather reporter.",
        instructions="You provide detailed weather reports.",
        tools=[OpenMeteoTool()],
        llm=llm,
    )

    workflow.add_agent(
        name="DataSynthesizer",
        role="A meticulous and creative data synthesizer",
        instructions="You can combine disparate information into a final coherent summary.",
        llm=llm,
    )

    location = "Saint-Tropez"

    response = await workflow.run(
        inputs=[
            AgentWorkflowInput(
                prompt=f"Provide a short history of {location}.",
            ),
            AgentWorkflowInput(
                prompt=f"Provide a comprehensive weather summary for {location} today.",
                expected_output="Essential weather details such as chance of rain, temperature and wind. Only report information that is available.",
            ),
            AgentWorkflowInput(
                prompt=f"Summarize the historical and weather data for {location}.",
                expected_output=f"A paragraph that describes the history of {location}, followed by the current weather conditions.",
            ),
        ]
    ).on(
        "success",
        lambda data, event: print(
            f"\n-> Step '{data.step}' has been completed with the following outcome.\n\n{data.state.final_answer}"
        ),
    )

    print("==== Final Answer ====")
    print(response.result.final_answer)


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

Source: python/examples/workflows/multi_agents_simple.py

TypeScript version of this example can be found here.

Running the example

[!Note]

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

To run projects, use:

python [project_name].py

Explore more in our examples for Python and TypeScript.


Roadmap

  • Python parity with TypeScript
  • Standalone docs site
  • Integration with watsonx.ai for deployment
  • More multi-agent reference architecture implementations using workflows
  • More OTTB agent implementations
  • Native tool calling with supported LLM providers

To stay up-to-date on our public roadmap.


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.

Contributors

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

Contributors list

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