# Memstate AI - Deterministic Memory for Agents # https://memstate.ai # Last updated: 2026-07-02 ## API key and pricing Memstate requires an **API key** for the hosted service (MCP and REST). Create one in the dashboard after sign-in: https://memstate.ai/dashboard/api-keys There is a **generous free tier** (memories, projects, and MCP tools—see Pricing below). Paid tiers add higher limits and priority processing. ## 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. ## Setup hub (all listed agents + one-liner) **Primary index:** https://memstate.ai/docs/setup **One-liner MCP setup** (auto-detects installed agents, writes MCP config, opens browser to create an API key): ``` npx @memstate/mcp setup ``` No local package install is required for MCP—`npx` runs `@memstate/mcp` on demand. ### Agents with step-by-step guides (config file locations) | Agent | Where MCP config usually lives | Guide | |-------|-------------------------------|-------| | Claude Desktop & Claude Code | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS path; see guide for other OS) | https://memstate.ai/docs/setup/claude | | Cursor | `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global) | https://memstate.ai/docs/setup/cursor | | Cline (VS Code) | VS Code Settings → Cline MCP Settings | https://memstate.ai/docs/setup/cline | | Windsurf | `~/.codeium/windsurf/mcp_config.json` | https://memstate.ai/docs/setup/windsurf | | Gemini CLI | `~/.gemini/settings.json` | https://memstate.ai/docs/setup/gemini | | Kilo Code | VS Code Settings → Kilo Code MCP Settings | https://memstate.ai/docs/setup/kilo | | GitHub Copilot | `.github/copilot-instructions.md` + MCP config | https://memstate.ai/docs/setup/copilot | ### Other agents (not individually listed) Any **MCP-compatible** client can use Memstate: add the universal MCP block (below) to that client’s MCP configuration. You can also integrate via the **REST API** without MCP. Listed agents are documented for convenience; **lack of a named guide does not mean lack of support**—it is still “configure the MCP server” and/or “call the REST API.” ## MCP server — docs and install - MCP overview: https://memstate.ai/docs/mcp - MCP setup & installation (manual steps, env vars): https://memstate.ai/docs/mcp/setup - MCP tools reference (`memstate_get`, `memstate_remember`, etc.): https://memstate.ai/docs/mcp/tools - Open-source MCP package: https://github.com/memstate-ai/memstate-mcp ### Universal MCP configuration (merge into your client’s `mcpServers`) ```json { "mcpServers": { "memstate": { "command": "npx", "args": ["-y", "@memstate/mcp"], "env": { "MEMSTATE_API_KEY": "YOUR_API_KEY_HERE" } } } } ``` Replace `YOUR_API_KEY_HERE` with a key from the dashboard. ## Agent Skill (SKILL.md) — behavioral instructions for coding agents The **Memstate Skill** teaches agents when to read memory before tasks and save summaries after. It complements the MCP server (the skill does not replace the API key or MCP/REST connectivity). - **Documentation & install:** https://memstate.ai/docs/skills - **Quick install** (auto-detects agents, installs skill files, updates `AGENTS.md` where applicable): ``` npx @memstate/skills setup ``` - **Source repository:** https://github.com/memstate-ai/memstate-skills **Prerequisite:** Configure Memstate MCP (or REST) with a valid API key first—e.g. `npx @memstate/mcp setup` or https://memstate.ai/docs/mcp/setup **Typical skill locations** (the `npx @memstate/skills setup` CLI places files correctly; examples): - Claude Code: `.claude/skills/memstate/SKILL.md` (project) or `~/.claude/skills/memstate/SKILL.md` (global) - Cursor: `.cursor/rules/memstate.mdc` or `~/.cursor/rules/memstate.mdc` - Cline: `.clinerules/memstate.md` - Kilo Code: `.kilocode/skills/memstate/SKILL.md` or `~/.kilocode/skills/memstate/SKILL.md` - Windsurf: `.windsurf/rules/memstate.md` - Universal: append skill content to `AGENTS.md` / `CLAUDE.md` / `GEMINI.md` as described on the skills page. Manual one-liners and plugin marketplace options are on https://memstate.ai/docs/skills ## 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 Key benchmark results vs Mem0 (open-source, reproducible): - Fact Recall Accuracy: Memstate 92.2% vs Mem0 17.5% (5.3x more accurate) - Conflict Detection: Memstate 95.0% vs Mem0 20.2% (4.7x better) - Cross-Session Continuity: Memstate 88.7% vs Mem0 17.2% (5.2x better) 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 (quick links) 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 - Agent Skill install: https://memstate.ai/docs/skills ## 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. ## 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_search(query="...", project_id="...")` by default for targeted context. Use `memstate_get(project_id="...", keypath="...")` when you know the subtree. `memstate_get(project_id="...")` with no keypath returns the full project tree — discovery/exploration only. **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 per agent) - 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 ### Agent Skills (SKILL.md) - Agent Skills overview & install: https://memstate.ai/docs/skills ### 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 ### SEO / compare / blog - Mem0 alternative: https://memstate.ai/mem0-alternative - Mem0 vs Memstate: https://memstate.ai/compare/mem0-vs-memstate - Blog index: https://memstate.ai/blog ### Blog — research & benchmarks - The Challenges of Building a Fair AI Memory Benchmark: https://memstate.ai/blog/building-a-fair-ai-memory-benchmark - AI Memory Benchmark 2026 (Memstate vs Mem0 vs Vector Search): https://memstate.ai/blog/ai-memory-benchmark-2026 ### Blog — AI concepts & fundamentals - Why Vector RAG Fails for AI Agent Memory: https://memstate.ai/blog/why-vector-rag-fails-for-agent-memory - What is an AI Agent Memory System?: https://memstate.ai/blog/what-is-ai-agent-memory - Why Your AI Coding Agent Keeps Forgetting Things: https://memstate.ai/blog/why-your-ai-coding-agent-keeps-forgetting - Why AI Coding Agents Hallucinate (And How Memory Fixes It): https://memstate.ai/blog/why-ai-agents-hallucinate - AI Agent vs Chatbot: What is the Actual Difference?: https://memstate.ai/blog/what-is-an-ai-agent-vs-chatbot ### Blog — tooling & comparisons - Vibe Coding Best Practices: How to Actually Ship with AI: https://memstate.ai/blog/vibe-coding-best-practices - Cursor vs Windsurf vs Cline vs Kilo Code (2026 Comparison): https://memstate.ai/blog/cursor-vs-windsurf-vs-cline-vs-kilo-code-2026 - Windsurf vs Cursor: Which AI IDE is Better for Vibe Coding?: https://memstate.ai/blog/windsurf-vs-cursor-for-ai-coding ### Blog — architecture & frameworks - Cursor Rules and MCP Memory: How They Work Together: https://memstate.ai/blog/cursor-rules-and-mcp-memory - What is the Model Context Protocol (MCP)? A Simple Explanation: https://memstate.ai/blog/what-is-model-context-protocol-mcp - Multi-Agent Memory Systems: How to Make AI Agents Collaborate: https://memstate.ai/blog/multi-agent-memory-systems - LangChain Memory vs MCP: Which Should You Use?: https://memstate.ai/blog/langchain-memory-vs-mcp - LangChain vs LlamaIndex: Which is Better for AI Agents?: https://memstate.ai/blog/langchain-vs-llamaindex-for-agents ### Blog — IDE setup tutorials - How to add memory to Claude: https://memstate.ai/blog/how-to-add-memory-to-claude - How to add memory to Cursor: https://memstate.ai/blog/how-to-add-memory-to-cursor - How to add memory to Cline: https://memstate.ai/blog/how-to-add-memory-to-cline - How to add memory to Windsurf: https://memstate.ai/blog/how-to-add-memory-to-windsurf - How to add memory to Kilo Code: https://memstate.ai/blog/how-to-add-memory-to-kilo-code ### Blog — developer tutorials - How to Cut Your AI Coding Costs with Memory: https://memstate.ai/blog/how-to-cut-ai-coding-costs-with-memory - How to Write Cursor Rules That Actually Work: https://memstate.ai/blog/how-to-write-cursor-rules-that-actually-work - How to Build an MCP Server (Model Context Protocol): https://memstate.ai/blog/how-to-build-an-mcp-server - How to Add Persistent Memory to LangChain Agents: https://memstate.ai/blog/how-to-add-persistent-memory-to-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