Логотип AgentRecall

AgentRecall

Сообщество
Goldentrii

Correction-first persistent memory for AI agents. MCP server + SDK + CLI. Compounds across sessions.

ИздательGoldentrii
РепозиторийAgentRecall-X
ЯзыкJavaScript
Форки
59
Звёзды
371
Доступные инструменты
7
Тип транспортаstdio
Категории
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    AgentRecall предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 7

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в MCP-клиенте на ваш выбор.

  • Показатели интереса к открытому проекту

    В указанном репозитории: звёзды — 371, форки — 59.

English · 中文

1. Install the MCP server (Claude Code):

bash
claude mcp add --scope user agent-recall -- npx -y agent-recall-mcp

Generic MCP JSON for other clients:

json
{ "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.

What it does

AgentRecall is two things:

  1. 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.

  2. 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.


Measured, not promised

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):

MetricValueArtifact
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 eventsscripts/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 injection1,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.


Why this is different from every other memory tool

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:

  • The corrections ledger — a governed data model (corrections-export/v1, scrubbed egress, retraction, severity, proof-confidence) that any engine can integrate against.
  • The measurement harness — 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.


Quick Start

Visual setup guide — all 13 clients, copy-paste prompts: open warroom/install.html from the repo (or after unzipping the War Room release) in any browser. No server needed.

MCP Server — for AI agents

bash
# 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):

bash
mkdir -p ~/.claude/skills/agent-recall
curl -o ~/.claude/skills/agent-recall/SKILL.md \
  https://raw.githubusercontent.com/Goldentrii/AgentRecall-X/main/SKILL.md

SDK & CLI

bash
npm install agent-recall-sdk        # JS/TS apps
npx agent-recall-cli recall "topic" # terminal & CI
typescript
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");

5 Memory Layers

The canonical cognitive-psychology taxonomy mapped to your agent's filesystem:

LayerTypeWhat it holdsPath
1EpisodicWhat happened in each session, chronologically. Auto-written during work.journal/
2SemanticTopic-clustered facts with [[wikilinks]]: Architecture, Goals, Blockers.palace/rooms/
3ProceduralIF-THEN production rules — reusable how-tos.palace/skills/
4NarrativeProject phases: Goal → What was hard → How solved → Synthesis.palace/pipeline/
5CorrectionBehavioral calibration: rules the agent must follow, with severity and outcome tracking.corrections/
+AwarenessCross-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.


The Session Loop

CommandWhenWhat it does
/arstartFirst — every sessionOPEN. 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.
/arsaveLast — every sessionSAVE. Write journal + palace consolidation + awareness compounding. /arsave all batch-saves every parallel session of the day (scan, merge, deduplicate).
/arrecallMid-session, on demandSEARCH. Surface past knowledge for the current task — documented fixes, prior decisions, patterns.
/arreflectEvery K sessionsCONSOLIDATE. 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; /arrecall and /arreflect compound it.


The Automaticity Principle

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.


Dreaming — Nightly Consolidation (optional)

An autonomous overnight agent that runs while you sleep and compounds everything your sessions wrote during the day.

What it doesResult
Mine patterns across all projectsRepeated corrections promote to palace/awareness
Ebbinghaus salience decayLow-signal rooms fade; your palace stays sharp
Journal rollupsEntries >30 days compress into summary rooms
Awareness graduationCorrections confirmed N× times go cross-project
Telegram reportNightly summary: learned · decayed · crystallized

Requires a live Claude Code login. If the session expires, dream skips with a Telegram alert.

bash
# Fix expired login (run this when dreaming stops)
claude login

Dream reports are saved locally to ~/.agent-recall/dreams/YYYY-MM-DD.md.


Semantic Recall — opt-in, 100% local embeddings

Keyword recall cannot reach a memory phrased differently from your question ("semver increment" never matches a rule written as "one version bump per release"). The optional semantic leg closes that gap with a local ONNX embedding model — zero cloud, zero telemetry, and the recall path never touches the network.

