Overview
memory-interop provides a unified memory abstraction layer that allows AI agents built on different frameworks to share persistent state. With ~2.1K GitHub stars, it emerged from OpenViking's ecosystem to solve the problem of memory fragmentation across agent frameworks. The project defines a standard memory protocol that translates between LangGraph's graph state, CrewAI's agent memory, and AutoGen's conversation history, enabling agents from different frameworks to read and write to a shared memory store. This unlocks cross-framework agent collaboration without requiring a unified framework.
Features
- ✓Unified memory protocol across 8 agent frameworks
- ✓Official adapters for LangGraph, CrewAI, and AutoGen
- ✓Compatible with 12 vector backends
- ✓Bi-directional state translation
- ✓Event-sourced memory with full audit trail
- ✓Typed memory schemas with runtime validation
- ✓Zero-config setup with auto-discovery
- ✓Streaming writes with conflict resolution
Installation
pip install memory-interopPros
- +Eliminates memory silos between agent frameworks
- +Framework-agnostic — works with any supported agent
- +Strong typing prevents memory corruption
- +Event sourcing enables time-travel debugging
- +Open-source with active community
Cons
- −Early-stage at 2.1K stars
- −Adapter quality varies by framework
- −State translation may lose framework-specific nuances
- −No built-in storage — requires external vector backend
- −Limited documentation for advanced patterns
Alternatives
Documentation
memory-interop
Overview
memory-interop is a polyglot agent memory layer that provides a unified memory abstraction across different AI agent frameworks. With ~2.1K GitHub stars, it emerged from the OpenViking ecosystem to address the fragmentation problem where agents built on different frameworks cannot share persistent state.
The project defines a standard memory protocol that translates between LangGraph's graph state, CrewAI's agent memory, AutoGen's conversation history, and other frameworks — enabling cross-framework agent collaboration. It supports 8 major agent frameworks and 12 vector backends.
Features
- Unified memory protocol: Single API surface for all supported agent frameworks
- Official adapters: First-class support for LangGraph, CrewAI, and AutoGen
- Multi-backend support: Works with 12 vector backends (Pinecone, Qdrant, Weaviate, etc.)
- Bi-directional state translation: Write memory from any framework, read from any other
- Event-sourced memory: Full audit trail with append-only semantics
- Typed schemas: Runtime validation prevents memory corruption across frameworks
- Zero-config setup: Auto-discovery of compatible frameworks
- Streaming writes: Real-time memory updates with conflict resolution
Installation
pip install memory-interop
For TypeScript:
npm install memory-interop
Quick Start
from memory_interop import MemoryStore
from memory_interop.adapters import LangGraphAdapter, CrewAIAdapter
# Create a shared memory store with Qdrant backend
store = MemoryStore(
backend="qdrant",
collection="shared_agents",
url="http://localhost:6333"
)
# Register framework adapters
langgraph_adapter = LangGraphAdapter(store)
crewai_adapter = CrewAIAdapter(store)
# LangGraph agent writes memory
langgraph_adapter.put(
agent_id="researcher-1",
key="topic_focus",
value="Large language model inference optimization",
context={"session": "2026-08-20", "confidence": 0.92}
)
# CrewAI agent reads the same memory
focus = crewai_adapter.get(
agent_id="researcher-1",
key="topic_focus"
)
print(focus.value) # "Large language model inference optimization"
Core Concepts
Memory Protocol
The memory protocol defines a universal memory item with the following fields:
| Field | Type | Description |
|---|---|---|
agent_id | string | Unique identifier for the writing agent |
key | string | Memory key within the agent's namespace |
value | any | JSON-serializable memory value |
context | object | Metadata (session, confidence, timestamp) |
vector | float[] | Embedding vector for semantic search |
version | int | Monotonic version for conflict resolution |
source_framework | string | Original framework that wrote the memory |
State Translation
Each framework adapter handles translation between the framework's native state format and the universal memory protocol:
- LangGraph: Translates graph checkpoint state → memory items with channel-level granularity
- CrewAI: Translates crew memory → memory items with role-level granularity
- AutoGen: Translates conversation history → memory items with session-level granularity
Conflict Resolution
When two frameworks write to the same key simultaneously, memory-interop uses a Last-Writer-Wins strategy based on the version field. Applications can override this with custom resolution strategies.
Advanced Features
Cross-Framework Agent Collaboration
# Researcher (LangGraph) writes findings
researcher_adapter.put("agent-1", "findings", [
{"insight": "vLLM outperforms TGI on A100 by 18%", "source": "benchmark"},
{"insight": "Continuous batching reduces p50 latency 3x", "source": "paper"}
])
# Analyst (CrewAI) reads and extends the findings
findings = analyst_adapter.get("agent-1", "findings")
extended = findings.value + [{"insight": "Cost per token is 40% lower on vLLM", "source": "analysis"}]
analyst_adapter.put("agent-2", "analysis_report", extended)
# Summarizer (AutoGen) reads from both agents
summary = summarizer_adapter.search(
query="performance comparison",
agent_ids=["agent-1", "agent-2"],
top_k=10
)
Typed Memory Schemas
from memory_interop.schemas import MemorySchema, Field
research_schema = MemorySchema(
name="research_finding",
fields={
"topic": Field(str, required=True),
"finding": Field(str, required=True),
"confidence": Field(float, ge=0.0, le=1.0),
"sources": Field(list[str]),
"timestamp": Field(int)
}
)
adapter.register_schema("research_finding", research_schema)
adapter.put("agent-1", "finding-42", {
"topic": "inference",
"finding": "Continuous batching reduces latency",
"confidence": 0.95,
"sources": ["arxiv:2309.17453"],
"timestamp": 1724150400
}, schema="research_finding") # validated at write time
Event Sourcing
All memory operations are append-only events, enabling full audit trails and time-travel debugging:
# Replay all writes from a specific agent
events = store.replay(agent_id="researcher-1", from_version=0)
for event in events:
print(f"[v{event.version}] {event.operation}: {event.key} = {event.value}")
Examples
Multi-Agent Research Pipeline
# Planner (LangGraph) writes research plan
planner.put("planner", "research_plan", {
"topic": "AI agent memory systems",
"subtopics": ["vector memory", "graph memory", "episodic memory"],
"deadline": "2026-08-22"
})
# Researcher (CrewAI) reads plan and writes findings
plan = researcher.get("planner", "research_plan")
for subtopic in plan.value["subtopics"]:
findings = researcher.search_web(subtopic)
researcher.put("researcher", f"findings_{subtopic}", findings)
# Synthesizer (AutoGen) reads all findings and writes report
all_findings = synthesizer.query(
filter={"key_regex": "findings_.*"},
agent_ids=["researcher"]
)
synthesizer.put("synthesizer", "final_report", generate_report(all_findings))
Pros
- Eliminates memory silos between agent frameworks
- Framework-agnostic — works with any supported agent
- Strong typing prevents memory corruption
- Event sourcing enables time-travel debugging
- Open-source with active community (~2.1K stars)
- 12 vector backend options for flexible deployment
- Bi-directional translation enables true cross-framework collaboration
Cons
- Early-stage project at 2.1K stars
- Adapter quality varies by framework maturity
- State translation may lose framework-specific nuances
- No built-in storage — requires external vector backend
- Limited documentation for advanced patterns
- Conflict resolution is basic (Last-Writer-Wins default)
When to Use
Use memory-interop when:
- You have agents built on multiple frameworks that need shared state
- You're migrating between agent frameworks and need memory continuity
- You need a unified memory layer for multi-agent orchestration
- You require cross-framework agent collaboration in production
Avoid if:
- You use only one agent framework (use its native memory instead)
- You need real-time synchronous memory across agents (event sourcing adds latency)
- Your memory needs are simple (a single vector DB is sufficient)
