Skip to content

BeeAI (IBM) integration

Astrocyte memory tools for IBM’s BeeAI Agent Framework.

Module: astrocyte.integrations.beeai Pattern: Tool with run() method — name, description, input_schema, async run() Framework dependency: beeai-framework (optional)

Terminal window
pip install astrocyte beeai-framework
from astrocyte import Astrocyte
from astrocyte.integrations.beeai import astrocyte_bee_tools
brain = Astrocyte.from_config("astrocyte.yaml")
tools = astrocyte_bee_tools(brain, bank_id="user-123")
from beeai import BeeAgent
agent = BeeAgent(llm=llm, tools=tools)
# Or call tools directly:
result = await tools[0].run({"content": "Calvin likes Python"})

Each tool is an AstrocyteBeeTool with name, description, input_schema, and async run():

ToolInputReturns
memory_retain{"content": "..."}JSON: {"stored": true, "memory_id": "..."}
memory_recall{"query": "..."}JSON: {"hits": [...], "total": N}
memory_reflect{"query": "..."}Answer text
memory_forget{"memory_ids": [...]}JSON: {"deleted_count": N}

astrocyte_bee_tools(brain, bank_id, *, include_reflect=True, include_forget=False)

Section titled “astrocyte_bee_tools(brain, bank_id, *, include_reflect=True, include_forget=False)”

Returns list[AstrocyteBeeTool]. Each tool has name, description, input_schema, and run(input_data).