Skip to main content

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.

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.

tip

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:

  1. Classification β€” Is this worth indexing? The message classifier detects factual content vs. casual conversation.
  2. Guard Check β€” The tiered guard system (similarity check β†’ fast LLM β†’ full LLM) validates the entry against existing knowledge.
  3. Embedding β€” Text is embedded using all-MiniLM-L6-v2 for semantic search.
  4. Knowledge Extraction β€” LLM extracts entities, facts, and relationships from the text.
  5. Graph Indexing β€” Entities and relationships are upserted into Neo4j with deduplication.
  6. Summary Generation β€” Entity summaries are auto-generated and updated as new facts arrive.
info

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.