{
 "schema_version": 1,
 "generated": "2026-10-27",
 "url": "https://dedupedai.com/best-ai-repos-for/agent-memory/",
 "task": "long-term memory for AI agents",
 "question": "What is the best open-source memory system for AI agents?",
 "answer": "The best open-source AI repos for long-term memory for AI agents right now are Claude Mem, Hindsight and TencentDB Agent Memory. Claude-Mem is the most starred plug-in memory for coding agents; Hindsight is a general agent memory you call from code; ai-memory and Obsidian Mind keep memory as markdown files you can read and edit.",
 "md": "https://dedupedai.com/best-ai-repos-for/agent-memory/index.md",
 "repos": [
  {
   "repo": "thedotmack/claude-mem",
   "title": "Claude Mem",
   "url": "https://dedupedai.com/use-cases/thedotmack-claude-mem/",
   "github": "https://github.com/thedotmack/claude-mem",
   "what": "Claude-Mem is a persistent memory system that captures what coding agents do in a session, compresses it with AI, and injects relevant context back into later sessions.",
   "who": "Developers who run Claude Code, Codex, OpenCode, or OpenClaw on the same projects over many sessions and lose context between them.",
   "stars": 101511,
   "language": "TypeScript",
   "requirements": [
    "Node.js 20.0.0 or higher",
    "Claude Code with plugin support, or a supported agent host such as OpenCode or T3 Code",
    "A claude-mem sign-in or your own memory provider key, if you do not use the installer's local option",
    "Bun and uv, which the README says are auto-installed if missing"
   ],
   "uc_count": 4,
   "use_cases": [
    {
     "title": "Carry Claude Code project context into new sessions",
     "url": "https://dedupedai.com/use-cases/thedotmack-claude-mem/resume-claude-code-project-context/"
    },
    {
     "title": "Find past decisions and bug fixes before you repeat them",
     "url": "https://dedupedai.com/use-cases/thedotmack-claude-mem/search-past-decisions-in-claude-code/"
    },
    {
     "title": "Give Codex threads in T3 Code shared project memory",
     "url": "https://dedupedai.com/use-cases/thedotmack-claude-mem/add-shared-memory-to-t3-code-codex-threads/"
    }
   ],
   "best": {
    "title": "Carry Claude Code project context into new sessions",
    "url": "https://dedupedai.com/use-cases/thedotmack-claude-mem/resume-claude-code-project-context/",
    "difficulty": "Intermediate",
    "time": "15 minutes",
    "agents": [
     "claude-code"
    ],
    "steps": [
     "In Claude Code, run /plugin marketplace add thedotmack/claude-mem",
     "Run /plugin install claude-mem",
     "Restart Claude Code",
     "Start a new session in the same project and check that context from the previous session appears"
    ],
    "md": "https://dedupedai.com/use-cases/thedotmack-claude-mem/resume-claude-code-project-context/index.md"
   }
  },
  {
   "repo": "vectorize-io/hindsight",
   "title": "Hindsight",
   "url": "https://dedupedai.com/use-cases/vectorize-io-hindsight/",
   "github": "https://github.com/vectorize-io/hindsight",
   "what": "Hindsight is an open-source agent memory system focused on agents that learn, not just recall chat history. You store facts with retain, fetch them with recall, and get a reasoned answer over memory with reflect, organized in memory banks. It runs as a Docker container, with Docker Compose, from pip or on Kubernetes with Helm, has Python, Node.js and Go clients, and an LLM wrapper that adds memory to an existing OpenAI or Anthropic client in two lines.",
   "who": "Developers building assistants or agents that should remember users and past work across sessions.",
   "stars": 53493,
   "language": "Python",
   "requirements": [
    "Docker, pip or Kubernetes",
    "An LLM API key (OpenAI in the quick start)",
    "Python, Node.js or Go for the client"
   ],
   "uc_count": 3,
   "use_cases": [
    {
     "title": "Add long-term memory to an existing chatbot in two lines",
     "url": "https://dedupedai.com/use-cases/vectorize-io-hindsight/add-long-term-memory-to-your-agent-in-two-lines/"
    },
    {
     "title": "Store, search and reason over agent memory with retain, recall and reflect",
     "url": "https://dedupedai.com/use-cases/vectorize-io-hindsight/retain-recall-and-reflect-on-agent-memory/"
    },
    {
     "title": "Self-host the Hindsight memory server",
     "url": "https://dedupedai.com/use-cases/vectorize-io-hindsight/self-host-hindsight-with-docker/"
    }
   ],
   "best": {
    "title": "Add long-term memory to an existing chatbot in two lines",
    "url": "https://dedupedai.com/use-cases/vectorize-io-hindsight/add-long-term-memory-to-your-agent-in-two-lines/",
    "difficulty": "Beginner",
    "time": "20 minutes",
    "agents": [],
    "steps": [
     "Start a Hindsight server, for example with the Docker command from the README on ports 8888 and 9999",
     "Install the wrapper: pip install hindsight-litellm",
     "Import it with from hindsight_litellm import wrap_openai and wrap your OpenAI client, passing a bank_id per user and hindsight_api_url for a self-hosted server (http://localhost:8888)",
     "Call client.chat.completions.create as before; use wrap_anthropic() for the Anthropic SDK"
    ],
    "md": "https://dedupedai.com/use-cases/vectorize-io-hindsight/add-long-term-memory-to-your-agent-in-two-lines/index.md"
   }
  },
  {
   "repo": "TencentCloud/TencentDB-Agent-Memory",
   "title": "TencentDB Agent Memory",
   "url": "https://dedupedai.com/use-cases/tencentcloud-tencentdb-agent-memory/",
   "github": "https://github.com/TencentCloud/TencentDB-Agent-Memory",
   "what": "A team-level memory server for AI agents that stores chat memory, skills, wiki pages, and code graphs, and shares them across agents and frameworks.",
   "who": "Developers and small teams who run several AI coding agents and want them to share project context, skills, and code knowledge.",
   "stars": 29677,
   "language": "TypeScript",
   "requirements": [
    "Git and a bash-compatible shell",
    "Two sets of LLM API parameters for the memory group and the proxy group, filled into .env",
    "A local machine that can run the three services (memory-core, memory-hub, proxy)",
    "An agent client that accepts a custom base URL, such as Claude Code or Codex"
   ],
   "uc_count": 5,
   "use_cases": [
    {
     "title": "Give Claude Code and Codex one shared memory server",
     "url": "https://dedupedai.com/use-cases/tencentcloud-tencentdb-agent-memory/shared-memory-for-claude-code-and-codex/"
    },
    {
     "title": "Index an existing repo so agents check impact before editing",
     "url": "https://dedupedai.com/use-cases/tencentcloud-tencentdb-agent-memory/load-an-existing-codebase-into-codegraph/"
    },
    {
     "title": "Turn product docs into a wiki that all dev agents can read",
     "url": "https://dedupedai.com/use-cases/tencentcloud-tencentdb-agent-memory/turn-product-docs-into-a-shared-wiki/"
    }
   ],
   "best": {
    "title": "Give Claude Code and Codex one shared memory server",
    "url": "https://dedupedai.com/use-cases/tencentcloud-tencentdb-agent-memory/shared-memory-for-claude-code-and-codex/",
    "difficulty": "Intermediate",
    "time": "30 minutes",
    "agents": [
     "claude-code",
     "codex"
    ],
    "steps": [
     "Run git clone https://github.com/TencentCloud/TencentDB-Agent-Memory.git and then cd TencentDB-Agent-Memory/deploy/global-images",
     "Run cp .env.example .env, then open .env and fill in the two sets of LLM parameters (memory group and proxy group)",
     "Run ./start-all.sh and wait for it to finish; it prints a one-liner to paste into Claude",
     "Open http://localhost:8125 to confirm the panel loads",
     "Follow the Proxy setup for Claude Code or Codex in INSTALL.md by pointing the agent base URL to the Proxy"
    ],
    "md": "https://dedupedai.com/use-cases/tencentcloud-tencentdb-agent-memory/shared-memory-for-claude-code-and-codex/index.md"
   }
  },
  {
   "repo": "akitaonrails/ai-memory",
   "title": "AI Memory",
   "url": "https://dedupedai.com/use-cases/akitaonrails-ai-memory/",
   "github": "https://github.com/akitaonrails/ai-memory",
   "what": "ai-memory is a Rust tool that gives AI coding agents a shared long-term memory, stored as a git-backed markdown wiki, so work can be handed off between agent CLIs and machines.",
   "who": "Developers who switch between AI coding agents or machines and want the next agent to resume without re-explaining the project.",
   "stars": 12634,
   "language": "Rust",
   "requirements": [
    "A Linux or macOS machine (native Windows is experimental; WSL2 is supported)",
    "At least one supported coding agent CLI installed, such as Claude Code or Codex",
    "A terminal with curl and sh available"
   ],
   "uc_count": 4,
   "use_cases": [
    {
     "title": "Hand off a half-finished task from Claude Code to Codex",
     "url": "https://dedupedai.com/use-cases/akitaonrails-ai-memory/hand-off-task-between-claude-code-and-codex/"
    },
    {
     "title": "Resume a project on another machine with the same memory",
     "url": "https://dedupedai.com/use-cases/akitaonrails-ai-memory/keep-project-memory-in-sync-across-machines/"
    },
    {
     "title": "Share project knowledge across a team on one server",
     "url": "https://dedupedai.com/use-cases/akitaonrails-ai-memory/share-project-knowledge-with-a-small-team/"
    }
   ],
   "best": {
    "title": "Hand off a half-finished task from Claude Code to Codex",
    "url": "https://dedupedai.com/use-cases/akitaonrails-ai-memory/hand-off-task-between-claude-code-and-codex/",
    "difficulty": "Intermediate",
    "time": "15 minutes",
    "agents": [
     "claude-code",
     "codex"
    ],
    "steps": [
     "Run curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | sh",
     "Run ai-memory setup",
     "Quit Claude Code in the project directory",
     "Run ai-memory run codex from the same directory"
    ],
    "md": "https://dedupedai.com/use-cases/akitaonrails-ai-memory/hand-off-task-between-claude-code-and-codex/index.md"
   }
  },
  {
   "repo": "breferrari/obsidian-mind",
   "title": "Obsidian Mind",
   "url": "https://dedupedai.com/use-cases/breferrari-obsidian-mind/",
   "github": "https://github.com/breferrari/obsidian-mind",
   "what": "Obsidian Mind is an Obsidian vault template that gives AI coding agents persistent memory through hooks, slash commands and optional local QMD semantic search, built for Claude Code with hooks for Codex CLI and Gemini CLI.",
   "who": "Developers and engineering managers who want their coding agent to remember goals, people, decisions and wins across sessions.",
   "stars": 5373,
   "language": "TypeScript",
   "requirements": [
    "Obsidian",
    "Node.js for ShardMind and QMD",
    "Claude Code, Codex CLI or Gemini CLI"
   ],
   "uc_count": 3,
   "use_cases": [
    {
     "title": "Give your coding agent a memory that compounds",
     "url": "https://dedupedai.com/use-cases/breferrari-obsidian-mind/give-agent-persistent-memory-vault/"
    },
    {
     "title": "Run a daily standup and brain dump with your agent",
     "url": "https://dedupedai.com/use-cases/breferrari-obsidian-mind/daily-standup-and-brain-dump-commands/"
    },
    {
     "title": "Add offline semantic search to the vault",
     "url": "https://dedupedai.com/use-cases/breferrari-obsidian-mind/add-local-semantic-search-to-vault/"
    }
   ],
   "best": {
    "title": "Give your coding agent a memory that compounds",
    "url": "https://dedupedai.com/use-cases/breferrari-obsidian-mind/give-agent-persistent-memory-vault/",
    "difficulty": "Intermediate",
    "time": "30 minutes",
    "agents": [
     "claude-code",
     "codex",
     "gemini-cli"
    ],
    "steps": [
     "Install the vault manager: npm install -g shardmind",
     "Create a fresh folder and enter it: mkdir my-vault && cd my-vault",
     "Run shardmind install github:breferrari/obsidian-mind and answer the wizard (name, organization, agents, QMD)",
     "Open the folder as a vault in Obsidian so you can read what the agent writes",
     "Start your agent in the vault directory with claude, codex or gemini and say start session",
     "At the end of the day say wrap up so it verifies notes, updates indexes and spots uncaptured wins"
    ],
    "md": "https://dedupedai.com/use-cases/breferrari-obsidian-mind/give-agent-persistent-memory-vault/index.md"
   }
  },
  {
   "repo": "tigerless-labs/agent-memory",
   "title": "Agent Memory",
   "url": "https://dedupedai.com/use-cases/tigerless-labs-agent-memory/",
   "github": "https://github.com/tigerless-labs/agent-memory",
   "what": "agent-memory is a Python runtime that gives AI agents long-term memory stored as plain Markdown files, with local ranked retrieval and a sleep-time consolidation layer, and Claude Code and Codex share one store.",
   "who": "Developers who use Claude Code or Codex across many sessions and want decisions and context to carry over without an API key.",
   "stars": 4732,
   "language": "Python",
   "requirements": [
    "Python environment able to install the agent-memory package, as described in the README",
    "Claude Code or Codex CLI installed on the machine",
    "A store directory set as AGENT_MEMORY_STORE",
    "Shell access to run the mem commands"
   ],
   "uc_count": 5,
   "use_cases": [
    {
     "title": "Share one memory of decisions across Claude Code and Codex",
     "url": "https://dedupedai.com/use-cases/tigerless-labs-agent-memory/share-decisions-between-claude-code-and-codex/"
    },
    {
     "title": "Recover why a past decision was made and what it said then",
     "url": "https://dedupedai.com/use-cases/tigerless-labs-agent-memory/recover-why-a-past-decision-was-made/"
    },
    {
     "title": "Correct a stale memory without losing its history",
     "url": "https://dedupedai.com/use-cases/tigerless-labs-agent-memory/correct-a-stale-memory-without-losing-history/"
    }
   ],
   "best": {
    "title": "Share one memory of decisions across Claude Code and Codex",
    "url": "https://dedupedai.com/use-cases/tigerless-labs-agent-memory/share-decisions-between-claude-code-and-codex/",
    "difficulty": "Intermediate",
    "time": "60 minutes",
    "agents": [
     "claude-code",
     "codex"
    ],
    "steps": [
     "Run the setup step described in the README so the host agents use the shared store at AGENT_MEMORY_STORE.",
     "Run mem recall \"why files instead of a database\" to see the ranked L0 list of matching memories.",
     "Run mem context \"why files instead of a database\" to get the top hits expanded in one call.",
     "Open the same question in Codex and check that it returns the same memory paths."
    ],
    "md": "https://dedupedai.com/use-cases/tigerless-labs-agent-memory/share-decisions-between-claude-code-and-codex/index.md"
   }
  },
  {
   "repo": "mksglu/context-mode",
   "title": "Context Mode",
   "url": "https://dedupedai.com/use-cases/mksglu-context-mode/",
   "github": "https://github.com/mksglu/context-mode",
   "what": "Context Mode is an MCP server and hook set for AI coding agents that keeps raw tool output out of the context window, persists session memory in SQLite, and routes work across many clients.",
   "who": "Developers who use AI coding agents on large codebases and notice their context window filling up during long sessions.",
   "stars": 31762,
   "language": "TypeScript",
   "requirements": [
    "Claude Code v1.0.33+ for the plugin install, or Node.js >= 22.5 (or Bun) for the Gemini CLI setup",
    "An existing AI coding agent session in a project you want to work on"
   ],
   "uc_count": 5,
   "use_cases": [
    {
     "title": "Keep large tool output out of Claude Code's context",
     "url": "https://dedupedai.com/use-cases/mksglu-context-mode/cut-claude-code-context-bloat/"
    },
    {
     "title": "Count or summarize code with one script, not many reads",
     "url": "https://dedupedai.com/use-cases/mksglu-context-mode/run-analysis-as-a-script/"
    },
    {
     "title": "Pick up a coding task after the chat compacts",
     "url": "https://dedupedai.com/use-cases/mksglu-context-mode/resume-after-context-compaction/"
    }
   ],
   "best": {
    "title": "Keep large tool output out of Claude Code's context",
    "url": "https://dedupedai.com/use-cases/mksglu-context-mode/cut-claude-code-context-bloat/",
    "difficulty": "Beginner",
    "time": "15 minutes",
    "agents": [
     "claude-code"
    ],
    "steps": [
     "Run /plugin marketplace add mksglu/context-mode in Claude Code.",
     "Run /plugin install context-mode@context-mode.",
     "Restart Claude Code or run /reload-plugins.",
     "Run /context-mode:ctx-doctor and confirm all checks show [x].",
     "Work as usual, then run /context-mode:ctx-stats to see context savings by tool."
    ],
    "md": "https://dedupedai.com/use-cases/mksglu-context-mode/cut-claude-code-context-bloat/index.md"
   }
  },
  {
   "repo": "JordyZomer/lemmalog",
   "title": "Lemmalog",
   "url": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/",
   "github": "https://github.com/JordyZomer/lemmalog",
   "what": "Lemmalog is a Rust Datalog engine that gives LLM agents a deductive memory, exposed as an MCP server, a headless CLI, a REPL and an agent skill.",
   "who": "Developers who run Claude Code or another MCP-capable agent on long tasks and want its facts and derived conclusions kept in a queryable, provenance-tracked store.",
   "stars": 341,
   "language": "Rust",
   "requirements": [
    "Rust toolchain with cargo, and a clone of the lemmalog repo",
    "Claude Code (or Kimi CLI) installed if you want MCP tools",
    "A writable path for the memory snapshot, for example /tmp/lemmalog.snapshot or the default ~/.lemmalog/memory.snap"
   ],
   "uc_count": 4,
   "use_cases": [
    {
     "title": "Give Claude Code a persistent, queryable memory",
     "url": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/persistent-memory-for-claude-code/"
    },
    {
     "title": "Turn Claude Code into a disciplined investigator",
     "url": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/install-lemmalog-skill-for-investigations/"
    },
    {
     "title": "Feed facts into memory from scripts and cron",
     "url": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/schedule-fact-ingestion-from-scripts/"
    }
   ],
   "best": {
    "title": "Give Claude Code a persistent, queryable memory",
    "url": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/persistent-memory-for-claude-code/",
    "difficulty": "Intermediate",
    "time": "45 minutes",
    "agents": [
     "claude-code"
    ],
    "steps": [
     "Run cargo build --release in the repo to produce the lemmalog-cli binary used by later steps.",
     "Run cargo build --release --features mcp.",
     "Run claude mcp add lemmalog -- $(pwd)/target/release/lemmalog-mcp.",
     "Optionally register with persistence: claude mcp add lemmalog --env LEMMALOG_MCP_PATH=/tmp/lemmalog.snapshot -- $(pwd)/target/release/lemmalog-mcp.",
     "In Claude Code, call lemmalog_observe with facts such as Alice --works_at--> Acme and then lemmalog_query with a goal such as current(\"Alice\", R, O), quoting entity names."
    ],
    "md": "https://dedupedai.com/use-cases/jordyzomer-lemmalog/persistent-memory-for-claude-code/index.md"
   }
  }
 ]
}
