This documentation is outdated. The platform is currently being upgraded to the latest version of ACP with major changes. Updated docs are expected in ~2 weeks. Apologies for the inconvenience.

Tools in BeeAI follow the Model Context Protocol. Adding a tool to a provider is simple and requires minimal setup.

Implementing a tool

Below is an example of how to create and register a tool:

import asyncio
from acp.server.highlevel import Server, Context
from beeai_sdk.providers.agent import run_agent_provider

def main():
    server = Server("beeai-agents")

    @server.tool()
    async def add(a: int, b: int, ctx: Context) -> int:
        """Add two numbers"""
        return a + b

    asyncio.run(run_agent_provider(server))

Registering the provider

After registering the provider, the tool will be available via the command line. You can check for its presence using:

beeai tool list

To invoke the tool directly, run:

beeai tool run add '{"a": 1, "b": 2}'

Agent usage

Tools can be accessed programmatically by agents through the ACP SDK package or directly via MCP. This enables integration with frameworks through adapters such as:

These integrations allow agents to leverage tools available within BeeAI effectively.