Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
Overview

Framework Integrations

Native MuBit memory adapters for popular agent frameworks. This page is a reference index; full walkthroughs live on the per-framework pages.

MuBit ships native adapters for popular agent frameworks. Each adapter plugs into the framework's own memory or store interface, so agents pick up persistent semantic memory and cross-session learning without restructuring how they're built. Pick a framework, copy the minimal snippet, then jump to the full walkthrough on the framework's page.

At a glance

FrameworkLanguageAdapter patternInstall
CrewAIPythonStorageBackend for unified Memorypip install mubit-crewai[crewai]
LangGraphPythonBaseStore with batch opspip install mubit-langgraph[langgraph]
LangGraphJSBaseStore with async opsnpm install @mubit-ai/langgraph
LangChainPythonBaseMemory / MubitChatMemorypip install mubit-langchain[langchain]
LlamaIndexPythonBaseMemory via MubitChatMemoryBufferpip install mubit-llama-index[llama-index]
Google ADKPythonBaseMemoryService for Runnerpip install mubit-adk[adk]
AgnoPythonMemoryDb + Toolkitpip install mubit-agno[agno]
Vercel AI SDKJSwrapLanguageModel() middlewarenpm install @mubit-ai/ai-sdk
MCPAny21 tools over stdio transportnpm install @mubit-ai/mcp

All adapters use the canonical MuBit SDK transport internally. Every Python adapter exposes the full MAS surface — see Feature parity matrix.

ℹ️Note

Version compatibility: these adapters depend on the canonical mubit-sdk via mubit-integration-base. Always upgrade integration packages alongside the core SDK.


CrewAI

Routes CrewAI's unified Memory system through MuBit. Agent observations persist across runs and are queryable across crews.

pip install mubit-crewai[crewai]
crewai_minimal.py
from mubit_crewai import MubitCrewMemory
from crewai import Crew, Process
 
memory = MubitCrewMemory(api_key="mbt_...", session_id="crew-run-1")
 
crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    process=Process.sequential,
    memory=memory.as_crew_memory(),
)
crew.kickoff(inputs={"topic": "AI safety"})

Full walkthrough → /sdk/integrations/crewai


LangGraph

Use MuBit as a persistent store for LangGraph StateGraph nodes. Each node reads or writes through PutOp / SearchOp.

pip install mubit-langgraph[langgraph]
langgraph_minimal.py
from mubit_langgraph import MubitStore
from langgraph.store.base import PutOp, SearchOp
 
store = MubitStore(api_key="mbt_...")
NS = ("memories", "user-1", "session-1")
 
store.batch([PutOp(namespace=NS, key="finding-1", value={"text": "...", "intent": "lesson"})])
results = store.batch([SearchOp(namespace_prefix=NS, query="security issues", limit=5)])
 
graph.compile(store=store)

Full walkthrough → /sdk/integrations/langgraph


LangChain

Drop-in BaseMemory for any LangChain chain. Loads context before each call and saves interactions after; cross-session memory is automatic via MuBit's semantic retrieval.

pip install mubit-langchain[langchain]
langchain_minimal.py
from mubit_langchain import MubitChatMemory
from langchain_openai import ChatOpenAI
 
memory = MubitChatMemory(api_key="mbt_...", session_id="chat-1")
llm = ChatOpenAI(model="gpt-4o-mini")
 
context = memory.load_memory_variables({"input": "What happened yesterday?"})
# build messages with context["history"], call LLM
memory.save_context({"input": question}, {"output": response})

Full walkthrough → /sdk/integrations/langchain


LlamaIndex

Exposes MubitChatMemoryBuffer, a BaseMemory-style adapter that backs LlamaIndex chat memory with MuBit's persistent semantic retrieval across sessions.

pip install mubit-llama-index[llama-index]
llamaindex_minimal.py
from llama_index.core import Settings
from mubit_llama_index import MubitChatMemoryBuffer
 
Settings.memory = MubitChatMemoryBuffer(api_key="mbt_...", session_id="session-1")

Full walkthrough → /sdk/integrations/llamaindex


Google ADK

Plug MuBit into ADK's Runner as a BaseMemoryService. Session events are auto-ingested; memory search enriches agent context on the next turn.

pip install mubit-adk[adk]
google_adk_minimal.py
from mubit_adk import MubitMemoryService
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
 
