-
-
Notifications
You must be signed in to change notification settings - Fork 34
Framework Adapters
SuperLocalMemory V4 ships nine framework adapters. Each adapter implements the memory or history interface that its target framework defines, writing data through the SLM V4 ingestion contract so all records are visible across the CLI, MCP, and dashboard surfaces.
All adapters write to the configured SLM data root. Optional SLM providers, connectors, backup, and downloads retain their separately documented network behavior.
| Framework | PyPI package | Interface | Minimum framework version |
|---|---|---|---|
| LangGraph | langgraph-superlocalmemory |
BaseStore (long-term memory) |
langgraph >= 1.0.0 |
| Semantic Kernel | semantic-kernel-superlocalmemory |
VectorStoreCollection |
semantic-kernel >= 1.34.0 |
| Microsoft Agent Framework | agent-framework-superlocalmemory |
ContextProvider + HistoryProvider
|
agent-framework-core >= 1.5.0 |
| LangChain | langchain-superlocalmemory |
BaseChatMessageHistory |
langchain-core >= 1.0.0 |
| LlamaIndex | llama-index-storage-chat-store-superlocalmemory |
BaseChatStore |
Python 3.11+ |
| CrewAI | crewai-superlocalmemory |
StorageBackend |
crewai >= 1.14.6 |
| AutoGen | autogen-superlocalmemory |
Memory |
autogen-agentchat >= 0.7.5 |
| Google ADK | google-adk-superlocalmemory |
BaseMemoryService |
google-adk >= 2.5.0 |
| OpenAI Agents | openai-agents-superlocalmemory |
SessionABC |
openai-agents >= 0.18.3 |
All adapters require Python 3.11+ and SuperLocalMemory V4 installed in the same virtual environment.
Install the adapter alongside the target framework:
pip install superlocalmemory <adapter-package>For example, to add LangGraph support:
pip install superlocalmemory langgraph-superlocalmemorySource installs are available under ide/integrations/<framework>/ in the
repository.
Implements BaseStore (long-term memory), providing namespaced key-value
storage accessible to create_react_agent and StateGraph.
from langgraph_superlocalmemory import SuperLocalMemoryStore
store = SuperLocalMemoryStore()
store.put(("users", "1"), "profile", {"name": "Ada", "role": "engineer"})
item = store.get(("users", "1"), "profile")
results = store.search(("users",), filter={"role": "engineer"})Namespace prefix matching is element-wise: ("users",) matches ("users", "1")
but not ("users2",). TTL is not supported. Vector similarity search delegates
to SLM's native recall.
Implements VectorStoreCollection (SK 1.34+ preview API) for record
persistence and CRUD lifecycle operations.
from semantic_kernel_superlocalmemory import SuperLocalMemoryVectorStore
store = SuperLocalMemoryVectorStore()
collection = store.get_collection(Doc, collection_name="docs")
await collection.ensure_collection_exists()
await collection.upsert(Doc(id="d1", text="hello world"))Search performs field-filter retrieval; dense-vector ANN ranking is a documented follow-up. Validate in CI against the installed SK version — the vector-store API is still marked preview.
Provides SuperLocalMemoryContextProvider and SuperLocalMemoryHistoryProvider
for the Agent Framework before_run / after_run hook model (GA, 1.5.0+).
from agent_framework_superlocalmemory import (
SuperLocalMemoryContextProvider,
SuperLocalMemoryHistoryProvider,
)
history = SuperLocalMemoryHistoryProvider()
memory = SuperLocalMemoryContextProvider(max_recall=10)
# agent = ChatAgent(..., context_providers=[memory], history_provider=history)ContextProvider.before_run injects recent session history; wider semantic
recall across the SLM store is a documented follow-up.
Implements BaseChatMessageHistory. Each session is isolated by a namespaced
SHA-256 session identifier; messages are tagged langchain:session:<id>.
from langchain_superlocalmemory import SuperLocalMemoryChatMessageHistory
history = SuperLocalMemoryChatMessageHistory(session_id="my-chat-session")
history.add_messages([HumanMessage(content="What is SLM?"), ...])
for msg in history.messages:
print(f"{msg.type}: {msg.content}")
history.clear()All standard LangChain message types are supported. additional_kwargs
round-trip through serialization.
Implements BaseChatStore. Integrates with ChatMemoryBuffer for automatic
conversation management.
from llama_index.storage.chat_store.superlocalmemory import SuperLocalMemoryChatStore
from llama_index.core.memory import ChatMemoryBuffer
chat_store = SuperLocalMemoryChatStore()
memory = ChatMemoryBuffer.from_defaults(
chat_store=chat_store, chat_store_key="user-123", token_limit=3000
)Session keys are stored with a llamaindex:<sha256(key)> session identifier.
Implements StorageBackend for scope-aware memory records. CrewAI supplies
pre-computed embeddings; the adapter persists them and ranks by cosine
similarity in pure Python (no numpy dependency).
from crewai_superlocalmemory import SuperLocalMemoryBackend
backend = SuperLocalMemoryBackend()Scope-prefix filtering uses hierarchical matching (/project matches
/project/alpha, never /projectx). metadata_filter supports equality
checks only. For large collections, use SLM's native recall for semantic
ranking.
Implements autogen_core.memory.Memory. query() uses SLM's BM25 + semantic
recall pipeline, giving the agent access to the full SLM knowledge base, not
only AutoGen-added memories.
from autogen_superlocalmemory import SuperLocalMemoryMemory
mem = SuperLocalMemoryMemory()
await mem.add(MemoryContent(content="Ada prefers dark mode.", mime_type=MemoryMimeType.TEXT))
result = await mem.query("Ada preferences")clear() removes only autogen-mem: rows; personal and shared SLM memories
are unaffected.
Note: For Microsoft Agent Framework (
agent-framework-core) see theagent_framework_superlocalmemoryadapter above;autogen-agentchatand Agent Framework are separate products.
Implements BaseMemoryService. Persists ADK session events and serves
semantic recall with post-filtering by app_name + user_id.
from google_adk_superlocalmemory import SuperLocalMemoryService
service = SuperLocalMemoryService()
runner = Runner(agent=agent, app_name="my-app", memory_service=service)add_session_to_memory is idempotent: re-running for the same session
replaces previous events.
Implements SessionABC for ordered conversation history. Items are appended
with deterministic ordering (created_at ASC, rowid ASC).
from openai_agents_superlocalmemory import SLMSession
from agents import Runner
session = SLMSession(session_id="user-42-conv-7")
runner = Runner(session=session)
result = await runner.run("What is the capital of France?")Multiple sessions sharing the same database do not interfere; the prefix used in SQL scans is escaped to prevent wildcard collisions.
All nine adapters:
- Write through the SLM V4 ingestion contract — records are immediately
queryable via
slm recall, the dashboard, and any MCP-connected client. - Isolate sessions with a SHA-256-namespaced or scoped session identifier.
- Handle async via
asyncio.to_threadover the synchronous SLM engine, so async agents are never blocked on memory I/O. - Store data at the configured SLM data root (default
~/.superlocalmemory/memory.db). Passdb_path=to override.
| Limitation | Applies to |
|---|---|
| ANN vector search is not indexed; search uses SLM recall or in-process cosine | LangGraph, Semantic Kernel, LangChain, LlamaIndex, CrewAI, AutoGen |
| TTL not supported | LangGraph |
metadata_filter equality-only |
CrewAI |
| SK vector-store API is still marked preview | Semantic Kernel |
score not exposed in SearchMemoryResponse
|
Google ADK |
Part of Qualixar | Created by Varun Pratap Bhardwaj
SuperLocalMemory V4.0.3 — Local-first memory with explicit data-path controls. Current docs: Home · Installation · CLI · MCP whole 91 (full 46) · FAQ
Part of Qualixar | Created by Varun Pratap Bhardwaj | GitHub · CHANGELOG
Platform boundary: Apple Silicon macOS · 64-bit Windows · 64-bit Linux — Intel Mac and 32-bit Windows not supported (
cryptography==50.0.0).
SuperLocalMemory V4.0.3
Getting Started
- Installation
- Quick Start Tutorial
- Getting Started
- Modes Explained
- IDE Setup
- Host Integration Upgrades
- Migration from V2
Reference
- CLI Commands
- MCP Tools — 91 whole / 58 power / 46 full / 28 code / 14 core
- Retrieval Score Contract
- Auto-Memory
- Active Memory (V3.1)
Integrations
- Framework Adapters — 9 adapters
- Bounded Loops
- Multi-Agent Memory
Architecture
- Architecture Overview — historical V3, carried into V4
- Capabilities and Operations
- Published Benchmarks — V3 LoCoMo, not a V4 rerun
- Mathematical Foundations — historical V3
-
V4 Reliability Contract — 2,200/2,200, protocol
benchmark/run_all.py --trials 200
Enterprise and Teams
V2 Documentation