Memstate Documentation
Give your AI agents structured, versioned memory they can navigate. Custom LLM models extract keypaths automatically, detect conflicts, and compress context.
MCP Server
Connect Claude, Cursor, Cline, and other MCP-enabled agents directly to Memstate. The fastest way to get started.
Get startedREST API
Integrate memory storage and recall directly into your backend services, chatbots, and custom applications.
View API referenceSetup guide for AI assistants
Canonical checklist for any AI system helping a user install Memstate: API keys, npx @memstate/mcp setup, MCP JSON, per-agent docs, and verification. Linked from /llms.txt.
Benchmark Methodology
Understand the open-source benchmark suite, scoring rubric, fairness notes, and scenario design used to evaluate memory systems.
Explore benchmark docsLeaderboard
See current standings across accuracy, conflict detection, continuity, and overall weighted score.
View rankingsCore Concepts
Custom LLM Intelligence
Our custom-trained models extract structured memories from raw text. Just send content via memstate_remember and we handle keypath extraction, conflict detection, and versioning automatically.
Keypaths
Memories are organized hierarchically using dot-separated paths like auth.provider or database.schema.users. This gives agents a navigable structure rather than a flat list.
Version Control
Every memory is versioned. When content is updated via supersede, the previous version is preserved in history. Agents can trace decisions back through time.
Conflict Detection & Versioning
When memories conflict or a parent keypath changes, the system automatically resolves it by versioning — both versions are preserved in history. Every change is fully auditable without any manual review step.
Token Efficiency
Structured keypath = value atoms instead of text blobs. Agents get precision facts, not context soup. Typically reduces token usage by 80% compared to traditional RAG.
Time-Travel Queries
Use memstate_get_keypaths with the at_revision parameter to see memory state at any point in history. Understand what your agent knew when decisions were made.
Context Compression
Summaries are generated automatically. Agents get a compressed view of their memory first, then drill into full content only when needed.
Keypath Hierarchy
Which integration should I use?
MCP Server is the recommended integration for AI coding agents like Claude, Cursor, Cline, and Windsurf. It connects directly via the Model Context Protocol.
LangChain & LangGraph — install langchain-memstate for a drop-in LangGraph BaseStore, retriever, chat history, and agent tools. See the LangChain integration docs.
REST API is for backend services and custom applications like chatbot memory, knowledge bases, multi-agent orchestration, and any system that needs programmatic memory management.