memory = MubitMemoryService(api_key="mbt_...")
runner = Runner(
    agent=root_agent, app_name="travel",
    session_service=InMemorySessionService(),
    memory_service=memory,
)

Full walkthrough → /sdk/integrations/google-adk


Agno

Two integration surfaces: MemoryDb for Agno's built-in memory system, and a Toolkit with LLM-callable memory tools.

pip install mubit-agno[agno]
agno_minimal.py
from agno.agent import Agent
from agno.memory.v2.memory import Memory
from mubit_agno import MubitAgnoMemory
 
mubit = MubitAgnoMemory(api_key="mbt_...", session_id="run-1")
 
agent = Agent(
    name="Assistant",
    memory=Memory(db=mubit.as_memory_db()),
    tools=[mubit.as_toolkit()],
    enable_agentic_memory=True,
)
agent.run("What do we know about the production database?")

Full walkthrough → /sdk/integrations/agno


Vercel AI SDK

Middleware that wraps any AI SDK model with automatic memory injection and interaction capture.

npm install @mubit-ai/ai-sdk
vercel_ai_sdk_minimal.mjs
import { wrapLanguageModel, generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { mubitMemoryMiddleware } from "@mubit-ai/ai-sdk";
 
const model = wrapLanguageModel({
  model: openai("gpt-4o"),
  middleware: mubitMemoryMiddleware({
    apiKey: process.env.MUBIT_API_KEY,
    sessionId: "session-1",
    agentId: "support-agent",
  }),
});
 
await generateText({ model, prompt: "How do I reset my password?" });

Full walkthrough → /sdk/integrations/vercel-ai-sdk


MCP

Exposes MuBit as 21 tools over MCP stdio transport. Usable by any MCP-compatible agent (Claude Desktop, Cursor, custom agents).

npm install @mubit-ai/mcp
mcp_minimal.sh
MUBIT_API_KEY=$MUBIT_API_KEY MUBIT_ENDPOINT=https://api.mubit.ai npx @mubit-ai/mcp

Tools available: mubit_remember, mubit_recall, mubit_context, mubit_forget, mubit_archive, mubit_dereference, mubit_reflect, mubit_learned, mubit_lessons, mubit_checkpoint, mubit_outcome, mubit_step_outcome, mubit_strategies, mubit_register_agent, mubit_list_agents, mubit_handoff, mubit_feedback, mubit_diagnose, mubit_memory_health, mubit_ingest_status, mubit_status.

Full walkthrough → /sdk/integrations/mcp


Common MAS extensions

Every adapter exposes these MuBit-specific methods beyond the base framework interface:

MethodPurpose
checkpoint()Save a snapshot of memory state
record_outcome()Record success / failure with an RL-style signal
surface_strategies()Cluster recurring lessons into reusable strategy descriptors
register_agent()Register an agent with role, scopes, capabilities
handoff()Transfer control between agents (requires task_id)
feedback()Submit a verdict on a handoff
diagnose()Surface failure-path lessons for debugging
get_context()Fetch a token-budgeted context block
reflect()Extract lessons from session evidence
lessons()List lessons with optional filtering
archive()Store an exact reusable artifact with a stable reference_id
dereference()Fetch exact content by reference_id

Feature parity matrix

All Python adapters expose the full MuBit MAS surface through the shared mubit-integration-base client. JS/TS adapters expose the same surface in camelCase.

MethodCrewAILangGraph (Py)LangChainLlamaIndexGoogle ADKAgnoVercel AIMCP
remember / ingest✅ automubit_remember
recall / query✅ automubit_recall
get_contextmubit_context
checkpointvia clientvia clientmubit_checkpoint
record_outcomevia clientvia clientmubit_outcome
surface_strategiesvia clientvia clientmubit_strategies
register_agent / list_agentsvia clientvia client
handoff / feedbackvia clientvia client
diagnosevia clientvia clientmubit_diagnose
reflectvia client✅ on run endmubit_reflect
archive / dereferencevia clientvia client

"via client" means the adapter forwards the method to its underlying MubitControlClient (e.g. MubitChatMemoryBuffer(...).record_outcome(...) on LlamaIndex, mubit.client.diagnose(...) on Vercel AI SDK). The framework-facing surface stays focused on the memory contract the framework expects, while the full MAS coordination remains available in the same process.