Borrowing it
Nothing to install: this file belongs to ac0033/agent-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ac0033/agent-memory/main/AGENTS.mdgit clone --depth 1 https://github.com/ac0033/agent-memoryWrote 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/instructions/ac0033/agent-memory/agents-md)<a href="https://agentmods.dev/instructions/ac0033/agent-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/ac0033/agent-memory/agents-md/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/instructions/ac0033/agent-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/ac0033/agent-memory/agents-md.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.06539 | $0.06539 |
| Opus 5.5 | $0.02616 | $0.02616 |
| Sonnet 5.5 | $0.01308 | $0.01308 |
| Haiku 4.5 | $0.00654 | $0.00654 |
Grade A, and why
agent-memory AGENTS.md 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 25d 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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — agent-memory 仓库协作规范
本仓库是"本地长期记忆基础设施"项目,agent 中立,支持插件 / MCP / Skill / LangGraph 库四种接入方式。任何人或 LLM agent 在本仓库工作都必须遵守本文件。只是通过插件或 MCP 使用记忆服务(而不是开发本仓库)的 agent,读 plugins/agent-memory/skills/agent-memory/SKILL.md 与 docs/agent-integration.md,不受本文件约束。
三条架构红线(不可违反)
- D1 数据三层分离:
data/raw原始证据只追加不改写;data/memory是 Markdown 记忆层(唯一事实来源);data/index.db是可重建派生索引,绝不手改。 - D2 写入过门:原始对话不直接入库,必须经脱敏→蒸馏→对账;蒸馏绝不提炼指令性内容。
- D6 可信根:
evals/(MemCompass 运行副本除外)、rubric、发布门槛、审计日志禁止 agent 自行修改。
可信根清单(D6 的枚举,禁止 agent 自修改)
evals/(评估数据集与 runner;evals/memcompass/除外,见下一条)、rubric、发布门槛(含config.py中evolve_*阈值与long_term/evolve/verify.py的三档判定逻辑);- 不在清单内:
evals/memcompass/。它是docs/research/benchmark-suite/的运行副本:改动先在编写源头做,有需要时 agent 直接用docs/research/benchmark-suite/tools/migrate_to_evals.py --apply --force --note "<改了什么>"同步(逐字节一致,README 更新记录自动追加一行),不在副本里单独改;改评分口径的同步,改前改后的读数不直接比较; - 审计日志:
data/logs/evolution_audit.jsonl、data/logs/propagation.jsonl——只追加,禁止改写或删除既有记录; data/snapshots/(整理晋升前的记忆层快照)——回滚依据,禁止改写。
工程约定
- 环境管理:一律用 uv(
uv sync装环境、uv run pytest跑测试、uv run ruff check .跑 lint);不安装系统级 Python 之外的任何东西。宿主用的agent-memory命令来自uv tool install --editable .装的独立环境,不占用仓库的.venv;若后台进程是从仓库.venv启动的(如uv run agent-memory daemon serve),它会锁住.venv,这时uv run加--no-sync,要uv sync先停掉它。 - 改 schema 必须同步改测试:
agent_memory/models.py、agent_memory/config.py的字段或校验规则变更时,必须同步更新tests/中对应测试,且uv run pytest全绿才算完成。 - fail-closed:配置非法、校验失败、证据缺失时直接报错,不做静默降级;宁可拒绝服务也不产出不可信结果。
- fail-closed ≠ fail-lost:写入路径的内容永不因故障丢失——对话原文先归档
data/raw再蒸馏;评价门拒绝可force_review=true转人工复核。报错必须区分确定性失败(原样重试无效,给出命中原因)与临时性失败(可重试)。 - subagent 写入纪律:记忆库对 subagent 只读——它的结论随结果回传主 agent,由主 agent 策展沉淀;subagent 直接落库只会带进任务局部噪音并加剧对账冲突。三层落地:13 个写类 tool(add / update / forget / feedback / session_end / review_resolve / wm_write / wm_clear / archive_sync / wm_refresh / episode_pack / confirm_resolve / forget_request,均带
memory_前缀)的 description 带"仅限主 agent 调用"约束(agent 中立,随工具走);SKILL.md第七节给主 agent 派活时附进 subagent prompt 的标准约束语;宿主工具面硬闸(宿主支持按 subagent 裁剪工具时,在其配置里摘掉写类工具)。例外:常驻命名 agent 用agent:<名字>scope。不做服务端按调用方降级——主/subagent 共用同一 MCP 连接,服务端无从区分。 - 代码更新后后台进程要换成新代码:后台进程按包内代码指纹自动对齐——改了
agent_memory/下的代码,下一次工具调用会先把旧进程停掉重启(前提是宿主用的是可编辑安装,见「环境管理」)。要立即生效或确认状态:agent-memory daemon stop/agent-memory daemon status。 - 评测纪律:见下一节「评测驱动改进的工作流程」,改机制之前必须按它走。
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.
- 25d ago Changed · +37 lines · +1,034 tokens per session 6bef8dbf3f50
- 27d ago Changed 5b2b9b8536e3
- 1mo ago Changed · +3 lines · +682 tokens per session c30e55b3ef26
- 1mo ago Changed · +2 lines · +826 tokens per session ff2e3f4b5364
- 1mo ago Changed · +1 lines · +528 tokens per session 8a905d4db50a
- 1mo ago First seen · 66 lines · 3,469 tokens per session scan A 9768df98208d
agent-memory AGENTS.md is an instructions file published in the GitHub repository ac0033/agent-memory (0 stars, last pushed 26d ago), licensed MIT. It adds 6,539 tokens to every session, about $0.0262 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-31.
Other instructions, from other repositories
vibetags com-example-config-AsyncTestConfig.instructions.md
Instructions for PIsberg/vibetags, covering copilot instructions for asynctestconfig and immutable type.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).