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
| Framework | Language | Adapter pattern | Install |
|---|---|---|---|
| CrewAI | Python | StorageBackend for unified Memory | pip install mubit-crewai[crewai] |
| LangGraph | Python | BaseStore with batch ops | pip install mubit-langgraph[langgraph] |
| LangGraph | JS | BaseStore with async ops | npm install @mubit-ai/langgraph |
| LangChain | Python | BaseMemory / MubitChatMemory | pip install mubit-langchain[langchain] |
| LlamaIndex | Python | BaseMemory via MubitChatMemoryBuffer | pip install mubit-llama-index[llama-index] |
| Google ADK | Python | BaseMemoryService for Runner | pip install mubit-adk[adk] |
| Agno | Python | MemoryDb + Toolkit | pip install mubit-agno[agno] |
| Vercel AI SDK | JS | wrapLanguageModel() middleware | npm install @mubit-ai/ai-sdk |
| MCP | Any | 21 tools over stdio transport | npm 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.
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]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]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]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]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]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]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-sdkimport { 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/mcpMUBIT_API_KEY=$MUBIT_API_KEY MUBIT_ENDPOINT=https://api.mubit.ai npx @mubit-ai/mcpTools 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:
| Method | Purpose |
|---|---|
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.
| Method | CrewAI | LangGraph (Py) | LangChain | LlamaIndex | Google ADK | Agno | Vercel AI | MCP |
|---|---|---|---|---|---|---|---|---|
remember / ingest | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ auto | ✅ mubit_remember |
recall / query | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ auto | ✅ mubit_recall |
get_context | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ mubit_context |
checkpoint | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via client | ✅ mubit_checkpoint |
record_outcome | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via client | ✅ mubit_outcome |
surface_strategies | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via client | ✅ mubit_strategies |
register_agent / list_agents | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via client | ✅ |
handoff / feedback | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via client | ✅ |
diagnose | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via client | ✅ mubit_diagnose |
reflect | ✅ | ✅ | ✅ | via client | ✅ | ✅ | ✅ on run end | ✅ mubit_reflect |
archive / dereference | ✅ | ✅ | ✅ | via client | ✅ | ✅ | via 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.