Integration
Long-term memory for BeeAI framework
BeeAI framework (from i-am-bee) ships agents like `ReActAgent` with pluggable `BaseMemory` implementations, but the built-ins all live in-process. `EngramMemory` is a `BaseMemory` subclass that writes every message to an Engram bucket and hydrates recent history on construction, so your agents pick up where they left off after a process restart.
Install
Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into BeeAI framework.
Three steps to memory in your agent
- Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
- Add your LLM key. Engram is BYOK. Paste an OpenAI / Anthropic / Groq / Together / Fireworks key and we'll route every extraction and query call through your provider. You pay your provider directly. We never see your inference.
- Paste the snippet below into your agent and restart it. Use
Authorization: Bearer <api-key>with the API key from your portal.
beeai-framework-engram: durable BaseMemory
EngramMemory is a BaseMemory subclass that hydrates from the bucket on construction. Drop into any BeeAI agent's memory= arg. Source: github.com/lumetra-io/engram-beeai.
- Install (PyPI release pending; install from source for now):
- Export your API key:
- Pass
EngramMemoryto any BeeAI agent:
pip install git+https://github.com/lumetra-io/engram-beeaiexport ENGRAM_API_KEY="<api-key>"from beeai_framework.agents.react import ReActAgent
from beeai_framework.backend.chat import ChatModel
from beeai_framework.tools.search.duckduckgo import DuckDuckGoSearchTool
from beeai_framework_engram import EngramMemory
llm = ChatModel.from_name("ollama:granite3.3:8b")
agent = ReActAgent(
llm=llm,
tools=[DuckDuckGoSearchTool()],
memory=EngramMemory(bucket="my-react-agent"),
)
result = await agent.run("What did we talk about last time?")
print(result.result.text)What you can do once memory's wired in
- Swap into `ReActAgent(memory=EngramMemory(bucket='my-react-agent'))` with a single line
- Hydrate-on-construct: instantiating `EngramMemory(bucket='x')` pulls the last `hydrate_limit` messages back into the agent automatically
- Per-user buckets via `EngramMemory(bucket=f'user-{user_id}')`
- Call `.query('...')` for hybrid retrieval across the whole bucket when the recent-history window isn't enough
FAQ
What does `hydrate=True` (default) do?
On construction, `EngramMemory` loads up to `hydrate_limit` (default 200) recent messages from the bucket into the agent's working memory, so the agent has context from past sessions without needing to call `.query()` for it.
Does `reset()` clear the Engram bucket?
Yes. `reset()` wipes the entire bucket, so use per-agent or per-user bucket names if you don't want a reset to take out shared memory by accident.
Is the package on PyPI?
Not yet, the PyPI release is pending. Install from source with `pip install git+https://github.com/lumetra-io/engram-beeai`. The full `BaseMemory` contract is implemented (`messages`, `add`, `delete`, `reset`, `add_many`, `delete_many`, `splice`, `is_empty`, `clone`, `as_read_only`), plus an extra `await memory.query('...')` for hybrid retrieval.
Related integrations
Ship durable memory in BeeAI framework today
Free tier: 10K memories and 50K retrievals per month. No credit card. Same Engram backend powers all 41 integrations, so memories you write from one client are immediately queryable from the rest.