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.
npx agentmods add instructions/hjqcan/goodmemory/agents-mdgit clone --depth 1 https://github.com/hjqcan/GoodMemoryWhat 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 | $0.02771 | $0.02771 |
| Opus 5 | $0.01385 | $0.01385 |
| Sonnet 5 | $0.00554 | $0.00554 |
| Haiku 4.5 | $0.00277 | $0.00277 |
Grade A, and why
GoodMemory 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 2d 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Guidelines
Are you an agent here to adopt GoodMemory (give yourself or your host durable memory), not to contribute to it? Stop reading this file — it is the contributor guide. Go to llms.txt for a machine-readable onboarding decision tree, or the README Quickstart. The capability descriptor at .well-known/goodmemory.json has install commands, the MCP endpoint, and HTTP endpoints as JSON.
The rest of this document is for agents and humans working on the GoodMemory codebase.
Project Structure & Module Organization
Treat this file as a routing layer, not the final authority. Start with
docs/README.md for documentation routing and task-board/00-README.txt for
execution order. Do not bulk-read docs/, task-board/, reports/, or
docs/archive/ unless a task explicitly needs historical provenance.
README.md
docs/
├── README.md # documentation router and archive policy
├── GoodMemory-Current-Status-and-Evidence.md # current public surface and canonical evidence
├── GoodMemory-First-Principles-and-Reference-Architecture.md # canonical design, core beliefs, operating principles
├── GoodMemory-ImplicitMemBench-Full-300-Research-Summary.md # ImplicitMemBench Full-300 research summary (0.691 claim)
├── GoodMemory-OSS-Architecture-v1.md # historical v1 map of domains, packages, and boundaries
├── GoodMemory-PRD.md # product scope and behavior contract
├── GoodMemory-TDD-and-Evaluation-Strategy.md # test pyramid, eval design, fixture strategy
├── GoodMemory-v1-Quality-Gate.md # historical v1 verification snapshot
├── GoodMemory-v1-Release-Checklist.md # historical release readiness baseline
├── GoodMemory-Unified-Self-Evolving-Roadmap.md # historical roadmap after the v1 core
├── archive/quality-gates/README.md # archived phase closure summaries and gate index
├── archive/design-inputs/ # superseded drafts, not current truth
├── archive/reference-corpus/ # copied research/source material, targeted lookup only
├── GoodMemory-记忆数据分层设计.md # layering and storage reference
└── ...
task-board/
├── 00-README.txt # canonical execution order, status markers, working rules
├── 01-phase-0-...txt -> 25-phase-24-...txt # phase-level execution plan
└── phase-*/00-README.txt # per-phase breakdown and acceptance criteria
adr/
├── ADR-001-memory-taxonomy.txt
├── ADR-002-public-api.txt
├── ADR-003-runtime-context-controls.txt
├── ADR-004-maintenance-engine.txt
├── ADR-005-scenario-fitted-recall-boundary.txt # dual-metric recall + scenario-rule admission
├── ADR-006-module-layering-and-shared-contracts.txt # domain/ contract home, provider ↛ eval
├── ADR-007-python-client-and-docker-distribution.txt # Python client + Docker distribution
├── ADR-008-language-pack-horizontal-extension.txt # current LanguagePack and projection boundary
└── ADR-009-orchestration-and-proof-protocol-boundaries.txt # runtime, research proof, and release orchestration
src/
├── index.ts # package root exports
├── api/ # thin facade, sole concrete assembly, recall orchestration, feedback/internal support
├── ai-sdk/ # AI SDK-facing public exports and contracts
├── domain/ # taxonomy, scope, provenance, core records
├── remember/ # source CAS, extraction pipeline, write pipeline, thin engine
├── recall/ # contracts, loading, retrieval, result assembly, thin engine
├── answer/ # answer evidence-pack composition and operation guides
├── runtime/ # session-scoped context services and spillover controls
├── maintenance/ # decay, dream, consolidation, and maintenance runners
├── verify/ # verification policy for stale or inferred memory
├── storage/ # in-memory, sqlite, postgres, and repository adapters
├── eval/ # eval runners, judge integration, reporting
├── evidence/ evolution/ governance/ # evidence records, proposal flow, and governance helpers
├── embedding/ provider/ # vector write plumbing and provider-backed model adapters
├── host/ # host-facing integration surface and exported contracts
├── language/ # locale-aware extraction and normalization
├── policy/ testing/ # policy hooks and shared test helpers
├── cli/ # explicit memory, host, eval, and service command families
└── cli.ts # parse/version/error/help router and explicit dispatch
tests/
├── unit/ integration/ scenarios/ eval/ # canonical red/green layers
├── cli/ examples/ release/ types/ # CLI, example, packaging, and type-surface regressions
└── ...
fixtures/
├── personas/eval/ and scenarios/eval/ # eval personas and replay cases
├── conversations/ personas/ rubrics/ scenarios/ # supporting fixture sources
└── ...
reports/quality-gates/
├── phase-*/ # accepted phase gate artifacts
└── ...
reports/eval/
├── fallback/ # deterministic validation artifacts
├── live/ # live model eval artifacts with in-memory memory backend
└── live-memory/ # provider-backed live-memory eval artifacts
scripts/ and examples/ hold developer utilities, CLI/eval runners, and reference integrations. Current repository-only proof primitives live under `scripts/proof/`; active research protocols are selected by `scripts/research/protocols.json`; current release preparation lives under `scripts/release/`. Production `src/` must not import the proof kernel.
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.
- 2d ago First seen · 154 lines · 2,771 tokens per session scan A 642007e4cf82
GoodMemory AGENTS.md is an instructions file published in the GitHub repository hjqcan/GoodMemory (17 stars, last pushed 10d ago), licensed MIT. It adds 2,771 tokens to every session, about $0.0139 per session on Opus 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.
Other instructions, from other repositories
agents-remember AGENTS.md
Instructions for Foxfire1st/agents-remember, covering agents remember source checkout instructions, start here — route by role, memory and onboarding, memory retrieval strategies and source layout.
memesh CLAUDE.md
Claude Code instructions for PCIRCLE-AI/memesh, covering memesh — instructions for ai coding assistants, the few things that live only here, running the tests, coverage, and what a 0% file means and verifying a change before claiming it works.
Agent-Memory-Bridge AGENTS.md
Instructions for zzhang82/Agent-Memory-Bridge, covering agent memory bridge contributor instructions, setup and checks, architecture boundaries, mutation and migration invariants and benchmark expectations.
memesh AGENTS.md
AGENTS.md instructions for PCIRCLE-AI/memesh, covering using memesh — for ai agents, the loop that pays for itself, all 11 mcp tools, memory hygiene and what you must never invent.
infinity-context AGENTS.md
Instructions for 777genius/infinity-context, covering agents.md, project intent, source of truth and implementation rule.
mainline copilot-instructions.md
Copilot instructions for mainline-org/mainline, covering mainline, read team intents for context (do this aggressively), write your own intent and if mainline hooks is installed for your agent.