Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/raia-live/amfsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/raia-live/amfs/amfs-memory)<a href="https://agentmods.dev/rules/raia-live/amfs/amfs-memory"><img src="https://agentmods.dev/badge/rules/raia-live/amfs/amfs-memory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/raia-live/amfs/amfs-memory"><img src="https://agentmods.dev/badge/rules/raia-live/amfs/amfs-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02998 | $0.02998 |
| Opus 5.5 | $0.01199 | $0.01199 |
| Sonnet 5.5 | $0.00600 | $0.00600 |
| Haiku 4.5 | $0.00300 | $0.00300 |
Grade A, and why
amfs-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AMFS Memory — Agent Behavioral Rules
You have access to AMFS (Agent Memory File System) through MCP tools. AMFS gives you a persistent brain — memory that survives across sessions, agents, and machines. Use it to build institutional knowledge over time.
MANDATORY FIRST STEP: Set Your Identity
You MUST call
amfs_set_identitybefore doing anything else. Without it, all your work is attributed to a generic default and you won't appear as a distinct agent on the AMFS dashboard.
amfs_set_identity("<role-name>", "<one-line description of current task>", model="<your-model-name>")
Always pass model= with your LLM model name (e.g. "claude-4-opus", "gpt-4o", "claude-3.5-sonnet"). This is recorded in decision traces so we know which model made each decision.
Sticky identity: Once set, the identity is saved to ~/.amfs/.identity and automatically restored in future sessions — even across process restarts (e.g. Claude Desktop). You only need to call amfs_set_identity again to change roles or update the description.
Use amfs_whoami() to check the active identity. Use amfs_reset_identity() to clear it.
Naming rules:
- Use kebab-case role/domain names that persist across conversations about the same topic.
- Good:
"dashboard-agent","stripe-agent","api-agent","infra-agent","mcp-agent" - Bad:
"fix-button-color"(too specific — won't be reused),"agent-1"(meaningless) - If you're continuing work a previous agent started, use the same name to build on their knowledge.
- The description should say what you're doing right now (e.g.
"Fixing tag rollback for slashed names").
When to GET BRIEFED (start every session with context)
- Before starting any work: Get a compiled briefing from the Memory Cortex. This gives you pre-compiled knowledge about the entities you're about to work on — what other agents know, recent risks, external events, and confidence-ranked facts. This is your most important first step.
amfs_briefing(entity_path="<repo>/<module>") - Read the evidence sections first. The lead digest carries
validated(entries every outcome confirmed — act on these),discredited(entries a failure gated, withreplaced_bywhere known — avoid these) andregime_shift(long-validated entries that recently started failing — something changed; verify before reusing anything in the scope). Eachhot_contextrow has anevidence_status:untested,validated,contestedordiscredited.compact=Truereturns just the lead digest with these sections. - The briefing also carries
tried_here(actions taken on this entity and how each fared) and, under a regime shift, anexploreline with the untried action assigned to you. Passsince=<iso timestamp>on a repeat call to get only what changed. - Then recall your own specific memories and search for details:
amfs_recall("<repo>/<module>", "<relevant-key>") amfs_search(entity_path="<repo>/<service-or-module>") - Before choosing among a fixed set of actions (a tool with an enum
action, a runbook with numbered fixes): retrieve with the candidates and follow the recommendation.amfs_retrieve(query="<the task>", entity_path="<repo>/<module>", include_priors=True, candidate_actions=["resolve:resend_email", "resolve:update_payment_method"], compact=True)action_priorslists each action's won/lost here on similar tasks;recommendation.modeisact(takesuggested_action),explore(everything tried here failed or a regime shift is flagged — trysuggested_actionfirst; it is assigned per agent so peers explore different actions), orescalate(every candidate has been tried and failed — escalate on the first attempt).compact=Truekeeps the first two hits full and the rest as one-liners; priors and recommendation are always complete. - Before making architectural decisions: Get a briefing first, then check specific patterns.
amfs_briefing(entity_path="<repo>/<module>") amfs_search(query="<topic>", min_confidence=0.5) - When encountering errors: Check if the Cortex or another agent already has context.
amfs_briefing(entity_path="<repo>/<module>") amfs_search(query="<error-keyword>")
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · +1 lines · +118 tokens per session b731c8bef8de
- 2mo ago Changed · +7 lines · +323 tokens per session 0f53d2068b6a
- 2mo ago Changed · +11 lines · +302 tokens per session f953b7f8b5ab
- 2mo ago Changed · +3 lines · +73 tokens per session cf52ab32ac51
- 3mo ago First seen · 168 lines · 2,182 tokens per session scan A eb0a11c59c1b
amfs-memory is a cursor rule published in the GitHub repository raia-live/amfs (95 stars, last pushed 3d ago), licensed Apache-2.0. It adds 2,998 tokens to every session, about $0.0120 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
amfs-memory compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| amfs-memoryraia-live/amfs | Cursor rule | 95 | 3d ago | Apache-2.0 | A | 2,998 | Cursor |
| memento-conventionsAiyo28/memento-os | Cursor rule | 4 | 23d ago | MIT | A | 1,035 | Cursor |
| debug-capture-pipelinectxr-dev/llm-wiki-memory | Cursor rule | 130 | 2mo ago | MIT | A | 50 | Cursor |
| aictxoldskultxo/aictx | Cursor rule | 59 | 5mo ago | MIT | A | 556 | Cursor |
| 160-workflow-orchestrationsavagelysubtle/BIG-BRAIN-Memory-Bank | Cursor rule | 5 | 1y ago | MIT | A | 4,188 | Cursor |
| 050-reference-verification-systemsavagelysubtle/BIG-BRAIN-Memory-Bank | Cursor rule | 5 | 1y ago | MIT | A | 0 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 204k | 11d ago | MIT | A | 604 | Cursor |