Agent Recall
Persistent memory for AI coding agents — across tools, sessions, and projects.
Agent Recall captures your work, remembers who you are, and picks up where you left off. It works with Claude Code, Cursor, Codex CLI, Gemini CLI, and OpenCode — all sharing the same memory.
English | 中文
Overview
AI coding agents forget everything between sessions. Agent Recall fixes that.
It runs a lightweight background service that:
- Captures tool executions automatically via lifecycle hooks
- Compresses observations into structured summaries using AI
- Injects relevant context at the start of every new session
- Knows who it is — agent persona with self-awareness layer
- Knows who you are — user profile bootstrapped via a 3-round interview
- Knows what you were doing — active task recovery across sessions
Multi-Platform, One Memory
All platforms share the same SQLite database. Set up your persona in Claude Code, and Cursor sees it too. Observations from Codex appear in Gemini's context. Archives and promotions work everywhere.
| Platform | Status | Hook System | Context Injection |
|---|
| Claude Code | ✅ Full | Plugin hooks | JSON additionalContext |
| Cursor | ✅ Full | Shell hooks | .cursor/rules/ file |
| Codex CLI | ✅ Full | hooks.json | AGENTS.md + additionalContext |
| Gemini CLI | ✅ Full | hooks.json | JSON systemMessage |
| OpenCode | ✅ Full | TS plugin | system.transform hook |
Quick Start
# Clone and build
git clone https://github.com/d-wwei/agent-recall.git
cd agent-recall && npm install && npm run build
# Install for all detected platforms
bash scripts/install.sh
# Or install for a specific platform
npm run sync-marketplace # Claude Code
npm run cursor:install # Cursor
bash scripts/codex-install.sh # Codex CLI
bash scripts/gemini-install.sh # Gemini CLI
bash scripts/opencode-install.sh # OpenCode
Architecture
┌─────────────────────────────────────────┐
│ Platform Adapters (thin layer) │
│ Claude Code · Cursor · Codex · Gemini │
│ OpenCode · OpenClaw │
├─────────────────────────────────────────┤
│ Worker HTTP API (localhost:37777) │
│ 18 endpoints · Express · Bun │
├─────────────────────────────────────────┤
│ Business Logic │
│ Persona · Bootstrap · Recovery │
│ Memory Layer · Promotion · Archives │
├─────────────────────────────────────────┤
│ SQLite + FTS5 + Chroma │
│ ~/.agent-recall/agent-recall.db │
└─────────────────────────────────────────┘
70-80% of the code is platform-agnostic. Each new platform needs only a thin adapter (~80 lines).
Key Features
Agent Persona
Agent Recall has a self-awareness layer. After bootstrap, the agent knows its name, personality, and running environment. This persona is injected into every session.
Bootstrap Interview
A 3-round progressive interview (bilingual EN/ZH) that captures:
- Core identity — name, role, response style
- Working style — recurring tasks, preferred assistant role
- Agent personality — agent name, collaboration vibe, running environment
Session Recovery
Active task tracking with cross-session continuity. When you resume, Agent Recall shows:
- Current task name, progress, and next step
- Interrupted tasks queue
- Options to continue, switch, or view context
Memory Layering
Global vs project-scoped observations with inheritance:
- Global observations visible from all projects
- Project observations scoped to that project only
- Merge strategy: project overrides global for conflicts
Memory Promotion
Detect and promote cross-project reusable knowledge:
- Per-project sync policy (ask / always / never)
- Promote decisions and discoveries to global scope
- Promotion history tracking
Session Archives & Recall
Searchable session history with FTS5:
- Temporal recall: "What did I do yesterday?"
- Topic recall: "Show me work on authentication"
- Auto-archive on session completion with tags
Viewer UI
Real-time web viewer at http://localhost:37777 with SSE streaming, dark/light theme, and project filtering.
API Endpoints
| Category | Endpoints |
|---|
| Persona | GET/POST /api/persona/profile, GET /api/persona |
| Bootstrap | GET /api/bootstrap/status, POST /api/bootstrap/update |
| Recovery | GET/POST /api/recovery/active-task, POST /api/recovery/complete-task |
| Search | GET /api/search, GET /api/timeline, GET /api/data/observations |
| Archives | GET /api/archives, GET /api/archives/search, GET /api/archives/temporal |
| Promotion | GET /api/promotion/detect, POST /api/promotion/sync, GET/POST /api/promotion/policy |
Configuration