Give Your Coding Agent Memory in 5 Minutes
agentmemory is an open-source tool that lets Claude Code, Cursor, Copilot, and other agents remember your project across sessions. Here's how to run it.
Every new session, you re-explain the same things. Your architecture. The bug you already fixed. Why you picked one library over another. The agent forgets everything the moment you close it.
agentmemory fixes that. It's an open-source tool (Apache-2.0, 19k+ stars) that runs a small memory server on your machine. It quietly records what your agent does, turns it into searchable memory, and feeds the right context back at the start of the next session. One server works across Claude Code, Cursor, Copilot, Codex, Gemini CLI, and any MCP client.
Repo: github.com/rohitg00/agentmemory. Below is the shortest path to running it yourself.
You need Node.js 18+ installed. That's it — no database, no Docker, no API keys. Check your version:
node --versionThe fastest way to see it work is npx. This downloads and starts the memory server on port 3111:
npx @agentmemory/agentmemoryOpen a second terminal and run the demo. It loads three realistic sessions (JWT auth, an N+1 query fix, rate limiting) and runs searches against them:
npx @agentmemory/agentmemory demoSearch "database performance" and it finds the "N+1 query fix" — keyword matching can't do that.
Open the real-time viewer in your browser. You'll see memories form as the agent works:
http://localhost:3113npx caches per version and can serve a stale build. Once you're sold, install it globally so the bare agentmemory command works everywhere:
npm install -g @agentmemory/agentmemory
# if you hit EACCES on macOS/Linux, retry with sudo
agentmemory # start the server
agentmemory stop # tear it downConnect the server to whichever agent you use. For Claude Code:
agentmemory connect claude-code
# also: copilot-cli, codex, cursor, gemini-cli, ...Check the health endpoint. A 200 response means the server is up and your agent now has persistent memory:
curl http://localhost:3111/agentmemory/healthBuilt-in memory like CLAUDE.md or .cursorrules caps out fast and goes stale — you maintain it by hand. agentmemory captures context automatically and retrieves it semantically, so the agent recalls *why* you made a decision, not just *what* the file says.
That's the difference between an agent that needs onboarding every morning and one that already knows your codebase. Five minutes to set up, and you stop repeating yourself.
Product leader shipping across enterprise SaaS, AI in production, and 0→1. Writing about what actually ships — not what sounds good in a deck.