Skip to main content

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 retrieval
  • checkpoint() — save memory state snapshot
  • record_outcome() — outcome feedback for tasks
  • surface_strategies() — strategy clusters from lessons
  • register_agent() — MAS agent registration
  • handoff() — agent-to-agent handoff
  • diagnose() — 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

mubit_crewai-0.5.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mubit_crewai-0.5.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mubit_crewai-0.5.2.tar.gz.

File metadata

  • Download URL: mubit_crewai-0.5.2.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

Hashes for mubit_crewai-0.5.2.tar.gz
Algorithm Hash digest
SHA256 cf1d1cce490667efd87ceec11706265418d5ba50c470f419235a9659999752f8
MD5 5c6c43982a0d1b12a93474d6aa522bca
BLAKE2b-256 c42e92df24adecf9019f2922cb3ed3067c45d400f779bda201f0fd1da9079bd8

See more details on using hashes here.

File details

Details for the file mubit_crewai-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: mubit_crewai-0.5.2-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

Hashes for mubit_crewai-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 185a46f09901b9ecb319579dfda9fc22e6bbdcb7d094876abfb920cfece12a40
MD5 73ce1f443d6433268e6d6f1c6aff9828
BLAKE2b-256 ce36c60e08214f11beb882acc78a79c71b711ed94b513893b1f4e32b3829a27f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page