agentleFS
GoldentriiGoldentrii/AgentRecall/AGENTS.md

AgentRecall

AGENTS.md371 starsChanged 4 months agoMITView on GitHub

AgentRecall gives you persistent memory across sessions. The only thing the human ever does is describe intent — loading and saving memory is invisible runtime machinery that YOU, the agent, must drive without being asked. This host (Codex, Cursor, or any raw MCP client) has no lifecycle hooks. Claude Code auto-fires memory at session start/stop via hooks; here there is no such hook. That means: if you don't call these tools yourself, nothing loads and nothing saves — silently. This…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If you don't have MCP available, use the ar CLI instead:

    line 101
  2. Very specific:

    Run session_start(project="auto") to let AgentRecall detect from context

    line 120
  3. Very specific:

    Call session_start at the start of every session that resumes prior work, and call session_end before you stop — unprompted.

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AgentRecall — Codex Agent Instructions

AgentRecall gives you persistent memory across sessions. The only thing the human ever does is describe intent — loading and saving memory is invisible runtime machinery that YOU, the agent, must drive without being asked.

This host (Codex, Cursor, or any raw MCP client) has no lifecycle hooks. Claude Code auto-fires memory at session start/stop via hooks; here there is no such hook. That means: if you don't call these tools yourself, nothing loads and nothing saves — silently. This is non-negotiable, not a nice-to-have:

  1. ENTRY — ALWAYS, every session, not just on trigger phrases. The moment a session resumes prior work, call session_start FIRST, before acting on anything else. Do not wait for the user to say "load my context" — that phrase (see trigger table below) is an additional signal, not the only permitted trigger.
  2. EXIT — ALWAYS, before you stop. Before ending a turn/session where you did meaningful work, call session_end with a real summary. Do not wait for the user to say "save this" — that phrase is an additional durable-intent trigger, not a gate you wait behind. Saying it is not saving it: only the tool call saves it.
  3. DURABLE INTENT — call immediately, don't defer. The moment you or the user says save / remember / checkpoint / 记住 / 保存, call session_end (or remember for a single fact) right then, not at some later "natural" stopping point.
  4. recall and check are safe to call freely, any time, with no gating at all.

Tool surface (verified against packages/mcp-server/src/index.ts + tool-surface-purity.test.mjs)

AgentRecall's real MCP surface is 5 tools by default, 6 with --full, 13 with AR_EXTRAS=1 --full — not the 10-tool list this file used to describe. That old list mixed in four project-board/status and bootstrap-scan/import tools that were deleted from the MCP surface on 2026-07-05 (zero organic MCP use); their logic lives on in the CLI only, see the CLI-equivalents table below.

Default (5) — always registered, every session

ToolPurpose
session_startLoad project context — corrections, insights, watch_for warnings. Call at ENTRY, always.
session_endSave journal, insights, trajectory. Call at EXIT, always, and on any durable-intent trigger.
rememberWrite a single fact/decision — auto-routes to the right store. Durable-intent trigger.
recallSearch all memory — keyword/RRF fusion + optional vector. Safe to call any time.
checkRecord understanding; anticipates the likely correction before you make it. Pass action_description before a risky action (publish/deploy/delete/credential/external-send) for a matching + blocked/advisory verdict. Safe to call any time.

--full adds (1 more, 6 total)

ToolPurpose
check_actionPre-action safety matcher — warns on publish/push/deploy before you run them.

AR_EXTRAS=1 --full adds (7 more, 13 total) — quarantined, low-use

ToolPurpose
pipeline_openOpen a new project narrative phase.
pipeline_closeClose active phase with reflection fields.
pipeline_listList all narrative phases as JSON summaries.
pipeline_currentReturn content of the currently active phase.
pipeline_showRender project narrative spine — all phases.
register_ruleSave an IF-THEN behavior policy.
digestContext cache — store/recall/read/invalidate pre-computed analysis.

Trigger Phrases → Actions

