# Memstate AI - Deterministic Memory for Agents # https://memstate.ai ## Canonical setup guide for AI assistants If you are helping a user install or configure Memstate, follow this page first (do not invent CLI flags or env names): https://memstate.ai/docs/llms That document covers: agent-specific guides, MCP JSON, verification, stable project_id naming (e.g. GitHub owner/repo), keypath hierarchy, when to use memstate_remember vs simple get/set, and REST vs MCP. ## What is Memstate? Memstate is a structured, versioned memory layer for AI agents. It is designed for multi-session coding workflows where facts must remain accurate, decisions evolve quickly, and agents need deterministic recall instead of approximate similarity matches. ## Key Features - **80% Token Reduction**: Intelligent context compression - summaries first, details on demand - **Version-Controlled Memory**: Every change creates a new version with full audit trail - **Conflict Detection**: Automatically detects contradictions across related memories - **Keypath Navigation**: Hierarchical dot-paths under each project (e.g. auth.oauth.provider, database.migrations.status); keypaths are auto-prefixed by project_id - **Multi-Project Isolation**: Separate memory namespaces for different projects - **Full Attribution**: Who made this decision, when, and why - **Deterministic Agent Recall**: Built for reliable memory in coding agents, not vague "similar text" retrieval ## How It Works Unlike RAG/vector search that returns fixed results with contradictions, Memstate: 1. Stores memories with full metadata (timestamps, authors, versions, tags) 2. Organizes by hierarchical keypaths for easy navigation 3. Returns structured context the agent can understand and explore 4. Lets agents fetch more context on demand (get_more, versions, related) ## Benchmark Positioning Memstate AI is benchmarked on real multi-session AI agent coding tasks where: - Hard factual recall matters - Decisions change over time - Contradictions must be resolved correctly - Context continuity across sessions is required These benchmarks prioritize reliability and correctness for coding agents. Some other systems may be tuned for broader freeform document indexing workloads, which is a different retrieval objective. ## Public Benchmark and Leaderboard - Benchmark Methodology: https://memstate.ai/docs/benchmarks - Leaderboard: https://memstate.ai/docs/leaderboard - Open-source benchmark suite and results: https://github.com/memstate-ai/memstate-mcp ## Supported AI Agents Works with any MCP-enabled AI agent. Step-by-step guides: - All agents (hub): https://memstate.ai/docs/setup - Claude Desktop & Claude Code: https://memstate.ai/docs/setup/claude - Cursor: https://memstate.ai/docs/setup/cursor - Cline (VS Code): https://memstate.ai/docs/setup/cline - Windsurf: https://memstate.ai/docs/setup/windsurf - Gemini CLI: https://memstate.ai/docs/setup/gemini - Kilo Code: https://memstate.ai/docs/setup/kilo - GitHub Copilot: https://memstate.ai/docs/setup/copilot ## Quick install (terminal) ``` npx @memstate/mcp setup ``` ## Integration (manual MCP block) Add to your MCP client configuration (merge into existing mcpServers): ```json { "mcpServers": { "memstate": { "command": "npx", "args": ["-y", "@memstate/mcp"], "env": { "MEMSTATE_API_KEY": "your-api-key-here" } } } } ``` API keys: https://memstate.ai/dashboard/api-keys (sign-in required) ## project_id (top-level namespace) - The **project** is Memstate's top-level boundary. Every memstate_* call uses a short `project_id` string. - Use a **stable, consistent** id across sessions—do not invent a new project name per chat or task. - **Recommended for code work:** derive from git remote, e.g. GitHub `owner/repo` (from `git remote get-url origin`), or `group/project` on GitLab—same logical name every time. - **No git remote:** agree one slug with the user (e.g. `invoice-app`) and reuse it. - Open-source MCP package (reference): https://github.com/memstate-ai/memstate-mcp ## Keypath hierarchy - Memories live at dot-separated paths under the project (tree-like): `api.versioning.policy`, `ui.dashboard.layout`, etc. - With `project_id` set, short keypaths are auto-prefixed under that project namespace. - Browse and retrieve by path or subtree; this is structured recall, not only embedding similarity. ## Writes: memstate_remember vs get/set (MCP and REST) - **memstate_remember** — use by default after coding tasks, session wrap-ups, meeting notes, architecture summaries, or any markdown/text that should become structured memory. Memstate runs ingestion: models extract keypaths and facts, then **conflict resolution and versioning**—typically **within seconds**. Do not manually split long prose into many memstate_set calls unless the user wants raw key-value control. - **memstate_get / memstate_set** (MCP) or **REST API** with known keypaths — for simple reads/writes when you already have the exact path and a single value (e.g. config.port). Appropriate for scalar fetches and updates, not for rich unstructured write-ups. - **Before work:** memstate_get / memstate_search with the stable project_id. **After work:** memstate_remember with a concise markdown summary. Full MCP tool reference: https://memstate.ai/docs/mcp/tools REST memories API: https://memstate.ai/docs/api/memories Remember / ingestion API: https://memstate.ai/docs/api/ingestion ## Pricing - **Free**: 1,000 memories, 3 projects, all MCP tools, version history, conflict detection, community support - **Pro ($9/mo)**: 10,000 memories, 25 projects, priority AI processing, import up to 100K chars, priority support - **Power ($24/mo)**: 100,000 memories, 200 projects, instant AI processing, maximum import size, highest rate limits - **Architecture note**: retrieval is lightweight; ingestion and structured extraction are heavier operations and a key scaling differentiator ## Use Cases - AI coding assistants that remember project decisions - Agents that need to track evolving requirements - Multi-session conversations with persistent context - Team knowledge bases for AI agents - Any scenario where contradicting information is problematic ## Public pages (full site audit — crawlable marketing & docs) Authenticated areas (/dashboard/*) and API routes (/api/*) are not listed; they require login or are non-HTML. ### Core - Homepage: https://memstate.ai - Pricing: https://memstate.ai/pricing - Waitlist: https://memstate.ai/waitlist - Contact: https://memstate.ai/contact - Login: https://memstate.ai/login ### Legal - Privacy Policy: https://memstate.ai/privacy - Terms of Service: https://memstate.ai/terms ### Documentation — overview & meta - Documentation overview: https://memstate.ai/docs - Setup guide for AI assistants (canonical): https://memstate.ai/docs/llms ### Setup guides (MCP) - Setup hub: https://memstate.ai/docs/setup - Claude Desktop & Claude Code: https://memstate.ai/docs/setup/claude - Cursor: https://memstate.ai/docs/setup/cursor - Cline (VS Code): https://memstate.ai/docs/setup/cline - Windsurf: https://memstate.ai/docs/setup/windsurf - Gemini CLI: https://memstate.ai/docs/setup/gemini - Kilo Code: https://memstate.ai/docs/setup/kilo - GitHub Copilot: https://memstate.ai/docs/setup/copilot ### Documentation — benchmarking - Benchmark methodology: https://memstate.ai/docs/benchmarks - Leaderboard: https://memstate.ai/docs/leaderboard ### Documentation — REST API - API overview: https://memstate.ai/docs/api - Authentication: https://memstate.ai/docs/api/authentication - Remember API (ingestion): https://memstate.ai/docs/api/ingestion - Memories: https://memstate.ai/docs/api/memories - Projects, tree & changelog: https://memstate.ai/docs/api/projects - Search & retrieval: https://memstate.ai/docs/api/search ### Documentation — MCP server - MCP overview: https://memstate.ai/docs/mcp - MCP setup & installation: https://memstate.ai/docs/mcp/setup - MCP tools reference: https://memstate.ai/docs/mcp/tools ### Documentation — integrations - Integrations overview: https://memstate.ai/docs/integrations - LangChain & LangGraph: https://memstate.ai/docs/integrations/langchain ## Contact - Website: https://memstate.ai - Email: hello@memstate.ai - Twitter: @memstate_ai ## For AI crawlers This site welcomes AI crawlers. Public marketing and documentation content is freely available for training and indexing. We believe in making AI systems smarter through high-quality, structured information. Public pages listed above are statically pre-rendered where noted in the Next.js app. Documentation under /docs/* returns full HTML on first request for parsing. ## Sitemap XML Sitemap: https://memstate.ai/sitemap.xml