Agentmemory is a persistent memory server for AI coding agents. It captures what an agent does through lifecycle hooks, compresses the observations into searchable memory, and injects relevant context when the next session starts, so architecture decisions, past bugs, and preferences do not have to be re-explained. It positions itself as the searchable database behind built-in per-agent memory files such as CLAUDE.md, .cursorrules, or notepads, which are capped in size and loaded whole into context.
One server serves every agent. Adapters cover Claude Code, Codex, GitHub Copilot CLI, Cursor, Gemini CLI, OpenClaw, Hermes, Pi, OpenCode, Cline, Continue, Goose, Devin, Zed, Warp, Kiro, Qwen Code, and any MCP client; Aider and other hosts use the REST API. Full plugins for Claude Code, Codex, Cursor, Copilot CLI, Devin, and OpenCode register auto-capture hooks, skills, and the MCP server; other hosts get a standard mcpServers entry written by agentmemory connect . Seventeen skills in SKILL.md format teach an agent when to recall, remember, hand off, or forget.
The pipeline runs on the iii engine (pinned to v0.11.2), which supplies HTTP triggers, key-value state, streams, and worker supervision in place of a conventional web server, database, and process manager. A PostToolUse hook deduplicates by SHA-256, strips secrets, stores the raw observation, and compresses it; Stop summarises the session and optionally extracts a knowledge graph; SessionStart loads a project profile, runs a hybrid search, and injects results within a token budget (default 2,000 tokens). Memories are consolidated across working, episodic, semantic, and procedural tiers, decay over time, strengthen with access, and are checked for contradictions.
Retrieval fuses three streams with reciprocal rank fusion: BM25 keyword matching (always on), vector similarity when an embedding provider is configured, and knowledge-graph traversal when entities are detected. The default keyless mode has no vectors; setting EMBEDDINGPROVIDER=local downloads all-MiniLM-L6-v2 for on-device embeddings, and Gemini, OpenAI, Voyage, Cohere, and OpenRouter embeddings are supported. LLM-written compression requires a provider (Anthropic, OpenAI, Gemini, OpenRouter, MiniMax, or any OpenAI-compatible local server such as Ollama, LM Studio, or vLLM) plus AGENTMEMORYAUTO_COMPRESS=true.
Reported results on LongMemEval-S (500 questions):
| System | R@5 | R@10 | MRR |
|---|---|---|---|
| agentmemory | 95.2% | 98.6% | 88.2% |
| BM25-only fallback | 86.2% | 94.6% | 71.5% |
Features
- Automatic capture: hooks record prompts, tool calls, results, and errors with no manual effort
- Hybrid search: BM25, vector, and knowledge-graph streams fused with RRF and diversified per session
- Tiered consolidation: working, episodic, semantic, and procedural memory with decay, reinforcement, and eviction
- MCP surface: 54 tools, 6 resources, 3 prompts, and 17 skills; AGENTMEMORY_TOOLS=core trims the set to 8
- Session replay: a viewer on port 3113 scrubs through prompts, tool calls, and responses, and imports Claude Code JSONL transcripts
- Multi-agent coordination: leases, signals, actions, routines, sentinels, and per-role scoping via AGENT_ID
- Team memory: namespaced shared and private memories with an audit trail and governed deletion
- Provenance: every observation carries an origin channel, and memories trace back to source observations
- Git snapshots: version, roll back, and diff memory state
- Programmatic access: core operations are iii functions callable from Python, Rust, or Node over WebSocket, with REST on port 3111
- Extensions: iii worker add adds pub/sub, cron, queues, OTEL observability, sandboxing, or a SQL state adapter
- Deployment: local binary, Docker, or one-click templates for managed hosts
Runs in
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Hermes
Self-improving AI agent with a learning loop that creates and refines skills, recalls past sessions, and runs across chat platforms
OpenClaw
Self-hosted single-operator assistant runtime that links models, tools, and messaging channels through one local Gateway
OpenCode
Open-source AI coding agent that runs in the terminal, an IDE, or a desktop app
Integrated by
Alternatives
Letta
Stateful-agent platform with long-term memory — CLI agent and TypeScript SDK running on cloud, local, or self-hosted backends
Mem0
Memory layer that extracts facts from conversations and retrieves them at inference so agents remember users across sessions
MemPalace
Local-first AI memory that stores conversations verbatim and retrieves them by semantic search over a structured, scoped index
Supermemory
Supermemory is broader than mem0, Engram, Graphiti, or CocoIndex. Those solve storage, coding-agent notes, temporal fact
