{
  "type": "comparison",
  "id": "agent-memory-layers",
  "title": "Memory layers for AI agents",
  "summary": "Mem0, LangMem, the Claude memory tool, Graphiti, Zep, Cognee and Letta compared on memory model, who writes memories, self-hosting and license, hosted pricing, MCP servers, SDK languages and framework ties.",
  "author": "Agentica Author",
  "tags": [
    "memory",
    "agents",
    "knowledge-graphs",
    "vector-search",
    "mcp"
  ],
  "published": "2026-10-13",
  "last_verified": "2026-10-13",
  "entries": [
    "mem0",
    "langmem",
    "claude-memory-tool",
    "graphiti",
    "zep",
    "cognee",
    "letta",
    "graphiti-mcp-server",
    "langgraph",
    "supermemory",
    "pgvector",
    "qdrant"
  ],
  "links": {
    "html": "https://indexagentica.com/compare/agent-memory-layers/",
    "markdown": "https://indexagentica.com/compare/agent-memory-layers.md",
    "json": "https://indexagentica.com/api/longform/compare/agent-memory-layers.json",
    "source": "https://github.com/Drudley/indexagentica/blob/main/content-long/compare/agent-memory-layers.md"
  },
  "status": "published",
  "comparison": {
    "subjects": [
      {
        "id": "mem0",
        "name": "Mem0",
        "summary": "Memory layer for AI agents and apps: drop-in persistent memory that lets agents learn from past interactions.",
        "url": "https://indexagentica.com/entries/mem0/",
        "json": "https://indexagentica.com/api/entries/mem0.json"
      },
      {
        "id": "langmem",
        "name": "LangMem",
        "summary": "LangChain library that helps agents learn from interactions: memory tools, a background memory manager and prompt optimization, with native LangGraph store integration.",
        "url": "https://indexagentica.com/entries/langmem/",
        "json": "https://indexagentica.com/api/entries/langmem.json"
      },
      {
        "id": "claude-memory-tool",
        "name": "Claude Memory Tool",
        "summary": "Client-side Claude API tool that lets Claude create, read, update and delete files in a /memories directory to persist knowledge across conversations.",
        "url": "https://indexagentica.com/entries/claude-memory-tool/",
        "json": "https://indexagentica.com/api/entries/claude-memory-tool.json"
      },
      {
        "id": "graphiti",
        "name": "Graphiti",
        "summary": "Zep's open-source framework for building real-time knowledge graphs for AI agents.",
        "url": "https://indexagentica.com/entries/graphiti/",
        "json": "https://indexagentica.com/api/entries/graphiti.json"
      },
      {
        "id": "zep",
        "name": "Zep",
        "summary": "Unified context layer that combines business data, documents and conversations into governed context and memory for agents.",
        "url": "https://indexagentica.com/entries/zep/",
        "json": "https://indexagentica.com/api/entries/zep.json"
      },
      {
        "id": "cognee",
        "name": "Cognee",
        "summary": "Open-source AI memory platform for agents that turns documents and conversations into graph, vector and relational memory.",
        "url": "https://indexagentica.com/entries/cognee/",
        "json": "https://indexagentica.com/api/entries/cognee.json"
      },
      {
        "id": "letta",
        "name": "Letta",
        "summary": "Platform for stateful agents with memory, identity and the ability to learn over time (formerly MemGPT); terminal UI, App Server, desktop app and Agent SDK.",
        "url": "https://indexagentica.com/entries/letta/",
        "json": "https://indexagentica.com/api/entries/letta.json"
      }
    ],
    "criteria": [
      "Memory model",
      "How memories are written",
      "Self-host and license",
      "Hosted pricing",
      "MCP server",
      "SDK languages",
      "Framework ties"
    ],
    "rows": {
      "mem0": {
        "Memory model": "Extracted facts in a vector store, scoped by user_id, agent_id and run_id. Graph memory has been removed from the open-source package and is Platform-only",
        "How memories are written": "Your app calls add() and an LLM extracts facts. The Platform adds background consolidation (Dream), memory decay and webhooks",
        "Self-host and license": "Apache-2.0. Use as a library or run the self-hosted server with docker compose (auth on by default)",
        "Hosted pricing": "Hobby free (10k adds and 1k retrievals per month); Starter $19/mo; Pro $249/mo. Graph memory and Dream are listed on Pro and above",
        "MCP server": "Hosted at https://mcp.mem0.ai/mcp, with OAuth sign-in or an API key as a bearer token",
        "SDK languages": "Python (mem0ai) and Node (mem0ai), plus a CLI",
        "Framework ties": "Framework-agnostic, with a LangGraph integration"
      },
      "langmem": {
        "Memory model": "Memories stored as items in a LangGraph BaseStore (for example InMemoryStore or AsyncPostgresStore), searched by namespace",
        "How memories are written": "Both: hot-path manage and search tools the agent calls, and a background memory manager. Also does prompt optimization",
        "Self-host and license": "MIT library; you run it with your own store",
        "Hosted pricing": "No hosted service of its own",
        "MCP server": "None found",
        "SDK languages": "Python",
        "Framework ties": "Built for LangGraph, through its long-term memory store"
      },
      "claude-memory-tool": {
        "Memory model": "Files under a /memories directory that Claude reads and edits",
        "How memories are written": "In the conversation: Claude issues view, create, str_replace, insert, delete and rename commands, and your app executes them",
        "Self-host and license": "Client-side tool, so storage is whatever backend you implement. Your code must reject paths outside /memories",
        "Hosted pricing": "No separate fee; it is a tool type in the Claude API",
        "MCP server": "Not applicable; it is a Claude API tool (type memory_20250818)",
        "SDK languages": "Helpers in Python, TypeScript, C# and Java; a local filesystem helper in Python and TypeScript. No helper in Go or Ruby",
        "Framework ties": "Claude 4 and later models only"
      },
      "graphiti": {
        "Memory model": "Temporal knowledge graph with bi-temporal tracking; outdated facts are invalidated, not deleted",
        "How memories are written": "Your app ingests episodes and Graphiti extracts entities and facts incrementally",
        "Self-host and license": "Apache-2.0, self-hosted only. Needs Neo4j, FalkorDB or Amazon Neptune",
        "Hosted pricing": "None for Graphiti itself; Zep is the managed product from the same team",
        "MCP server": "Experimental Graphiti MCP server: HTTP at localhost:8000/mcp/ or stdio, Docker Compose with FalkorDB by default",
        "SDK languages": "Python 3.10+",
        "Framework ties": "Framework-agnostic"
      },
      "zep": {
        "Memory model": "Managed context graph built on a proprietary engine (temporal knowledge graph)",
        "How memories are written": "Your app sends messages or data as episodes; Zep builds the graph in the background",
        "Self-host and license": "Managed SaaS or BYOC; proprietary. The getzep/zep repo now holds examples only",
        "Hosted pricing": "Free trial 10k credits/month; Flex $125/mo (50k credits); Flex Plus $375/mo (200k). One credit per episode up to 350 bytes; retrieval and storage free",
        "MCP server": "Context MCP server at https://api.getzep.com/mcp, with end-user sign-in through your IdP; seats vary by plan",
        "SDK languages": "Python, TypeScript and Go",
        "Framework ties": "Framework-agnostic"
      },
      "cognee": {
        "Memory model": "Combined graph, vector and relational memory",
        "How memories are written": "Your app calls remember, recall and improve; can run on local models when no LLM key is set",
        "Self-host and license": "Apache-2.0. API, UI and MCP run locally. Using Postgres as the graph store is for demos; the production option is licensed",
        "Hosted pricing": "Cloud Free $0 (1M tokens, 1 workspace); Standard $1 per 1M tokens plus $5 per extra workspace; Enterprise BYOC",
        "MCP server": "Cognee MCP server (Docker quickstart, port 8001 by default) for Claude Code, Cursor, Codex and others",
        "SDK languages": "Python; also an OpenClaw plugin on npm",
        "Framework ties": "Framework-agnostic"
      },
      "letta": {
        "Memory model": "MemFS: a git-versioned memory filesystem",
        "How memories are written": "The agent edits its own memory in the conversation, plus background dreaming",
        "Self-host and license": "Apache-2.0 (letta-code). Runs locally without an account, or as a self-hosted App Server. The old letta-ai/letta server is retired",
        "Hosted pricing": "Free (BYOK, up to 3 stateful agents); Pro $20/mo (up to 20 agents); developer API plans are usage-based",
        "MCP server": "Hosted Letta MCP server; agents can also connect to stdio, HTTP and SSE MCP servers",
        "SDK languages": "TypeScript (Agent SDK); CLI on npm (Node 22.19+)",
        "Framework ties": "A full stateful agent runtime, not a plug-in layer"
      }
    },
    "table": [
      {
        "entry": "mem0",
        "name": "Mem0",
        "url": "https://indexagentica.com/entries/mem0/",
        "values": {
          "Memory model": "Extracted facts in a vector store, scoped by user_id, agent_id and run_id. Graph memory has been removed from the open-source package and is Platform-only",
          "How memories are written": "Your app calls add() and an LLM extracts facts. The Platform adds background consolidation (Dream), memory decay and webhooks",
          "Self-host and license": "Apache-2.0. Use as a library or run the self-hosted server with docker compose (auth on by default)",
          "Hosted pricing": "Hobby free (10k adds and 1k retrievals per month); Starter $19/mo; Pro $249/mo. Graph memory and Dream are listed on Pro and above",
          "MCP server": "Hosted at https://mcp.mem0.ai/mcp, with OAuth sign-in or an API key as a bearer token",
          "SDK languages": "Python (mem0ai) and Node (mem0ai), plus a CLI",
          "Framework ties": "Framework-agnostic, with a LangGraph integration"
        }
      },
      {
        "entry": "langmem",
        "name": "LangMem",
        "url": "https://indexagentica.com/entries/langmem/",
        "values": {
          "Memory model": "Memories stored as items in a LangGraph BaseStore (for example InMemoryStore or AsyncPostgresStore), searched by namespace",
          "How memories are written": "Both: hot-path manage and search tools the agent calls, and a background memory manager. Also does prompt optimization",
          "Self-host and license": "MIT library; you run it with your own store",
          "Hosted pricing": "No hosted service of its own",
          "MCP server": "None found",
          "SDK languages": "Python",
          "Framework ties": "Built for LangGraph, through its long-term memory store"
        }
      },
      {
        "entry": "claude-memory-tool",
        "name": "Claude Memory Tool",
        "url": "https://indexagentica.com/entries/claude-memory-tool/",
        "values": {
          "Memory model": "Files under a /memories directory that Claude reads and edits",
          "How memories are written": "In the conversation: Claude issues view, create, str_replace, insert, delete and rename commands, and your app executes them",
          "Self-host and license": "Client-side tool, so storage is whatever backend you implement. Your code must reject paths outside /memories",
          "Hosted pricing": "No separate fee; it is a tool type in the Claude API",
          "MCP server": "Not applicable; it is a Claude API tool (type memory_20250818)",
          "SDK languages": "Helpers in Python, TypeScript, C# and Java; a local filesystem helper in Python and TypeScript. No helper in Go or Ruby",
          "Framework ties": "Claude 4 and later models only"
        }
      },
      {
        "entry": "graphiti",
        "name": "Graphiti",
        "url": "https://indexagentica.com/entries/graphiti/",
        "values": {
          "Memory model": "Temporal knowledge graph with bi-temporal tracking; outdated facts are invalidated, not deleted",
          "How memories are written": "Your app ingests episodes and Graphiti extracts entities and facts incrementally",
          "Self-host and license": "Apache-2.0, self-hosted only. Needs Neo4j, FalkorDB or Amazon Neptune",
          "Hosted pricing": "None for Graphiti itself; Zep is the managed product from the same team",
          "MCP server": "Experimental Graphiti MCP server: HTTP at localhost:8000/mcp/ or stdio, Docker Compose with FalkorDB by default",
          "SDK languages": "Python 3.10+",
          "Framework ties": "Framework-agnostic"
        }
      },
      {
        "entry": "zep",
        "name": "Zep",
        "url": "https://indexagentica.com/entries/zep/",
        "values": {
          "Memory model": "Managed context graph built on a proprietary engine (temporal knowledge graph)",
          "How memories are written": "Your app sends messages or data as episodes; Zep builds the graph in the background",
          "Self-host and license": "Managed SaaS or BYOC; proprietary. The getzep/zep repo now holds examples only",
          "Hosted pricing": "Free trial 10k credits/month; Flex $125/mo (50k credits); Flex Plus $375/mo (200k). One credit per episode up to 350 bytes; retrieval and storage free",
          "MCP server": "Context MCP server at https://api.getzep.com/mcp, with end-user sign-in through your IdP; seats vary by plan",
          "SDK languages": "Python, TypeScript and Go",
          "Framework ties": "Framework-agnostic"
        }
      },
      {
        "entry": "cognee",
        "name": "Cognee",
        "url": "https://indexagentica.com/entries/cognee/",
        "values": {
          "Memory model": "Combined graph, vector and relational memory",
          "How memories are written": "Your app calls remember, recall and improve; can run on local models when no LLM key is set",
          "Self-host and license": "Apache-2.0. API, UI and MCP run locally. Using Postgres as the graph store is for demos; the production option is licensed",
          "Hosted pricing": "Cloud Free $0 (1M tokens, 1 workspace); Standard $1 per 1M tokens plus $5 per extra workspace; Enterprise BYOC",
          "MCP server": "Cognee MCP server (Docker quickstart, port 8001 by default) for Claude Code, Cursor, Codex and others",
          "SDK languages": "Python; also an OpenClaw plugin on npm",
          "Framework ties": "Framework-agnostic"
        }
      },
      {
        "entry": "letta",
        "name": "Letta",
        "url": "https://indexagentica.com/entries/letta/",
        "values": {
          "Memory model": "MemFS: a git-versioned memory filesystem",
          "How memories are written": "The agent edits its own memory in the conversation, plus background dreaming",
          "Self-host and license": "Apache-2.0 (letta-code). Runs locally without an account, or as a self-hosted App Server. The old letta-ai/letta server is retired",
          "Hosted pricing": "Free (BYOK, up to 3 stateful agents); Pro $20/mo (up to 20 agents); developer API plans are usage-based",
          "MCP server": "Hosted Letta MCP server; agents can also connect to stdio, HTTP and SSE MCP servers",
          "SDK languages": "TypeScript (Agent SDK); CLI on npm (Node 22.19+)",
          "Framework ties": "A full stateful agent runtime, not a plug-in layer"
        }
      }
    ],
    "verdict": "Inside LangGraph, use LangMem. On Claude, the memory tool is the simplest option and the data stays in your storage. Mem0 is the most portable layer, with a free tier and a hosted MCP endpoint, but graph memory is now paid-only. For facts that change over time, use Graphiti (self-hosted) or Zep (managed, metered per episode). Cognee mixes graph and vector memory and runs on local models. Letta is a whole agent runtime that edits its own memory."
  },
  "entries_detail": [
    {
      "id": "mem0",
      "name": "Mem0",
      "summary": "Memory layer for AI agents and apps: drop-in persistent memory that lets agents learn from past interactions.",
      "url": "https://indexagentica.com/entries/mem0/",
      "json": "https://indexagentica.com/api/entries/mem0.json"
    },
    {
      "id": "langmem",
      "name": "LangMem",
      "summary": "LangChain library that helps agents learn from interactions: memory tools, a background memory manager and prompt optimization, with native LangGraph store integration.",
      "url": "https://indexagentica.com/entries/langmem/",
      "json": "https://indexagentica.com/api/entries/langmem.json"
    },
    {
      "id": "claude-memory-tool",
      "name": "Claude Memory Tool",
      "summary": "Client-side Claude API tool that lets Claude create, read, update and delete files in a /memories directory to persist knowledge across conversations.",
      "url": "https://indexagentica.com/entries/claude-memory-tool/",
      "json": "https://indexagentica.com/api/entries/claude-memory-tool.json"
    },
    {
      "id": "graphiti",
      "name": "Graphiti",
      "summary": "Zep's open-source framework for building real-time knowledge graphs for AI agents.",
      "url": "https://indexagentica.com/entries/graphiti/",
      "json": "https://indexagentica.com/api/entries/graphiti.json"
    },
    {
      "id": "zep",
      "name": "Zep",
      "summary": "Unified context layer that combines business data, documents and conversations into governed context and memory for agents.",
      "url": "https://indexagentica.com/entries/zep/",
      "json": "https://indexagentica.com/api/entries/zep.json"
    },
    {
      "id": "cognee",
      "name": "Cognee",
      "summary": "Open-source AI memory platform for agents that turns documents and conversations into graph, vector and relational memory.",
      "url": "https://indexagentica.com/entries/cognee/",
      "json": "https://indexagentica.com/api/entries/cognee.json"
    },
    {
      "id": "letta",
      "name": "Letta",
      "summary": "Platform for stateful agents with memory, identity and the ability to learn over time (formerly MemGPT); terminal UI, App Server, desktop app and Agent SDK.",
      "url": "https://indexagentica.com/entries/letta/",
      "json": "https://indexagentica.com/api/entries/letta.json"
    },
    {
      "id": "graphiti-mcp-server",
      "name": "Graphiti MCP Server",
      "summary": "Experimental MCP server exposing Graphiti's temporally-aware knowledge graphs (episodes, entities, semantic/hybrid search) to AI assistants.",
      "url": "https://indexagentica.com/entries/graphiti-mcp-server/",
      "json": "https://indexagentica.com/api/entries/graphiti-mcp-server.json"
    },
    {
      "id": "langgraph",
      "name": "LangGraph",
      "summary": "Low-level orchestration framework from LangChain for building resilient, stateful agents as graphs.",
      "url": "https://indexagentica.com/entries/langgraph/",
      "json": "https://indexagentica.com/api/entries/langgraph.json"
    },
    {
      "id": "supermemory",
      "name": "Supermemory",
      "summary": "Memory and context engine for AI agents with a Memory API; can run fully locally or hosted.",
      "url": "https://indexagentica.com/entries/supermemory/",
      "json": "https://indexagentica.com/api/entries/supermemory.json"
    },
    {
      "id": "pgvector",
      "name": "pgvector",
      "summary": "Open-source vector similarity search extension for Postgres.",
      "url": "https://indexagentica.com/entries/pgvector/",
      "json": "https://indexagentica.com/api/entries/pgvector.json"
    },
    {
      "id": "qdrant",
      "name": "Qdrant",
      "summary": "Open-source vector search engine and database written in Rust, self-hosted or as Qdrant Cloud.",
      "url": "https://indexagentica.com/entries/qdrant/",
      "json": "https://indexagentica.com/api/entries/qdrant.json"
    }
  ],
  "related": [
    {
      "type": "guide",
      "id": "give-an-agent-long-term-memory",
      "title": "Give an agent long-term memory",
      "url": "https://indexagentica.com/guides/give-an-agent-long-term-memory/",
      "json": "https://indexagentica.com/api/longform/guides/give-an-agent-long-term-memory.json"
    },
    {
      "type": "comparison",
      "id": "vector-databases-for-agents",
      "title": "Vector databases for agents compared",
      "url": "https://indexagentica.com/compare/vector-databases-for-agents/",
      "json": "https://indexagentica.com/api/longform/compare/vector-databases-for-agents.json"
    },
    {
      "type": "guide",
      "id": "connect-an-agent-to-a-remote-mcp-server",
      "title": "Connect an agent to a remote MCP server",
      "url": "https://indexagentica.com/guides/connect-an-agent-to-a-remote-mcp-server/",
      "json": "https://indexagentica.com/api/longform/guides/connect-an-agent-to-a-remote-mcp-server.json"
    },
    {
      "type": "comparison",
      "id": "agent-identity-and-mcp-auth",
      "title": "Agent identity and MCP authorization platforms",
      "url": "https://indexagentica.com/compare/agent-identity-and-mcp-auth/",
      "json": "https://indexagentica.com/api/longform/compare/agent-identity-and-mcp-auth.json"
    },
    {
      "type": "comparison",
      "id": "personal-agent-runtimes",
      "title": "OpenClaw vs Hermes Agent vs Pi: open-source agents you run yourself",
      "url": "https://indexagentica.com/compare/personal-agent-runtimes/",
      "json": "https://indexagentica.com/api/longform/compare/personal-agent-runtimes.json"
    }
  ],
  "sources": [
    {
      "title": "Mem0 README",
      "url": "https://github.com/mem0ai/mem0",
      "accessed": "2026-10-13"
    },
    {
      "title": "Mem0 pricing",
      "url": "https://mem0.ai/pricing",
      "accessed": "2026-10-13"
    },
    {
      "title": "Mem0 documentation",
      "url": "https://docs.mem0.ai/llms.txt",
      "accessed": "2026-10-13"
    },
    {
      "title": "LangMem README",
      "url": "https://github.com/langchain-ai/langmem",
      "accessed": "2026-10-13"
    },
    {
      "title": "Claude docs, Memory tool",
      "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool",
      "accessed": "2026-10-13"
    },
    {
      "title": "Graphiti README",
      "url": "https://github.com/getzep/graphiti",
      "accessed": "2026-10-13"
    },
    {
      "title": "Graphiti MCP server",
      "url": "https://github.com/getzep/graphiti/tree/main/mcp_server",
      "accessed": "2026-10-13"
    },
    {
      "title": "Zep pricing",
      "url": "https://www.getzep.com/pricing",
      "accessed": "2026-10-13"
    },
    {
      "title": "Zep documentation",
      "url": "https://help.getzep.com/llms.txt",
      "accessed": "2026-10-13"
    },
    {
      "title": "Cognee README",
      "url": "https://github.com/topoteretes/cognee",
      "accessed": "2026-10-13"
    },
    {
      "title": "Cognee pricing",
      "url": "https://www.cognee.ai/pricing",
      "accessed": "2026-10-13"
    },
    {
      "title": "Letta Code repository",
      "url": "https://github.com/letta-ai/letta-code",
      "accessed": "2026-10-13"
    },
    {
      "title": "Letta documentation",
      "url": "https://docs.letta.com/llms.txt",
      "accessed": "2026-10-13"
    }
  ],
  "front_matter": {
    "id": "agent-memory-layers",
    "type": "comparison",
    "title": "Memory layers for AI agents",
    "summary": "Mem0, LangMem, the Claude memory tool, Graphiti, Zep, Cognee and Letta compared on memory model, who writes memories, self-hosting and license, hosted pricing, MCP servers, SDK languages and framework ties.",
    "description": "A primary-source comparison of seven ways to give an agent long-term memory, from a file directory the model edits itself to managed temporal knowledge graphs. Licenses, prices and MCP endpoints were checked against each project's repository, docs and pricing page on 2026-10-13. Vendors meter different things (requests, credits per episode, tokens, agents), so model your own traffic before comparing on price.",
    "author": "Agentica Author",
    "tags": [
      "memory",
      "agents",
      "knowledge-graphs",
      "vector-search",
      "mcp"
    ],
    "entries": [
      "mem0",
      "langmem",
      "claude-memory-tool",
      "graphiti",
      "zep",
      "cognee",
      "letta",
      "graphiti-mcp-server",
      "langgraph",
      "supermemory",
      "pgvector",
      "qdrant"
    ],
    "related": [
      "give-an-agent-long-term-memory",
      "vector-databases-for-agents",
      "connect-an-agent-to-a-remote-mcp-server",
      "agent-identity-and-mcp-auth",
      "personal-agent-runtimes"
    ],
    "subjects": [
      "mem0",
      "langmem",
      "claude-memory-tool",
      "graphiti",
      "zep",
      "cognee",
      "letta"
    ],
    "criteria": [
      "Memory model",
      "How memories are written",
      "Self-host and license",
      "Hosted pricing",
      "MCP server",
      "SDK languages",
      "Framework ties"
    ],
    "rows": {
      "mem0": {
        "Memory model": "Extracted facts in a vector store, scoped by user_id, agent_id and run_id. Graph memory has been removed from the open-source package and is Platform-only",
        "How memories are written": "Your app calls add() and an LLM extracts facts. The Platform adds background consolidation (Dream), memory decay and webhooks",
        "Self-host and license": "Apache-2.0. Use as a library or run the self-hosted server with docker compose (auth on by default)",
        "Hosted pricing": "Hobby free (10k adds and 1k retrievals per month); Starter $19/mo; Pro $249/mo. Graph memory and Dream are listed on Pro and above",
        "MCP server": "Hosted at https://mcp.mem0.ai/mcp, with OAuth sign-in or an API key as a bearer token",
        "SDK languages": "Python (mem0ai) and Node (mem0ai), plus a CLI",
        "Framework ties": "Framework-agnostic, with a LangGraph integration"
      },
      "langmem": {
        "Memory model": "Memories stored as items in a LangGraph BaseStore (for example InMemoryStore or AsyncPostgresStore), searched by namespace",
        "How memories are written": "Both: hot-path manage and search tools the agent calls, and a background memory manager. Also does prompt optimization",
        "Self-host and license": "MIT library; you run it with your own store",
        "Hosted pricing": "No hosted service of its own",
        "MCP server": "None found",
        "SDK languages": "Python",
        "Framework ties": "Built for LangGraph, through its long-term memory store"
      },
      "claude-memory-tool": {
        "Memory model": "Files under a /memories directory that Claude reads and edits",
        "How memories are written": "In the conversation: Claude issues view, create, str_replace, insert, delete and rename commands, and your app executes them",
        "Self-host and license": "Client-side tool, so storage is whatever backend you implement. Your code must reject paths outside /memories",
        "Hosted pricing": "No separate fee; it is a tool type in the Claude API",
        "MCP server": "Not applicable; it is a Claude API tool (type memory_20250818)",
        "SDK languages": "Helpers in Python, TypeScript, C# and Java; a local filesystem helper in Python and TypeScript. No helper in Go or Ruby",
        "Framework ties": "Claude 4 and later models only"
      },
      "graphiti": {
        "Memory model": "Temporal knowledge graph with bi-temporal tracking; outdated facts are invalidated, not deleted",
        "How memories are written": "Your app ingests episodes and Graphiti extracts entities and facts incrementally",
        "Self-host and license": "Apache-2.0, self-hosted only. Needs Neo4j, FalkorDB or Amazon Neptune",
        "Hosted pricing": "None for Graphiti itself; Zep is the managed product from the same team",
        "MCP server": "Experimental Graphiti MCP server: HTTP at localhost:8000/mcp/ or stdio, Docker Compose with FalkorDB by default",
        "SDK languages": "Python 3.10+",
        "Framework ties": "Framework-agnostic"
      },
      "zep": {
        "Memory model": "Managed context graph built on a proprietary engine (temporal knowledge graph)",
        "How memories are written": "Your app sends messages or data as episodes; Zep builds the graph in the background",
        "Self-host and license": "Managed SaaS or BYOC; proprietary. The getzep/zep repo now holds examples only",
        "Hosted pricing": "Free trial 10k credits/month; Flex $125/mo (50k credits); Flex Plus $375/mo (200k). One credit per episode up to 350 bytes; retrieval and storage free",
        "MCP server": "Context MCP server at https://api.getzep.com/mcp, with end-user sign-in through your IdP; seats vary by plan",
        "SDK languages": "Python, TypeScript and Go",
        "Framework ties": "Framework-agnostic"
      },
      "cognee": {
        "Memory model": "Combined graph, vector and relational memory",
        "How memories are written": "Your app calls remember, recall and improve; can run on local models when no LLM key is set",
        "Self-host and license": "Apache-2.0. API, UI and MCP run locally. Using Postgres as the graph store is for demos; the production option is licensed",
        "Hosted pricing": "Cloud Free $0 (1M tokens, 1 workspace); Standard $1 per 1M tokens plus $5 per extra workspace; Enterprise BYOC",
        "MCP server": "Cognee MCP server (Docker quickstart, port 8001 by default) for Claude Code, Cursor, Codex and others",
        "SDK languages": "Python; also an OpenClaw plugin on npm",
        "Framework ties": "Framework-agnostic"
      },
      "letta": {
        "Memory model": "MemFS: a git-versioned memory filesystem",
        "How memories are written": "The agent edits its own memory in the conversation, plus background dreaming",
        "Self-host and license": "Apache-2.0 (letta-code). Runs locally without an account, or as a self-hosted App Server. The old letta-ai/letta server is retired",
        "Hosted pricing": "Free (BYOK, up to 3 stateful agents); Pro $20/mo (up to 20 agents); developer API plans are usage-based",
        "MCP server": "Hosted Letta MCP server; agents can also connect to stdio, HTTP and SSE MCP servers",
        "SDK languages": "TypeScript (Agent SDK); CLI on npm (Node 22.19+)",
        "Framework ties": "A full stateful agent runtime, not a plug-in layer"
      }
    },
    "verdict": "Inside LangGraph, use LangMem. On Claude, the memory tool is the simplest option and the data stays in your storage. Mem0 is the most portable layer, with a free tier and a hosted MCP endpoint, but graph memory is now paid-only. For facts that change over time, use Graphiti (self-hosted) or Zep (managed, metered per episode). Cognee mixes graph and vector memory and runs on local models. Letta is a whole agent runtime that edits its own memory.",
    "sources": [
      {
        "title": "Mem0 README",
        "url": "https://github.com/mem0ai/mem0",
        "accessed": "2026-10-13"
      },
      {
        "title": "Mem0 pricing",
        "url": "https://mem0.ai/pricing",
        "accessed": "2026-10-13"
      },
      {
        "title": "Mem0 documentation",
        "url": "https://docs.mem0.ai/llms.txt",
        "accessed": "2026-10-13"
      },
      {
        "title": "LangMem README",
        "url": "https://github.com/langchain-ai/langmem",
        "accessed": "2026-10-13"
      },
      {
        "title": "Claude docs, Memory tool",
        "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool",
        "accessed": "2026-10-13"
      },
      {
        "title": "Graphiti README",
        "url": "https://github.com/getzep/graphiti",
        "accessed": "2026-10-13"
      },
      {
        "title": "Graphiti MCP server",
        "url": "https://github.com/getzep/graphiti/tree/main/mcp_server",
        "accessed": "2026-10-13"
      },
      {
        "title": "Zep pricing",
        "url": "https://www.getzep.com/pricing",
        "accessed": "2026-10-13"
      },
      {
        "title": "Zep documentation",
        "url": "https://help.getzep.com/llms.txt",
        "accessed": "2026-10-13"
      },
      {
        "title": "Cognee README",
        "url": "https://github.com/topoteretes/cognee",
        "accessed": "2026-10-13"
      },
      {
        "title": "Cognee pricing",
        "url": "https://www.cognee.ai/pricing",
        "accessed": "2026-10-13"
      },
      {
        "title": "Letta Code repository",
        "url": "https://github.com/letta-ai/letta-code",
        "accessed": "2026-10-13"
      },
      {
        "title": "Letta documentation",
        "url": "https://docs.letta.com/llms.txt",
        "accessed": "2026-10-13"
      }
    ],
    "last_verified": "2026-10-13",
    "published": "2026-10-13"
  },
  "markdown": "\n## How to read this table\n\nAsk two questions first: what shape does a memory take, and who writes it? File-based memory ([Claude memory tool](https://indexagentica.com/entries/claude-memory-tool/), [Letta](https://indexagentica.com/entries/letta/)'s MemFS) lets the model curate plain text itself. A fact-extraction layer ([Mem0](https://indexagentica.com/entries/mem0/), [LangMem](https://indexagentica.com/entries/langmem/)) turns conversations into short searchable facts. A temporal graph ([Graphiti](https://indexagentica.com/entries/graphiti/), [Zep](https://indexagentica.com/entries/zep/), [Cognee](https://indexagentica.com/entries/cognee/)) also records how facts relate and when they stopped being true.\n\nWriting memories during the conversation (the agent calls a tool) makes them visible and easy to debug, but it adds latency and costs tokens. Background writing (a manager, consolidation or \"dreaming\" job) keeps the response fast, but the memories show up later. LangMem, Mem0 Platform and Letta offer both.\n\n## Standout findings\n\n- **Mem0 open source no longer includes graph memory.** It is a Platform feature, listed on the Pro tier ($249/mo) and above.\n- **Letta's original server repo is retired.** Current development is in `letta-code` (Apache-2.0), built around a git-versioned memory filesystem.\n- **Zep is managed or BYOC only.** For a self-hosted temporal graph, use [Graphiti](https://indexagentica.com/entries/graphiti/) directly, with its experimental [MCP server](https://indexagentica.com/entries/graphiti-mcp-server/).\n- **The Claude memory tool runs on your side.** Anthropic stores nothing for it. Your handler decides where the files live and must block path traversal.\n\n## Choosing\n\nFor a step-by-step build with these tools, see [Give an agent long-term memory](https://indexagentica.com/guides/give-an-agent-long-term-memory/). If you only need a vector store you control, [pgvector](https://indexagentica.com/entries/pgvector/) or [Qdrant](https://indexagentica.com/entries/qdrant/) under your own extraction logic may be enough. [Supermemory](https://indexagentica.com/entries/supermemory/) is another hosted option that this table does not cover.\n",
  "raw": "---\nid: agent-memory-layers\ntype: comparison\ntitle: Memory layers for AI agents\nsummary: Mem0, LangMem, the Claude memory tool, Graphiti, Zep, Cognee and Letta compared on memory model, who writes memories, self-hosting and license, hosted pricing, MCP servers, SDK languages and framework ties.\ndescription: \"A primary-source comparison of seven ways to give an agent long-term memory, from a file directory the model edits itself to managed temporal knowledge graphs. Licenses, prices and MCP endpoints were checked against each project's repository, docs and pricing page on 2026-10-13. Vendors meter different things (requests, credits per episode, tokens, agents), so model your own traffic before comparing on price.\"\nauthor: Agentica Author\ntags: [memory, agents, knowledge-graphs, vector-search, mcp]\nentries: [mem0, langmem, claude-memory-tool, graphiti, zep, cognee, letta, graphiti-mcp-server, langgraph, supermemory, pgvector, qdrant]\nrelated: [give-an-agent-long-term-memory, vector-databases-for-agents, connect-an-agent-to-a-remote-mcp-server, agent-identity-and-mcp-auth, personal-agent-runtimes]\nsubjects: [mem0, langmem, claude-memory-tool, graphiti, zep, cognee, letta]\ncriteria:\n  - Memory model\n  - How memories are written\n  - Self-host and license\n  - Hosted pricing\n  - MCP server\n  - SDK languages\n  - Framework ties\nrows:\n  mem0:\n    Memory model: \"Extracted facts in a vector store, scoped by user_id, agent_id and run_id. Graph memory has been removed from the open-source package and is Platform-only\"\n    How memories are written: \"Your app calls add() and an LLM extracts facts. The Platform adds background consolidation (Dream), memory decay and webhooks\"\n    Self-host and license: \"Apache-2.0. Use as a library or run the self-hosted server with docker compose (auth on by default)\"\n    Hosted pricing: \"Hobby free (10k adds and 1k retrievals per month); Starter $19/mo; Pro $249/mo. Graph memory and Dream are listed on Pro and above\"\n    MCP server: \"Hosted at https://mcp.mem0.ai/mcp, with OAuth sign-in or an API key as a bearer token\"\n    SDK languages: \"Python (mem0ai) and Node (mem0ai), plus a CLI\"\n    Framework ties: \"Framework-agnostic, with a LangGraph integration\"\n  langmem:\n    Memory model: \"Memories stored as items in a LangGraph BaseStore (for example InMemoryStore or AsyncPostgresStore), searched by namespace\"\n    How memories are written: \"Both: hot-path manage and search tools the agent calls, and a background memory manager. Also does prompt optimization\"\n    Self-host and license: \"MIT library; you run it with your own store\"\n    Hosted pricing: \"No hosted service of its own\"\n    MCP server: \"None found\"\n    SDK languages: Python\n    Framework ties: \"Built for LangGraph, through its long-term memory store\"\n  claude-memory-tool:\n    Memory model: \"Files under a /memories directory that Claude reads and edits\"\n    How memories are written: \"In the conversation: Claude issues view, create, str_replace, insert, delete and rename commands, and your app executes them\"\n    Self-host and license: \"Client-side tool, so storage is whatever backend you implement. Your code must reject paths outside /memories\"\n    Hosted pricing: \"No separate fee; it is a tool type in the Claude API\"\n    MCP server: \"Not applicable; it is a Claude API tool (type memory_20250818)\"\n    SDK languages: \"Helpers in Python, TypeScript, C# and Java; a local filesystem helper in Python and TypeScript. No helper in Go or Ruby\"\n    Framework ties: \"Claude 4 and later models only\"\n  graphiti:\n    Memory model: \"Temporal knowledge graph with bi-temporal tracking; outdated facts are invalidated, not deleted\"\n    How memories are written: \"Your app ingests episodes and Graphiti extracts entities and facts incrementally\"\n    Self-host and license: \"Apache-2.0, self-hosted only. Needs Neo4j, FalkorDB or Amazon Neptune\"\n    Hosted pricing: \"None for Graphiti itself; Zep is the managed product from the same team\"\n    MCP server: \"Experimental Graphiti MCP server: HTTP at localhost:8000/mcp/ or stdio, Docker Compose with FalkorDB by default\"\n    SDK languages: \"Python 3.10+\"\n    Framework ties: \"Framework-agnostic\"\n  zep:\n    Memory model: \"Managed context graph built on a proprietary engine (temporal knowledge graph)\"\n    How memories are written: \"Your app sends messages or data as episodes; Zep builds the graph in the background\"\n    Self-host and license: \"Managed SaaS or BYOC; proprietary. The getzep/zep repo now holds examples only\"\n    Hosted pricing: \"Free trial 10k credits/month; Flex $125/mo (50k credits); Flex Plus $375/mo (200k). One credit per episode up to 350 bytes; retrieval and storage free\"\n    MCP server: \"Context MCP server at https://api.getzep.com/mcp, with end-user sign-in through your IdP; seats vary by plan\"\n    SDK languages: \"Python, TypeScript and Go\"\n    Framework ties: \"Framework-agnostic\"\n  cognee:\n    Memory model: \"Combined graph, vector and relational memory\"\n    How memories are written: \"Your app calls remember, recall and improve; can run on local models when no LLM key is set\"\n    Self-host and license: \"Apache-2.0. API, UI and MCP run locally. Using Postgres as the graph store is for demos; the production option is licensed\"\n    Hosted pricing: \"Cloud Free $0 (1M tokens, 1 workspace); Standard $1 per 1M tokens plus $5 per extra workspace; Enterprise BYOC\"\n    MCP server: \"Cognee MCP server (Docker quickstart, port 8001 by default) for Claude Code, Cursor, Codex and others\"\n    SDK languages: \"Python; also an OpenClaw plugin on npm\"\n    Framework ties: \"Framework-agnostic\"\n  letta:\n    Memory model: \"MemFS: a git-versioned memory filesystem\"\n    How memories are written: \"The agent edits its own memory in the conversation, plus background dreaming\"\n    Self-host and license: \"Apache-2.0 (letta-code). Runs locally without an account, or as a self-hosted App Server. The old letta-ai/letta server is retired\"\n    Hosted pricing: \"Free (BYOK, up to 3 stateful agents); Pro $20/mo (up to 20 agents); developer API plans are usage-based\"\n    MCP server: \"Hosted Letta MCP server; agents can also connect to stdio, HTTP and SSE MCP servers\"\n    SDK languages: \"TypeScript (Agent SDK); CLI on npm (Node 22.19+)\"\n    Framework ties: \"A full stateful agent runtime, not a plug-in layer\"\nverdict: \"Inside LangGraph, use LangMem. On Claude, the memory tool is the simplest option and the data stays in your storage. Mem0 is the most portable layer, with a free tier and a hosted MCP endpoint, but graph memory is now paid-only. For facts that change over time, use Graphiti (self-hosted) or Zep (managed, metered per episode). Cognee mixes graph and vector memory and runs on local models. Letta is a whole agent runtime that edits its own memory.\"\nsources:\n  - {title: Mem0 README, url: \"https://github.com/mem0ai/mem0\", accessed: 2026-10-13}\n  - {title: Mem0 pricing, url: \"https://mem0.ai/pricing\", accessed: 2026-10-13}\n  - {title: Mem0 documentation, url: \"https://docs.mem0.ai/llms.txt\", accessed: 2026-10-13}\n  - {title: LangMem README, url: \"https://github.com/langchain-ai/langmem\", accessed: 2026-10-13}\n  - {title: \"Claude docs, Memory tool\", url: \"https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool\", accessed: 2026-10-13}\n  - {title: Graphiti README, url: \"https://github.com/getzep/graphiti\", accessed: 2026-10-13}\n  - {title: Graphiti MCP server, url: \"https://github.com/getzep/graphiti/tree/main/mcp_server\", accessed: 2026-10-13}\n  - {title: Zep pricing, url: \"https://www.getzep.com/pricing\", accessed: 2026-10-13}\n  - {title: Zep documentation, url: \"https://help.getzep.com/llms.txt\", accessed: 2026-10-13}\n  - {title: Cognee README, url: \"https://github.com/topoteretes/cognee\", accessed: 2026-10-13}\n  - {title: Cognee pricing, url: \"https://www.cognee.ai/pricing\", accessed: 2026-10-13}\n  - {title: Letta Code repository, url: \"https://github.com/letta-ai/letta-code\", accessed: 2026-10-13}\n  - {title: Letta documentation, url: \"https://docs.letta.com/llms.txt\", accessed: 2026-10-13}\nlast_verified: 2026-10-13\npublished: 2026-10-13\n---\n\n## How to read this table\n\nAsk two questions first: what shape does a memory take, and who writes it? File-based memory ([Claude memory tool](https://indexagentica.com/entries/claude-memory-tool/), [Letta](https://indexagentica.com/entries/letta/)'s MemFS) lets the model curate plain text itself. A fact-extraction layer ([Mem0](https://indexagentica.com/entries/mem0/), [LangMem](https://indexagentica.com/entries/langmem/)) turns conversations into short searchable facts. A temporal graph ([Graphiti](https://indexagentica.com/entries/graphiti/), [Zep](https://indexagentica.com/entries/zep/), [Cognee](https://indexagentica.com/entries/cognee/)) also records how facts relate and when they stopped being true.\n\nWriting memories during the conversation (the agent calls a tool) makes them visible and easy to debug, but it adds latency and costs tokens. Background writing (a manager, consolidation or \"dreaming\" job) keeps the response fast, but the memories show up later. LangMem, Mem0 Platform and Letta offer both.\n\n## Standout findings\n\n- **Mem0 open source no longer includes graph memory.** It is a Platform feature, listed on the Pro tier ($249/mo) and above.\n- **Letta's original server repo is retired.** Current development is in `letta-code` (Apache-2.0), built around a git-versioned memory filesystem.\n- **Zep is managed or BYOC only.** For a self-hosted temporal graph, use [Graphiti](https://indexagentica.com/entries/graphiti/) directly, with its experimental [MCP server](https://indexagentica.com/entries/graphiti-mcp-server/).\n- **The Claude memory tool runs on your side.** Anthropic stores nothing for it. Your handler decides where the files live and must block path traversal.\n\n## Choosing\n\nFor a step-by-step build with these tools, see [Give an agent long-term memory](https://indexagentica.com/guides/give-an-agent-long-term-memory/). If you only need a vector store you control, [pgvector](https://indexagentica.com/entries/pgvector/) or [Qdrant](https://indexagentica.com/entries/qdrant/) under your own extraction logic may be enough. [Supermemory](https://indexagentica.com/entries/supermemory/) is another hosted option that this table does not cover.\n",
  "html": "<h2>How to read this table</h2>\n<p>Ask two questions first: what shape does a memory take, and who writes it? File-based memory (<a href=\"/entries/claude-memory-tool/\">Claude memory tool</a>, <a href=\"/entries/letta/\">Letta</a>&#39;s MemFS) lets the model curate plain text itself. A fact-extraction layer (<a href=\"/entries/mem0/\">Mem0</a>, <a href=\"/entries/langmem/\">LangMem</a>) turns conversations into short searchable facts. A temporal graph (<a href=\"/entries/graphiti/\">Graphiti</a>, <a href=\"/entries/zep/\">Zep</a>, <a href=\"/entries/cognee/\">Cognee</a>) also records how facts relate and when they stopped being true.</p>\n<p>Writing memories during the conversation (the agent calls a tool) makes them visible and easy to debug, but it adds latency and costs tokens. Background writing (a manager, consolidation or &quot;dreaming&quot; job) keeps the response fast, but the memories show up later. LangMem, Mem0 Platform and Letta offer both.</p>\n<h2>Standout findings</h2>\n<ul><li><strong>Mem0 open source no longer includes graph memory.</strong> It is a Platform feature, listed on the Pro tier ($249/mo) and above.</li><li><strong>Letta&#39;s original server repo is retired.</strong> Current development is in <code>letta-code</code> (Apache-2.0), built around a git-versioned memory filesystem.</li><li><strong>Zep is managed or BYOC only.</strong> For a self-hosted temporal graph, use <a href=\"/entries/graphiti/\">Graphiti</a> directly, with its experimental <a href=\"/entries/graphiti-mcp-server/\">MCP server</a>.</li><li><strong>The Claude memory tool runs on your side.</strong> Anthropic stores nothing for it. Your handler decides where the files live and must block path traversal.</li></ul>\n<h2>Choosing</h2>\n<p>For a step-by-step build with these tools, see <a href=\"/guides/give-an-agent-long-term-memory/\">Give an agent long-term memory</a>. If you only need a vector store you control, <a href=\"/entries/pgvector/\">pgvector</a> or <a href=\"/entries/qdrant/\">Qdrant</a> under your own extraction logic may be enough. <a href=\"/entries/supermemory/\">Supermemory</a> is another hosted option that this table does not cover.</p>"
}
