/agents-mcp:total-recallfrom agents-mcp
Autonomous memory skill that watches conversations, compresses them into prioritized notes, consolidates when large, and recovers missed sessions. No database or manual saves needed.
Ships in agents-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The only memory skill that watches on its own.
No database. No vectors. No manual saves. Just an LLM observer that compresses your conversations into prioritised notes, consolidates when they grow, and recovers anything missed. Five layers of redundancy, zero maintenance. ~$0.00/month (using free-tier models).
While other memory skills ask you to remember to remember, this one just pays attention.
Layer 1: Observer (cron, every 15-30 min)
↓ compresses recent messages → observations.md
Layer 2: Reflector (auto-triggered when observations > 8000 words)
↓ consolidates, removes superseded info → 40-60% reduction
Layer 3: Session Recovery (runs on every /new or /reset)
↓ catches any session the Observer missed
Layer 4: Reactive Watcher (inotify daemon, Linux only)
↓ triggers Observer after 40+ new JSONL writes, 5-min cooldown
Layer 5: Pre-compaction hook (memoryFlush)
↓ emergency capture before OpenClaw compacts context
observations.md with priority levels (high, medium, low)clawdhub install total-recall
Add to your .env or OpenClaw config:
OPENROUTER_API_KEY=sk-or-v1-xxxxx
bash skills/total-recall/scripts/setup.sh
This will:
memory/, logs/, backups)Add to your agent's workspace context (e.g., MEMORY.md or system prompt):
At session startup, read `memory/observations.md` for cross-session context.
Or use OpenClaw's memoryFlush.systemPrompt to inject a startup instruction.
| Platform | Observer + Reflector + Recovery | Reactive Watcher |
|---|---|---|
| Linux (Debian/Ubuntu/etc.) | Full support | With inotify-tools |
| macOS | Full support | Not available (cron-only) |
All core scripts use portable bash. stat, date, and md5 commands are handled cross-platform via _compat.sh.
All scripts read from environment variables with sensible defaults:
| Variable | Default | Description |
|---|---|---|
OPENROUTER_API_KEY | (required) | OpenRouter API key for LLM calls |
MEMORY_DIR | $OPENCLAW_WORKSPACE/memory | Where observations.md lives |
SESSIONS_DIR | ~/.openclaw/agents/main/sessions | OpenClaw session transcripts |
OBSERVER_MODEL | stepfun/step-3.5-flash:free | Primary model for compression (free) |
OBSERVER_FALLBACK_MODEL | nvidia/nemotron-3-nano-30b-a3b:free | Fallback if primary fails (free) |
OBSERVER_LOOKBACK_MIN | 15 | Minutes to look back (daytime) |
OBSERVER_MORNING_LOOKBACK_MIN | 480 | Minutes to look back (before 8am) |
OBSERVER_LINE_THRESHOLD | 40 | Lines before reactive trigger (Linux) |
OBSERVER_COOLDOWN_SECS | 300 | Cooldown between reactive triggers (Linux) |
REFLECTOR_WORD_THRESHOLD | 8000 | Words before reflector runs |
REFLECTOR_MODEL | nvidia/nemotron-3-super-120b-a12b:free | Model for consolidating observations (free) |
REFLECTOR_FALLBACK_MODEL | openrouter/hunter-alpha | Fallback if reflector model fails (free) |
OPENCLAW_WORKSPACE | ~/your-workspace | Workspace root |
Total Recall uses any OpenAI-compatible chat completion API. Switch providers by setting environment variables:
| Variable | Default | Description |
|---|---|---|
LLM_BASE_URL | https://openrouter.ai/api/v1 | API endpoint |
LLM_API_KEY | falls back to OPENROUTER_API_KEY | API key |
LLM_MODEL | deepseek/deepseek-v3.2 | Model to use |
# OpenRouter (default)
export OPENROUTER_API_KEY="your-key"
# Ollama (local)
export LLM_BASE_URL="http://localhost:11434/v1"
export LLM_API_KEY="ollama"
export LLM_MODEL="llama3.1:8b"
# Groq
export LLM_BASE_URL="https://api.groq.com/openai/v1"
export LLM_API_KEY="your-groq-key"
export LLM_MODEL="llama-3.3-70b-versatile"
memory/
observations.md # The main observation log (loaded at startup)
observation-backups/ # Reflector backups (last 10 kept)
.observer-last-run # Timestamp of last observer run
.observer-last-hash # Dedup hash of last processed messages
logs/
observer.log
reflector.log
session-recovery.log
observer-watcher.log
The setup script creates these OpenClaw cron jobs:
| Job | Schedule | Description |
|---|---|---|
memory-observer | Every 15 min | Compress recent conversation |
memory-reflector | Hourly | Consolidate if observations are large |
The reactive watcher uses inotifywait to detect session activity and trigger the observer faster than cron alone. Requires Linux with inotify-tools installed.
# Install inotify-tools (Debian/Ubuntu)
sudo apt install inotify-tools
# Check watcher status
systemctl --user status total-recall-watcher
# View logs
journalctl --user -u total-recall-watcher -f
Using the default free models via OpenRouter:
The scripts include defensive handling for both .content and .reasoning fields in API responses. While most models return content in the standard .content field, the fallback to .reasoning ensures compatibility with models that may use different response formats.
observations.md/new or /resetinotifywait to monitor session directoryThe observer and reflector system prompts are in prompts/:
prompts/observer-system.txt — controls how conversations are compressedprompts/reflector-system.txt — controls how observations are consolidatedEdit these to match your agent's personality and priorities.
The Dream Cycle is an optional nightly agent that runs after hours to consolidate observations.md. It archives stale items and adds semantic hooks so nothing useful is actually lost. Context stays lean; everything remains findable.
Multi-Hook Retrieval — 4-5 alternative search phrasings per archived item. Searches using different words than the original still find the memory.
Confidence Scoring — every observation gets a confidence score (0.0-1.0) and source type (explicit, implicit, inference, weak, uncertain). High-confidence items are preserved longer; low-confidence items are archived sooner.
Memory Type System — 7 types with per-type TTLs: event (14d), fact (90d), preference (180d), goal (365d), habit (365d), rule (never), context (30d). Embedded as invisible HTML metadata comments in observations.md.
Observation Chunking — clusters of 3+ related observations are compressed into single summary entries. Source observations are archived; a chunk hook replaces them. Achieves up to 75% token reduction.
Importance Decay — per-type daily decay applied to importance scores before each archival decision. Items that decay below the archive threshold are queued for removal. Rates: event (-0.5/day), fact (-0.1/day), preference (-0.02/day), rule/habit/goal (no decay).
Pattern Promotion — scans recent dream logs for recurring themes (3+ occurrences across 3+ separate days). Writes promotion proposals to memory/dream-staging/ for human review. Use staging-review.sh to list, show, approve, or reject proposals. The context type is never promoted automatically.
Run bash skills/total-recall/scripts/setup.sh — creates Dream Cycle directories automatically.
Add the nightly cron job as a full agent turn:
# Dream Cycle — nightly (3am recommended; adjust to your timezone)
# The dream cycle runs as a full agent turn — NOT as a direct bash call.
# dream-cycle.sh is a file operations helper called BY the agent, not the entry point.
#
# 0 3 * * * bash -c 'source ~/.openclaw/shared/secrets/openclaw-secrets.env \
# && openclaw agent --agent main \
# --message "Run the Total Recall Dream Cycle. Follow the instructions in \
# $WORKSPACE/skills/total-recall/prompts/dream-cycle-prompt.md exactly. \
# Use READ_ONLY_MODE=false and DREAM_PHASE=1." \
# --json >> $WORKSPACE/logs/dream-cycle.log 2>&1'
Configure your cron agent using prompts/dream-cycle-prompt.md as the system prompt. Recommended models: Claude Sonnet for the Dreamer (analysis + decisions), DeepSeek v3.2 for the Observer (cheap, fast).
Start with READ_ONLY_MODE=true for the first few nights. Check memory/dream-logs/ after each run to verify what it would have archived.
Switch to READ_ONLY_MODE=false once satisfied.
| Variable | Default | Description |
|---|---|---|
DREAM_TOKEN_TARGET | 8000 | Token target for observations.md after consolidation |
READ_ONLY_MODE | false | Set true for dry-run analysis without writes |
| File | Description |
|---|---|
scripts/dream-cycle.sh | Shell helper called by the agent (not a standalone runner): preflight, archive, update-observations, write-log, write-metrics, validate, rollback |
prompts/dream-cycle-prompt.md | Agent prompt for the nightly Dream Cycle run |
dream-cycle/README.md | Dream Cycle quick reference |
schemas/observation-format.md | Extended observation metadata format |
memory/
archive/
observations/ # Archived items (one .md file per night)
chunks/ # Chunked observation groups
dream-logs/ # Nightly run reports
dream-staging/ # Pattern promotion proposals awaiting human review
.dream-backups/ # Pre-run safety backups
research/
dream-cycle-metrics/
daily/ # JSON metrics per night
Observer not running?
logs/observer.log for errorsOPENROUTER_API_KEY is set and validcrontab -lObservations not being loaded at session start?
memory/observations.mdMEMORY_DIR points to the right locationReactive watcher not triggering (Linux)?
systemctl --user status total-recall-watcherinotify-tools is installed: which inotifywaitjournalctl --user -u total-recall-watcher -fDream Cycle archiving too aggressively?
READ_ONLY_MODE=true and review dream logs before going liveDREAM_TOKEN_TARGET upward to archive less per runDream Cycle not archiving enough?
DREAM_TOKEN_TARGET to trigger more aggressive consolidationThis system is inspired by how human memory works during sleep — the hippocampus (observer) captures experiences, and during sleep consolidation (reflector), important memories are strengthened while noise is discarded.
Read more: Your AI Has an Attention Problem
"Get your ass to Mars." — Well, get your agent's memory to work.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
34 skills in this plugin
/ads-mathCalculate and model paid-media CPA, CPL, CPC, CPM, ROAS, MER, break-even targets, contribution margin, LTV:CAC, impression-share opportunity, budgets, forecasts, and experiment economics. Use for PPC math, ad calculator, break-even analysis, ROAS calculator, CPA calculator, budget forecast, LTV CAC, or MER./agent-recallPersistent compounding memory for AI agents. 5 default MCP tools: session_start, session_end, remember, recall, check. Full surface (18 tools) available with --full flag. Two-verb model: inhale (session_start) and exhale (session_end). Correction-first memory with decision trail tracking, watch_for warnings, palace rooms with salience scoring, cross-project insight matching, same-day journal merging, ambient recall hooks. Local markdown only. Zero cloud, zero telemetry, Obsidian-compatible. Optional Supabase backend: when configured via `ar setup supabase`, recall() uses pgvector cosine similarity on OpenAI/Voyage embeddings instead of keyword search — same API, semantic understanding. Gracefully degrades to local search if not configured./aihot查询 AIHOT(aihot.news)的中文 AI 资讯。用户问今天或最近 AI 圈发生了什么、AI 新闻和 AI 日报、大模型与 AI 产品发布、OpenAI/Anthropic/Google 等公司或某个 AI 话题的最新消息、当前最热的 AI 事件及来龙去脉、AI 模型排行、Codex 额度重置,或其它 AI 行业动态时使用。必须实时查询 AIHOT,不凭训练记忆回答新闻;匿名只读,无需 API Key。npx claudepluginhub skillmds/skillmd --plugin agents-mcpOther plugins' skills for the same job