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

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]
AutoGenPythonautogen_core.memory.Memory provider + group-chat hookpip install "mubit-autogen[autogen]"
Agent LightningPythonHook on Trainer + reward emitterpip install "mubit-agent-lightning[agent-lightning]"
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


AutoGen

MubitMemory implements autogen_core.memory.Memory: attach it to an AssistantAgent and recall is injected as a SystemMessage before every model turn, while new content persists via add(). MubitGroupChatHook forwards multi-agent handoff/feedback signals. Targets autogen-core / autogen-agentchat 0.7.x (not the legacy pyautogen 0.2 line).

pip install "mubit-autogen[autogen]"
autogen_minimal.py
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from mubit_autogen import MubitMemory
 
memory = MubitMemory(api_key="mbt_...", session_id="support-1", agent_id="support")
 
agent = AssistantAgent(
    name="support",
    model_client=OpenAIChatCompletionClient(model="gpt-4o"),
    memory=[memory],  # Mubit recall injected before every model turn
)

Full walkthrough → /sdk/integrations/autogen


Agent Lightning

Bridges Agent Lightning rollout rewards into Mubit's attribution loop. MubitHook (a subclass of agentlightning.Hook) recalls lessons at on_rollout_start and credits the recalled entry_ids via record_outcome at on_rollout_end; MubitRewardEmitter gives custom training loops explicit emit_reward / emit_event / emit_step_outcome calls.

pip install "mubit-agent-lightning[agent-lightning]"
agl_minimal.py
import agentlightning as agl
from mubit_agent_lightning import MubitHook
 
hook = MubitHook(api_key="mbt_...", session_id="my-rl-run")
trainer = agl.Trainer(..., hooks=[hook])  # recall at rollout start, credit at rollout end
trainer.fit(my_lit_agent, ...)

Full walkthrough → /sdk/integrations/agent-lightning


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 ADKAgnoAutoGenAgent LightningVercel AIMCP
remember / ingestadd()emit_event✅ automubit_remember
recall / query✅ auto + query()✅ auto (hook) + recall()✅ automubit_recall
get_contextvia clientvia clientmubit_context
checkpointvia clientvia clientvia clientvia clientmubit_checkpoint
record_outcomevia clientemit_rewardvia clientmubit_outcome
surface_strategiesvia clientvia clientvia clientvia clientmubit_strategies
register_agent / list_agentsvia clientvia clientvia clientvia client
handoff / feedbackvia client✅ group-chat hookvia clientvia client
diagnosevia clientvia clientvia clientvia clientmubit_diagnose
reflectvia clientvia clientvia client✅ on run endmubit_reflect
archive / dereferencevia clientvia clientvia 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.