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.3.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.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mubit_crewai-0.5.3.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.3.tar.gz
Algorithm Hash digest
SHA256 985864a453f00db8333b919e499096d662a1cf5939141d60ae7fd66e644d32ca
MD5 4e22e8d3d11ea430fa1d3da975bb06d8
BLAKE2b-256 d6ce485d7b475df2fc0acd08797e242cd5b3f166234c6f20a2cfaa9fdc3f86e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mubit_crewai-0.5.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ac698ee3b40ead684f7126c9d85f325219500de2177c418b8f2fbf0496710d3b
MD5 7db63bc863d683629d6c7c2b169df922
BLAKE2b-256 0b127f7065c50500c7f2066568f826dd3543d991b46ea62046cd70eb13a7b293

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