CrewAI memory backend backed by MuBit memory engine
Project description
mubit-crewai
CrewAI memory backend backed by MuBit.
This adapter provides a StorageBackend-compatible class for CrewAI's Memory system, routing all memory operations through MuBit's control plane. Also includes an extended MubitCrewMemory class with MAS coordination helpers.
Install
pip install mubit-crewai[crewai]
Basic usage
Drop-in StorageBackend
from mubit_crewai import MubitStorage
from crewai import Crew
from crewai.memory import Memory
storage = MubitStorage(api_key="mbt_...", session_id="crew-run-1")
crew = Crew(
agents=[...],
memory=Memory(storage=storage),
)
Extended MuBit features
from mubit_crewai import MubitCrewMemory
memory = MubitCrewMemory(api_key="mbt_...", session_id="crew-run-1")
crew = Crew(agents=[...], memory=memory.as_crew_memory())
# Extended:
context = memory.get_context("What do we know about the customer?")
memory.checkpoint("Finished research phase")
memory.record_outcome("task-123", "success", rationale="All tests passed")
memory.handoff("researcher", "writer", "Here are the findings...")
StorageBackend interface
| Method | MuBit mapping |
|---|---|
save(value, metadata, agent_id) |
control.ingest with intent from metadata |
search(query, limit, score_threshold) |
control.query with score filtering |
reset() |
control.delete_run |
Intent inference
The memory_type metadata key maps to MuBit intents:
memory_type |
MuBit intent |
|---|---|
short_term |
trace |
long_term |
lesson |
entity |
fact |
MuBit extension methods
get_context()— assembled context retrievalcheckpoint()— save memory state snapshotrecord_outcome()— outcome feedback for taskssurface_strategies()— strategy clusters from lessonsregister_agent()— MAS agent registrationhandoff()— agent-to-agent handoffdiagnose()— failure-path lesson surfacing
Config
| Parameter | Default | Purpose |
|---|---|---|
endpoint |
http://127.0.0.1:3000 |
MuBit HTTP endpoint |
api_key |
"" |
MuBit API key |
session_id |
"default" |
Session/run scope |
agent_id |
"crewai" |
Default agent ID |
For tests, inject mubit_client directly.
Development
PYTHONPATH=sdk/python/mubit-sdk/src:integrations/python \
python3 -m unittest integrations.python.mubit_crewai.tests.test_storage -v
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mubit_crewai-0.5.1.tar.gz.
File metadata
- Download URL: mubit_crewai-0.5.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96fc77fa0feda0938a240b35cb9518d2ebb976785b26fd763b991b6c838c48ae
|
|
| MD5 |
71e30dfc5b83423fa8665e62244ebfa1
|
|
| BLAKE2b-256 |
31593272957e12d8b3b5f0a2b0ad4ec25ab3fda58e5f8652855550a4c0179854
|
File details
Details for the file mubit_crewai-0.5.1-py3-none-any.whl.
File metadata
- Download URL: mubit_crewai-0.5.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
927d976e710eb8e00dc8a235cb242f525800183731f5b8293c66cea071a76d79
|
|
| MD5 |
d9c7521934437548cea5b102f7ddbc99
|
|
| BLAKE2b-256 |
2693fc9a467b311f51113f9f2473148c798208c26dded95b0c41397974302908
|