bash
ar embeddings setup     # one-time: installs the local runtime (~380MB) + downloads the model (~145MB, cached forever)
ar embeddings rebuild   # builds the vector index from your store (incremental — only new/changed content embeds)
export AGENT_RECALL_EMBEDDINGS=1   # or add "embeddings_enabled": true to ~/.agent-recall/config.json
ar embeddings status    # flag / model / index diagnostics
PropertyGuarantee
DefaultOFF — flag off is byte-identical to keyword-only recall
InferenceLocal ONNX (transformers.js), CPU, ~5-10ms per query warm
NetworkOnly ar embeddings setup ever downloads (one-time, cached, never re-fetched). Recall and rebuild run with remote fetch hard-disabled — offline you get a clean actionable error, never a hang
PackagingNeither runtime nor model ships in the npm package — installed self-contained under ~/.agent-recall/embeddings/ on opt-in
DegradationMissing/corrupt index or model → keyword results, unchanged, with the reason in semantic_leg metadata — never an error
SecuritySemantic candidates pass the same trust/scope/fence stages as keyword ones; the index stores content-hash→vector only (no text), so a stale or tampered index cannot inject content
MeasuredGolden retrieval eval 2026-09-12: 75% → 90% top-5 hit-rate, zero regressions (default paraphrase-multilingual-MiniLM-L12-v2, ~145MB; the e5 family is registry-available via AGENT_RECALL_EMBEDDINGS_MODEL — measured tradeoffs in the fix7 report)

Chinese/English cross-lingual queries work (the model is multilingual — a zh question finds an en rule and vice versa). Re-run ar embeddings rebuild occasionally (or after writing a lot); content-hash keying makes it cheap, and un-indexed new content simply stays keyword-searchable until then.


Experimental: Recurrence & Reflection Harness Kit

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:

PieceWhat 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 · /arreflectThe 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.


War Room Dashboard — Download & Deploy

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.

  1. Download ar-warroom-v3.4.32.zip from the latest GitHub Release.
  2. Unzip it, then serve it locally:
bash
cd warroom
python3 -m http.server 8080
  1. Open http://localhost:8080/AgentRecall.html

This is the recommended onboarding for Hermes / OpenClaw / OpenCode users too — one offline page to see everything your agent has learned.


Architecture

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 Compatibility

PlatformMechanismStatus
Claude CodeMCP server + skill + hooksPrimary
Cursor · Windsurf · VS Code (Copilot) · CodexMCP serverSupported
Any JS/TS appSDK (agent-recall-sdk)Supported
Terminal / CICLI (ar)Supported

Links

Contributing

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.

License

MIT — see LICENSE.

Установка

TypingMind
Требования:

Node.js 18+

{
  "mcpServers": {
    "goldentrii-agentrecall": {
      "command": "npx",
      "args": [
        "-y",
        "AgentRecall"
      ]
    }
  }
}

Используйте AgentRecall MCP с разными моделями ИИ

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения AgentRecall вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду запуска коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Если в терминале появится запрос на подтверждение, подтвердите установку пакета.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте сервер AgentRecall

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP AgentRecall.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "goldentrii-agentrecall": {
      "command": "npx",
      "args": [
        "-y",
        "AgentRecall"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для AgentRecall, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для AgentRecall.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете использовать AgentRecall, чтобы помочь мне с этой задачей?
AgentRecall
Конечно. Я всё прочитал.
Вот что я нашёл с помощью AgentRecall.

Часто задаваемые вопросы

Для чего используется сервер MCP AgentRecall?

AgentRecall — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP AgentRecall с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать AgentRecall с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать сервер MCP AgentRecall с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив AgentRecall, вы сможете использовать его инструменты MCP с моделями, которые предпочитаете, и поддерживать порядок в чатах TypingMind.

Как подключить сервер MCP AgentRecall к TypingMind?

AgentRecall работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP AgentRecall в TypingMind?

AgentRecall предоставляет инструменты MCP (7), которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP AgentRecall?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если AgentRecall требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие MCP-серверы

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