Trigger phrases below are additional signals for durable intent — they are not the only conditions under which you call these tools. session_start fires at session begin regardless of phrasing; session_end fires before you stop regardless of phrasing. The phrases below just make the save/recall content explicit when the user names it directly.

Session begin (always, no trigger phrase required):

First action of every session that resumes prior work → Call session_start(project="[slug or auto]") → Show: project intention, last session summary, top insights, watch_for corrections

Explicit load phrasing (reinforces the same call):

"load my context" / "what was I working on" / "load AgentRecall for [project]" → Call session_start(project="[slug or auto]")

Session end / durable intent (always before stopping, no trigger phrase required):

Before ending any turn/session with meaningful work done → Call session_end(summary="...", insights=[...], trajectory="...") → Confirm: "Saved to ~/.agent-recall/projects/[slug]/journal/[date].md"

Explicit save phrasing (reinforces the same call, call it NOW, don't defer):

"save this session" / "save to memory" / "wrap up" / "记住" / "保存" → Call session_end(...) immediately

Recall specific knowledge (any time, no gating):

"recall [topic]" / "what do I know about [X]" / "any past notes on [X]" → Call recall(query="[topic]") → Show results inline

Save a single fact (durable-intent trigger, call it NOW):

"remember this" / "save this decision" / "note: [X]" → Call remember(content="[X]")

Checkpoint (mid-session, durable-intent trigger):

"checkpoint" / "quick save" → Call session_end with a lightweight summary: "Checkpoint: just completed X, next is Y"


Token Cost Guide

ActionApprox tokensWhen
session_start~800–1200Once per session — ENTRY, always
recall~200–400On demand
remember~100On demand
session_end~400–600Once at end — EXIT, always
check~150Before risky actions

The only session where session_start/session_end may be reasonably skipped is a self-contained one-off that touches no prior context and produces nothing worth remembering — even then, session_end costs ~400-600 tokens against silently losing the work, so default to calling it.


MCP Tool → CLI Equivalent

If you don't have MCP available, use the ar CLI instead:

MCP ToolCLI CommandNotes
session_startar cold-startLoads context for current project
rememberar write "<content>"Freeform journal entry. ar capture "<question>" "<answer>" for Q&A format
recallar recall "<query>"Search palace + journal. Alias: ar insight "<query>"
session_endar saveallBatch-saves all today's sessions; or ar write "<summary>" for manual entry
check(no CLI equivalent)MCP only — correction tracking via hook-correction hook

Note: ar remember does not exist. Use ar write for freeform notes or ar capture for Q&A pairs.

A handful of tools that existed on the MCP surface before 2026-07-05 (project/board-status and bootstrap-import helpers) were removed from MCP as part of a purity cleanup — zero organic MCP use — but their logic lives on behind ar status and ar bootstrap on the CLI. If you don't have MCP available at all, ar status and ar bootstrap are your board/status and note-import commands.


Project Slugs

Projects live at ~/.agent-recall/projects/<slug>/. Common slugs:

  • Run session_start(project="auto") to let AgentRecall detect from context
  • Or use the explicit slug: session_start(project="novada-site")

Notes for the Agent

  • Call session_start at the start of every session that resumes prior work, and call session_end before you stop — unprompted. Waiting for the user to say "load"/"save" defeats the point of persistent memory; those phrases are reinforcement, not the gate.
  • For session_end, extract 1–3 non-obvious insights from the conversation — not "fixed a bug" but "API returns null on session expiry — always null-check"
  • Palace is selective — only store decisions, patterns, goal hierarchy. Not full transcripts.
  • This file's lifecycle doctrine must match packages/mcp-server/src/server.ts's live MCP instructions (both derive conceptually from packages/core/src/host-profile.ts's lifecycleInstructions("B")). See packages/mcp-server/test/lifecycle-canonical-drift.test.mjs — it fails the build if this file regresses toward gating session_start/session_end on the user asking first, or restates the stale 10-tool surface.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.