Agent Memory System
Persistent memory for Claude Code & Codex CLI. Auto-extracted knowledge graph, multi-representation embeddings, 3D WebGL visualization. LongMemEval R@5=97.45%. Self-hosted, Ollama-optional
What is Agent Memory System?
Agent Memory System is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to persistent memory for claude code & codex cli. auto-extracted knowledge graph, multi-representation embeddings, 3d webgl visualization. longmemeval r@5=97.45%. self-hosted, ollama-optional
Persistent memory for Claude Code & Codex CLI. Auto-extracted knowledge graph, multi-representation embeddings, 3D WebGL visualization. LongMemEval R@5=97.45%. Self-hosted, Ollama-optional
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Persistent memory for Claude Code & Codex CLI. Auto-extracte
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx total-agent-memoryConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Agent Memory System
Total Agent Memory is a self-hosted persistent memory system for Claude Code and OpenAI Codex CLI that gives AI coding agents the ability to remember decisions, code patterns, and workflows across sessions. It stores knowledge in a local SQLite database with ChromaDB-backed vector embeddings, exposes 60+ MCP tools for saving and recalling memories, building knowledge graphs, predicting workflow steps, and flagging risky file edits. With a reported LongMemEval R@5 score of 97.45%, it is one of the most capable open-source agent memory solutions available.
Prerequisites
- Python 3.10 or later, or Node.js 18+ (for the npx quick-start path)
- Claude Code or another MCP-compatible client
- Optional: Ollama running locally if you want fully offline LLM-backed enrichment
- Optional: OpenAI, Anthropic, or OpenRouter API key if using cloud LLM enrichment
Start the memory server with npx
The quickest way to connect Total Agent Memory to Claude Code is via the npx one-liner. It downloads and starts the server and registers it automatically.
npx -y total-agent-memory connect claude-codeAlternative: install via pipx or uv
For a persistent installation without npx, use pipx or uv. This is recommended for daily use so the server starts faster.
pipx install total-agent-memory
# or
uvx total-agent-memory connect claude-codeConfigure the memory mode and storage location
Set environment variables to control performance and where memories are stored. The default 'fast' mode works well for most users.
export MEMORY_MODE=fast # ultrafast | fast | balanced | deep
export TAM_MEMORY_DIR=~/.tam/ # where the SQLite database livesEnable optional LLM enrichment
To auto-extract entities and relationships from saved memories, set an LLM provider. Ollama keeps everything local; use openai or anthropic for higher quality extraction.
export MEMORY_LLM_PROVIDER=ollama # ollama | openai | anthropic | openrouter
export MEMORY_ENRICHMENT_ENABLED=trueAdd to MCP client config manually
If you prefer manual setup, add the server block to claude_desktop_config.json or your Claude Code settings.
{
"mcpServers": {
"total-agent-memory": {
"command": "npx",
"args": ["-y", "total-agent-memory"],
"env": {
"MEMORY_MODE": "fast",
"TAM_MEMORY_DIR": "/Users/yourname/.tam"
}
}
}
}Open the 3D visualization dashboard
A WebGL knowledge graph dashboard is served locally. Navigate to it in your browser to visually explore stored memories and entity relationships.
open http://localhost:37737Agent Memory System Examples
Client configuration
Claude Desktop config entry for Total Agent Memory with local storage and fast mode.
{
"mcpServers": {
"total-agent-memory": {
"command": "npx",
"args": ["-y", "total-agent-memory"],
"env": {
"MEMORY_MODE": "fast",
"TAM_MEMORY_DIR": "/Users/yourname/.tam",
"MEMORY_LLM_PROVIDER": "ollama",
"MEMORY_ENRICHMENT_ENABLED": "false",
"DASHBOARD_PORT": "37737"
}
}
}
}Prompts to try
Example tasks that leverage persistent memory across coding sessions.
- "Save a decision: we chose pgvector over ChromaDB because we're already on Postgres and need row-level security."
- "What vector database did we decide to use and why?"
- "Before I edit src/auth/middleware.go, check if this file has been flagged as risky in past sessions."
- "Predict the workflow steps for migrating our auth layer to JWT-only tokens."
- "Show me all memories tagged with 'architecture-decision'."
- "What errors have I encountered before when working on the payment module?"Troubleshooting Agent Memory System
Server starts but no memories are persisted between sessions
Check that TAM_MEMORY_DIR (or the legacy CLAUDE_MEMORY_DIR) points to a writable directory that persists between restarts. The default is ~/.tam/. If using Docker, ensure the volume mount is configured correctly.
memory_recall returns empty results for queries about past decisions
Verify that memory_save was actually called to store the information in a previous session. The agent does not save memories automatically unless explicitly instructed. Consider adding a CLAUDE.md instruction like 'After each significant architectural decision, call memory_save.'
Dashboard at localhost:37737 is not loading
The dashboard port defaults to 37737 but can be changed with DASHBOARD_PORT. Confirm the server process is running and that no firewall is blocking the port. If another process occupies 37737, set DASHBOARD_PORT to a free port and restart.
Frequently Asked Questions about Agent Memory System
What is Agent Memory System?
Agent Memory System is a Model Context Protocol (MCP) server that persistent memory for claude code & codex cli. auto-extracted knowledge graph, multi-representation embeddings, 3d webgl visualization. longmemeval r@5=97.45%. self-hosted, ollama-optional It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Agent Memory System?
Follow the installation instructions on the Agent Memory System GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Agent Memory System?
Agent Memory System works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Agent Memory System free to use?
Yes, Agent Memory System is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Agent Memory System Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Agent Memory System? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Agent Memory System in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Agent Memory System?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.