Overview β What is SharedMemory?
SharedMemory is the persistent memory layer for AI agents. It lets any AI β whether it's a Claude MCP tool, a custom agent, or a CLI script β remember facts, learn from documents, and share knowledge across tools and teammates.
With SharedMemory, developers get production-ready infrastructure for:
- Agent memory β Auto-extracted knowledge graphs from conversations and documents
- Guard system β Intelligent validation that prevents duplicates, conflicts, and noise
- Hybrid retrieval β Vector search + graph traversal for perfect recall
- Shared volumes β Isolated, shareable memory spaces with real-time sync
How does it work? (at a glance)β
βοΈ Writeβ
Agents write facts, documents, and conversations to SharedMemory. Each entry goes through an intelligent guard pipeline that checks for duplicates, conflicts, and quality.
π§ Extractβ
The knowledge extraction engine automatically builds a structured knowledge graph β entities, facts, relationships, and summaries β from raw text.
π Searchβ
Hybrid retrieval combines vector semantic search (Qdrant) with knowledge graph traversal (Neo4j) to find the most relevant context for any query.
π₯ Shareβ
Volumes are isolated memory spaces. Private volumes for personal use, shared volumes for team collaboration. Real-time sync via WebSocket.
SharedMemory is context engineeringβ
Unlike simple RAG systems that just chunk and embed documents, SharedMemory builds a living knowledge graph from your data:
- Entities β People, projects, technologies, organizations extracted from your content
- Facts β Specific, attributed pieces of knowledge linked to entities
- Relationships β How entities connect (e.g.,
John WORKED_AT Google,React USED_IN ProjectAlpha) - Summaries β Auto-generated, evolving summaries for each entity
This means when you ask "What does John know about React?", SharedMemory doesn't just do keyword matching β it traverses the graph from John β skills β React and synthesizes a real answer.
All knowledge extraction is automatic. You don't define entities, tag relationships, or clean up stale data. Just write memories and search naturally.
Architectureβ
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β SDK / CLI ββββββΆβ Agent API ββββββΆβ Guard LLM β
β MCP Server β β (Express) β β (Approve/ β
β Dashboard β β β β Reject) β
βββββββββββββββ ββββββββ¬ββββββββ ββββββββ¬βββββββ
β β
ββββββββΌββββββββ ββββββββΌβββββββ
β PostgreSQL β β BullMQ β
β (Source of β β (Redis) β
β Truth) β β Job Queue β
ββββββββββββββββ ββββββββ¬βββββββ
β
ββββββββββββββββββββββββββββββΌβ
β Knowledge Pipeline β
β ββββββββββ βββββββββββββ β
β β Qdrant β β Neo4j β β
β β(Vector)β β (Graph) β β
β ββββββββββ βββββββββββββ β
ββββββββββββββββββββββββββββββββ
Ingestion and Extractionβ
When data enters SharedMemory:
- Classification β Is this worth indexing? The message classifier detects factual content vs. casual conversation.
- Guard Check β The tiered guard system (similarity check β fast LLM β full LLM) validates the entry against existing knowledge.
- Embedding β Text is embedded using
all-MiniLM-L6-v2for semantic search. - Knowledge Extraction β LLM extracts entities, facts, and relationships from the text.
- Graph Indexing β Entities and relationships are upserted into Neo4j with deduplication.
- Summary Generation β Entity summaries are auto-generated and updated as new facts arrive.
See How it Works for the full pipeline breakdown with diagrams.
Memory API β Learned user contextβ
Every query to SharedMemory is enriched with:
- Vector search results from Qdrant (semantic similarity)
- Knowledge graph traversal from Neo4j (entity relationships)
- Document sources with chunk-level attribution
- Conversation history for multi-turn context
This context can be injected into any LLM prompt to build agents that truly remember.
Next stepsβ
βΆοΈ Quickstartβ
Make your first API call in under 5 minutes.
βοΈ How it Worksβ
Understand the full knowledge pipeline architecture.
π API Referenceβ
Explore all endpoints with examples and schemas.
π¦ SDKs & MCPβ
TypeScript SDK, CLI, and MCP Server for Claude and Cursor.