Correction-first persistent memory for AI agents. MCP server + SDK + CLI. Compounds across sessions.
$ npx -y skills add Goldentrii/AgentRecall-X --agent claude-code
Repo: Goldentrii/AgentRecall-X
What's inside
English ยท ไธญๆ
1. Install the MCP server (Claude Code):
claude mcp add --scope user agent-recall -- npx -y agent-recall-mcp
Generic MCP JSON for other clients:
{ "mcpServers": { "agent-recall": { "command": "npx", "args": ["-y", "agent-recall-mcp"] } } }
2. First message of every new session, run the loop:
At the start of a session, call session_start to load context.
When the human corrects you, call remember with type "correction".
At the end of a session, call session_end to compound what you learned.
AgentRecall is two things:
A governed corrections ledger โ every time you correct your agent ("no, not that version", "put this section first", "ask me before you assume"), that correction is stored as a structured record with severity, evidence, and outcome tracking. It persists across sessions, projects, and agent restarts.
A measurement instrument โ the only open-source system that tracks whether a correction actually changed what the agent does in a later session. Every correction accumulates retrieved_count, and every time the agent encounters the same situation, the outcome is recorded (heeded or recurred).
No other agent memory tool measures that second step. Every benchmark in the field tests retrieval; none tests behavioral change across sessions. We built the measurement harness first โ and we publish what we found, including the unflattering numbers.
Most agent memory tools claim "never repeats the same mistake." None of them publish a number for it.
Here is what our own instrument found on our own live corpus (2026-07-03):
| Metric | Value | Artifact |
|---|---|---|
| Correction capture recall (dual-blind audit, n=59) | 35.3% [17.3โ58.7 CI] | UPDATE-LOG.md ยงM2 |
| Heed rate, pre-2026-07-03 (instrument-biased upper bound โ do not cite) | 92.5% [Wilson 60.1โ100] | scripts/eval/baselines/rmr-baseline-2026-07-03.json |
| Heed rate, evidence-grounded (post-reset) | 0/3 events | scripts/eval/baselines/rmr-baseline-2026-07-03.json |
| Correction transfer recall (offline bench, achievable) | 0/4 [Wilson 0โ49%] | scripts/eval/baselines/correction-transfer-real-2026-07-03.json |
| Median session_start injection | 1,489 tokens (was 2,010; Mem0 anchor ~7K) | UPDATE-LOG.md ยงC2 |
| p95 session_start latency (warm) | 363 ms (was 1,132) | UPDATE-LOG.md ยงC2 |
The heed instrument defaulted to "heeded" absent evidence before 2026-07-03; the reset default is "unknown" โ the honest 0/3 is the correct starting point, not a regression. Transfer recall cannot support a point-estimate claim below 39 classes (claim-gate ledger, benchmark spec ยง2.6).
Verify it yourself: every number above regenerates from the committed artifacts โ see docs/eval/REPRODUCE.md.
What this means: we captured 35% of real corrections in our own live use. The heed instrument was biased and we reset it. The offline transfer benchmark scores 0 on our own corpus โ which is a density problem (32 active corrections across 19 projects is too sparse to front-run mistakes), not a retrieval architecture problem (confirmed 5ร by internal experiments).
The learning loop framing is correct โ the system is designed to track whether corrections change behavior โ but the data we have so far is insufficient to quantify the uplift. We are publishing the measurement harness and running the experiment.
In mid-2026, the agent-memory field is crowded (Mem0 ~60K stars, Graphiti/Zep ~28K, Supermemory ~28K, Letta ~24K). Most published benchmark numbers in this space are self-reported on the same 2โ3 retrieval benchmarks and are hard to reproduce independently.
The confirmed gap (from our research report docs/research/agent-memory-landscape-2026-07.md ยง2): no public benchmark measures whether a captured correction changes what a fresh agent does in a new session. LongMemEval, LoCoMo, MemoryAgentBench, Letta Leaderboard โ all test retrieval or within-session updates.
AgentRecall owns two pieces of the unclaimed ground:
corrections-export/v1, scrubbed egress, retraction, severity, proof-confidence) that any engine can integrate against.predict-loo (leave-one-out, anti-self-confirming, dual denominators) and the correction-transfer benchmark spec (HeedBench v1 โ provisional name), which implements the missing pipeline: capture โ persist โ fresh session โ measure recurrence.Benchmark numbers in agent memory are typically self-reported and hard to reproduce. Ours regenerate from a fixed, hash-locked corpus with one command (npm run bench) โ including the scores that make us look bad.
Visual setup guide โ all 13 clients, copy-paste prompts: open
warroom/install.htmlfrom the repo (or after unzipping the War Room release) in any browser. No server needed.
# Claude Code
claude mcp add --scope user agent-recall -- npx -y agent-recall-mcp
# Cursor โ .cursor/mcp.json
{ "mcpServers": { "agent-recall": { "command": "npx", "args": ["-y", "agent-recall-mcp"] } } }
# VS Code โ .vscode/mcp.json
{ "servers": { "agent-recall": { "command": "npx", "args": ["-y", "agent-recall-mcp"] } } }
# Windsurf โ ~/.codeium/windsurf/mcp_config.json
{ "mcpServers": { "agent-recall": { "command": "npx", "args": ["-y", "agent-recall-mcp"] } } }
# Codex
codex mcp add agent-recall -- npx -y agent-recall-mcp
Skill (Claude Code only):
mkdir -p ~/.claude/skills/agent-recall
curl -o ~/.claude/skills/agent-recall/SKILL.md \
https://raw.githubusercontent.com/Goldentrii/AgentRecall-X/main/SKILL.md
npm install agent-recall-sdk # JS/TS apps
npx agent-recall-cli recall "topic" # terminal & CI
import { AgentRecall } from "agent-recall-sdk";
const memory = new AgentRecall({ project: "my-app" });
await memory.capture("What stack?", "Next.js + Postgres");
const ctx = await memory.recall("rate limiting");
The canonical cognitive-psychology taxonomy mapped to your agent's filesystem:
| Layer | Type | What it holds | Path |
|---|---|---|---|
| 1 | Episodic | What happened in each session, chronologically. Auto-written during work. | journal/ |
| 2 | Semantic | Topic-clustered facts with [[wikilinks]]: Architecture, Goals, Blockers. | palace/rooms/ |
| 3 | Procedural | IF-THEN production rules โ reusable how-tos. | palace/skills/ |
| 4 | Narrative | Project phases: Goal โ What was hard โ How solved โ Synthesis. | palace/pipeline/ |
| 5 | Correction | Behavioral calibration: rules the agent must follow, with severity and outcome tracking. | corrections/ |
| + | Awareness | Cross-project insights promoted from N-confirmed corrections โ the compounding layer. | palace/awareness |
All layers share one canonical naming grammar so any agent can compose retrieval paths from intent. Existing files keep working via a legacy_path view โ no migration needed.
flowchart LR
A([session start]) --> B["/arstart โ open<br/>board โ pick โ load context"]
B --> C{work}
C -->|need past knowledge| D["/arrecall โ search"]
D --> C
C --> E["/arsave โ save<br/>journal + compound"]
E --> F([session end])
F -. every K sessions .-> G["/arreflect โ consolidate"]
G -.-> A
| Command | When | What it does |
|---|---|---|
/arstart | First โ every session | OPEN. No args = status board across ALL projects (pending work, blockers) โ pick by number โ load that project's deep context (palace rooms, corrections, task recall). /arstart <slug> loads directly; /arstart bootstrap scans your machine and imports existing projects. |
/arsave | Last โ every session | SAVE. Write journal + palace consolidation + awareness compounding. /arsave all batch-saves every parallel session of the day (scan, merge, deduplicate). |
/arrecall | Mid-session, on demand | SEARCH. Surface past knowledge for the current task โ documented fixes, prior decisions, patterns. |
/arreflect | Every K sessions | CONSOLIDATE. Periodic triage: confirm recurrence/phantom matches, cluster new error classes, propose rule re-abstractions (rule edits stay owner-gated). |
Without
/arstart, a fresh agent has zero orientation. Without/arsave, nothing compounds. Those two are the spine;/arrecalland/arreflectcompound it.
Memory only compounds if it fires automatically, not on demand. Every pull-channel tool (recall, memory_query) saw zero organic calls across 44 projects over weeks of real use โ including from the agent that built them. That is why only 5 tools ship by default; the two-verb model (session_start / session_end) carries all the compounding value, and everything else is opt-in via --full.
An autonomous overnight agent that runs while you sleep and compounds everything your sessions wrote during the day.
| What it does | Result |
|---|---|
| Mine patterns across all projects | Repeated corrections promote to palace/awareness |
| Ebbinghaus salience decay | Low-signal rooms fade; your palace stays sharp |
| Journal rollups | Entries >30 days compress into summary rooms |
| Awareness graduation | Corrections confirmed Nร times go cross-project |
| Telegram report | Nightly summary: learned ยท decayed ยท crystallized |
Requires a live Claude Code login. If the session expires, dream skips with a Telegram alert.
# Fix expired login (run this when dreaming stops)
claude login
Dream reports are saved locally to ~/.agent-recall/dreams/YYYY-MM-DD.md.
The question this answers: does a correction actually change behavior, or does the same mistake come back? A logged correction whose error class recurs after the rule was encoded is a phantom gradient step โ the write cost was paid, the behavior never changed.
The kit in experimental/harness-kit/ is a Claude Code harness layer that closes this loop on top of AgentRecall:
| Piece | What it does |
|---|---|
ar-scoreboard.py (SessionStart hook) | Health digest every session: correction flow, insight promotion rate, loop health, phantom counts, reflection cadence |
ar-recurrence-check.py (+ your ~/.agent-recall/taxonomy.json, schema in TAXONOMY-SCHEMA.md) | Error-class taxonomy over your corrections; mechanical phantom detection (violation dated after its rule) |
/arstart ยท /arsave ยท /arrecall ยท /arreflect | The four memory verbs (open ยท save ยท search ยท consolidate) as slash commands |
/arreflect (every K sessions) | Periodic triage: confirm provisional matches, cluster new error classes, propose rule re-abstractions โ rule edits stay owner-gated |
ar-nudge.py (UserPromptSubmit hook) | Surfaces overdue reflection mid-session โ memory pushed to the moment of action, not left to be remembered |
dispatch-model-guard.py (PreToolUse hook, optional) | Warn-only guard for an explicit-model dispatch policy โ an example of mechanizing a rule that text alone failed to enforce |
North-star metric: post-re-abstraction phantom rate โ 0 for treated classes. First validation run (2026-07-14, one power-user harness): 8 error classes and 18 confirmed phantom gradient steps found in 109 corrections; 6 rules re-abstracted the same day.
Status: experimental. Validated on one harness; Python 3 stdlib only; install steps and caveats in the kit's README. Since v3.4.37 the same phenomenon is also measured natively: failure_class + the cross-project recurrence join.
A local-first visual dashboard for your memory: an activity calendar, per-project status, corrections, and insights โ all rendered from your local ~/.agent-recall/ data. Fully offline (vendored assets), no Node and no build step.
ar-warroom-v3.4.32.zip from the latest GitHub Release.cd warroom
python3 -m http.server 8080
This is the recommended onboarding for Hermes / OpenClaw / OpenCode users too โ one offline page to see everything your agent has learned.
TypeScript monorepo, 4 published packages: core (storage + tool logic), mcp-server (thin MCP wrappers), sdk (programmatic API), cli (the ar command). All memory is local markdown under ~/.agent-recall/projects/<slug>/ โ journal/, corrections/, and palace/ (rooms, skills, pipeline, awareness). An optional Supabase mirror adds pgvector semantic recall; all-local stays the default.
Retrieval: keyword + RRF (Cormack 2009). FSRS-lite decay (Ebbinghaus โ SuperMemo โ FSRS-6). A Modern Hopfield re-rank primitive (Ramsauer 2020) is in the codebase but not wired into the default path โ what runs today is local keyword/substring matching (stemming + synonym expansion + lightweight IDF, per-source ranking) merged via RRF, plus optional vector search when OPENAI_API_KEY is set. No inverted index or BM25 k1/b tuning โ a real BM25 index is a possible future upgrade, not what's running now.
| Platform | Mechanism | Status |
|---|---|---|
| Claude Code | MCP server + skill + hooks | Primary |
| Cursor ยท Windsurf ยท VS Code (Copilot) ยท Codex | MCP server | Supported |
| Any JS/TS app | SDK (agent-recall-sdk) | Supported |
| Terminal / CI | CLI (ar) | Supported |
PRs welcome. Open an issue first for anything substantive โ the design is opinionated and grounded in published research; we want changes grounded the same way.
MIT โ see LICENSE.
.github/
CODEOWNERS
ISSUE_TEMPLATE/
benchmark_result.yml
bug_report.yml
field_report.yml
PULL_REQUEST_TEMPLATE.md
workflows/
bench-fixture.yml
ci.yml
release.yml
repro-docs.yml.staged
.gitignore
.nvmrc
AGENTS.md
benchmark/
ab-comparison.mjs
consistency.mjs
funnel.mjs
heeded-guard.mjs
p0-1-incremental-visibility.mjs
p0-2-archive-reachability.mjs
p1-1-compression.mjs
p1-2-keystone-importance.mjs
replay-benchmark.mjs
replay-results.json
room-slug-guards.mjs
run.mjs
v3316-benchmark.mjs
CHANGELOG.md
commands/
arrecall.md
arreflect.md
arsave.md
arstart.md
contrib/
hindsight-cookbook/
AGENTRECALL-BACKLOG.md
agentrecall-memory/
import_corrections.ipynb
import_corrections.py
README.md
requirements.txt
sample_corrections.json
HANDOFF.md
PR_BODY.md
PR.md
README_INDEX_ENTRY.md
CONTRIBUTING.md
CONTRIBUTORS-WANTED.md
Dockerfile
docs/
agents/
living-memory/
T1-dreaming-enhancements.md
T2-reconsolidation.md
T3-pruning-obsolescence.md
T4-forward-projection.md
supabase-chain/
review-checklist.md
T1-journal-backfill.md
T2-memories-hook.md
T3-merge-semantic-recall.md
T4-pgvector-migration.md
T5-embeddings-sync.md
commands.md
eval/
BENCH-RESULT-SCHEMA.md
DETERMINISM.md
REPRODUCE.md
IMPLEMENTER-PROMPT.md
intelligent-distance-protocol.md
internal/
cross-surface-adapter-spec.md
HANDOFF-warroom-design.md
HOST-TIERS.md
loop13-embedding-experiment.md
MEMORY-TO-UNDERSTANDING-PLAN.md
OPTIMIZATION-LOOPS.html
PERF-CHECK-2026-06-12.md
PLAN-AGENT-EXPERIENCE-V2.md
REVIEW-BRIEF.md
SESSION-REPORT-2026-04-24-26.md
TEST-PROMPT.md
V4-PLAN.md
mcp-adapter-spec.md
ORCHESTRATION.md
proposals/
2026-07-02-correction-transfer-benchmark-spec.md
2026-07-02-field-design-options.md
2026-07-02-live-tree-audit.md
2026-07-02-rmr-orchestration-plan.md
2026-07-02-schema-infrastructure.md
2026-07-06-x-is-cross-agent-correction-record-type.md
2026-07-13-recurrence-detector-workpacket.md
2026-07-20-naming-v2-spec.md
c1-config-change.md
c3-heed-instrumentation-design.md
discussions-setup-2026-07-14.md
good-first-issues-2026-07-14.md
issue-triage-2026-07-02.md
purity-census-2026-07-05.md
readme-rewrite-2026-07-04.md
research/
agent-memory-landscape-2026-07.md
review/
2026-05-06-integration-audit.md
SCORING.md
sdk-design.md
sdk-execution-plan.md
security/
2026-05-08-audit-summary.md
supabase.md
superpowers/
plans/
2026-04-29-supabase-semantic-recall.md
2026-05-04-memory-pipeline-fixes.md
2026-05-05-supabase-chain-integration.md
2026-05-25-dashboard-implementation.md
specs/
2026-04-27-x-content-campaign-design.md
2026-04-29-supabase-semantic-recall-design.md
2026-05-25-dashboard-design.md
2026-06-19-ambient-relevance-loop-design.md
x-campaign-dashboard.html
UPGRADE-v3.4.md
experimental/
harness-kit/
commands/
arrecall.md
arreflect.md
arsave.md
arstart.md
hooks/
ar-nudge.py
dispatch-model-guard.py
README.md
scripts/
ar-recurrence-check.py
ar-scoreboard.py
TAXONOMY-SCHEMA.md
glama.json
LICENSE
meta/
agent-prompts/
bootstrap-agent-alpha.md
bootstrap-agent-beta.md
bootstrap-agent-gamma.md
bootstrap-cli-agent.md
bootstrap-mcp-agent.md
bootstrap-skill-agent.md
fix-1-agents-md.md
fix-2-list-tools.md
fix-3-session-start.md
fix-4-palace-definition.md
review-round-perspectives.md
reviewer-1-first-time-agent.md
reviewer-2-power-user.md
reviewer-3-multi-project.md
reviewer-4-non-claude-code.md
reviewer-5-adversarial.md
eval/
loops/
loop-1/
prompts/
orchestrator-brief.md
reviewer.md
verifier-eval.md
worker-a-cli.md
worker-b-core.md
worker-c-coldstart.md
worker-d-search.md
results/
loop-1-synthesis.md
reviewer.md
verifier.md
worker-a.md
worker-b.md
worker-c.md
worker-d.md
loop-2/
prompts/
verifier-2.md
worker-a2-naming.md
worker-b2-autoroute.md
worker-c2-bootstrap.md
worker-d2-cli-help.md
results/
loop-2-synthesis.md
reviewer-2.md
verifier-2.md
worker-a2.md
worker-b2.md
worker-c2.md
worker-d2.md
loop-3/
prompts/
verifier-3-full-eval.md
worker-a3.md
worker-b3.md
worker-c3.md
results/
loop-3-synthesis.md
reviewer-3.md
verifier-3.md
worker-a3.md
worker-b3.md
worker-c3.md
prompts/
agent-cold.md
agent-mid.md
agent-migration.md
results/
cold-agent.md
mid-agent.md
migration-agent.md
seeds/
loop2/
test-feedback.md
migration/
CLAUDE.md
feedback-ask-before-proceed.md
feedback-no-version-inflation.md
project-agentrecall.md
project-novada-mcp.md
user-profile.md
integrations/
codex.md
scripts/
clean-project-slugs.mjs
correction-triage.mjs
dashboard-legacy.html
dashboard-migration.sql
dashboard.html
static/
00618df1.woff2
137ea90f.woff2
20724bb4.woff2
32aec356.woff2
a1623b97.woff2
a63aa1dc.woff2
ac9ca0eb.woff2
c1a89b29.woff2
cytoscape.min.js
d194a134.woff2
echarts.min.js
ef0b386b.woff2
fb2be76d.woff2
fonts.css
tests/
codex-compat/
README.md
result-2026-06-18T14-32-07.json
result-2026-06-18T14-33-21.json
result-latest.json
run.mjs
wiki/
_Sidebar.md
Core-Concepts.md
FAQ.md
Getting-Started.md
Home.md
Intelligent-Distance.md
MCP-Tools-Reference.md
The-Vision.md
When-to-Use.md
workspace/
kr2-worker-d-report.md
migration.sql
ORCHESTRATOR-PROTOCOL.md
package-lock.json
package.json
packages/
cli/
bin/
ar
package.json
README.md
src/
index.ts
utils/
correction-detector.ts
topic-state.ts
transcript-reader.ts
test/
audit-cjk-capture-gate.test.mjs
awareness-rollup.test.mjs
cjk-prohibition-signals.test.mjs
cli.test.mjs
continuity-wave.test.mjs
hook-ambient-purity.test.mjs
hook-correction-detect.test.mjs
hook-end-archive.test.mjs
hook-end-p3-backstop.test.mjs
hygiene-cli.test.mjs
outcomes-audit.test.mjs
scrub.test.mjs
topic-state.test.mjs
transcript-reader.test.mjs
wm-slug-parity.test.mjs
working-memory-wave.test.mjs
tsconfig.json
core/
package.json
README-pre-redesign.md
README.md
src/
digest/
match.ts
store.ts
types.ts
display/
board-render.ts
helpers/
activity-feed.ts
alignment-patterns.ts
associative-link.ts
auto-name.ts
blind-spots.ts
conflict-scan.ts
consistency.ts
handoff.ts
journal-files.ts
journal-filter.ts
journal-name-parser.ts
journal-sig-theme.ts
normalize.ts
rollup.ts
sections.ts
semantic-match.ts
tag-generator.ts
host-profile.ts
index.ts
MATH.md
naming.ts
palace/
awareness.ts
compress.ts
consolidate.ts
decay-pass.ts
fan-out.ts
fsrs.ts
graph.ts
hopfield.ts
identity.ts
index-manager.ts
insights-index.ts
keystone.ts
log.ts
obsidian.ts
pipeline.ts
rooms.ts
salience.ts
skills.ts
prompts/
consolidation-prompt.ts
storage/
ab-experiment.ts
archive-prune.ts
archive-write.ts
behavior-policies.ts
blind-spots-store.ts
capture-router.ts
classification.ts
consolidation-queue.ts
content-guard.ts
corrections.ts
cwd-allowlist.ts
dream-health.ts
durable-intent.ts
extraction.ts
filelock.ts
fs-utils.ts
hook-health.ts
hygiene.ts
lifecycle-telemetry.ts
memory-protocol.ts
paths.ts
project.ts
recency-index.ts
retention.ts
sanitize.ts
session-card.ts
session.ts
store-manifest.ts
working-memory.ts
supabase/
client.ts
config.ts
embedding.ts
recall-backend.ts
sync.ts
tools-logic/
alignment-check.ts
awareness-update.ts
bootstrap.ts
check-action.ts
check.ts
confidence.ts
context-synthesize.ts
... 352 moreFAQ
agentrecall-x is a Claude Code plugin with 1 hand-picked skill for agent memory work, indexed on Flowy. Install it with the command on its page. It includes AgentRecall-X. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.