engram: Instructions file for Codex

AGENTS.md

engram AGENTS.md is an instructions file for Codex, OpenCode from toejough/engram. It costs 5,385 tokens per session, scanned A, original, Apache-2.0.

Project instructions for Engram, a persistent memory system for AI agents backed by a searchable note vault. It defines how the project is organized and how its memory skills work.

In plain words
What is it for?
Use it when working on Engram or when maintaining its memory vault, skills, commands, and project-specific instructions.
Why use it?
It gives agents consistent rules for recalling, recording, routing, and curating information across sessions instead of relying only on the current conversation.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is toejough/engram's own configuration. It tells Codex and OpenCode how to work on engram itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything engram configures →

Reuse

Borrowing it

Nothing to install: this file belongs to toejough/engram. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/toejough/engram/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/toejough/engram

Made for: Codex, OpenCode.

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

agentmods badge for engram AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/toejough/engram/agents-md/github.svg)](https://agentmods.dev/instructions/toejough/engram/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/toejough/engram/agents-md"><img src="https://agentmods.dev/badge/instructions/toejough/engram/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.

agentmods 80×15 button for engram AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/toejough/engram/agents-md"><img src="https://agentmods.dev/badge/instructions/toejough/engram/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,385 This file is loaded in full into every session.
When invoked 5,385 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.05385 $0.05385
Opus 5.5 $0.02154 $0.02154
Sonnet 5.5 $0.01077 $0.01077
Haiku 4.5 $0.00539 $0.00539

Measured 14d ago against content hash 8a35befebbe5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

engram 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 14d 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.

AGENTS.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Engram

Persistent memory for LLM agents, backed by an agent-memory zettelkasten vault. Six skills read from and write to the vault on demand: recall, learn, please, route, curate, and write-memory. Each skill ships in agent-instructions/skills/ via engram update. Additionally, engram update/engram register-skills (--accept/--decline/--dry-run/--adopt) offer a companion vault runbook note for every skill, command and Pi prompt template in the default folders — not only engram's six: Claude user skills and commands (symlinks followed), claude.ai-synced skills, Pi user and agents skills, Pi-configured skill/prompt paths and packages, enabled plugin skills and commands, and project-local Claude sources plus Pi sources for trusted projects. Each note is identified by a source-qualified skill key (claude:route, claude:cmd:audit, superpowers:brainstorming, commit:cmd:commit, project:github.com/toejough/engram:cmd:opsx:apply), with a slug derived from the key and skill_key/skill_source recorded on the note; every key is source-qualified; engram's own skills are keyed by the folder they are found in (e.g. claude:route, pi:route), identical copies collapse, and every preamble names the note's skill_source. Removal offers are limited to sources that were read successfully. Declines are remembered by hash, keyed by skill key, in vault-root skill-registrations.json; nothing is written without a terminal, and offers are answered by key, key-prefix pattern, or @scope. New/refreshed notes are pending offers the curate skill reviews. recall and learn invoke write-memory natively as a skill at their write sites, not reached by basename/wikilink. please is one note (its former three sub-runbooks merged into the single note/skill body). The runbook concept itself (captured runbooks with triggers, the shim follow-frame) remains unchanged — only the "skills are replaced by runbooks" direction is reversed.

Automatic memory, on Claude Code only, is a mod, not a skill: engram update deploys agent-instructions/mods/engram-memory, which runs engram auto deliver for each prompt (the vault notes that bear on it arrive beside it) and, after each turn, engram auto judge and engram auto write (each lesson of the turn becomes a note marked written automatically) and engram auto sweep (the session's transcript is indexed for engram query). What those commands did, or could not do, is recorded under auto in the engram data directory, and engram auto deliver prints it on standard error at the next prompt, as at most four lines (the notes delivered, written, left out and failed) and removes the records it showed; the mod shows each line through Claude Code's log ($.ui.log): the user sees them and the model does not read them. It acts only for the prompts the user sends (origin composer, bridge, slack-ping, sdk); turns of headless prompts (sdk, claude -p) are judged and swept only with ENGRAM_AUTO_CAPTURE_SDK=1.

Read the full file on GitHub · 142 lines

Changes

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.

  1. 14d ago Changed · +4 lines · +201 tokens per session 8a35befebbe5
  2. 15d ago Changed · +21 lines · +1,720 tokens per session d2b54bda326a
  3. 26d ago Changed · +1 lines · +72 tokens per session efa9df80f5ad
  4. 27d ago First seen · 116 lines · 3,392 tokens per session scan A 25b977bcfcc7

Subscribe to this mod's changes

engram AGENTS.md is an instructions file published in the GitHub repository toejough/engram (10 stars, last pushed 13d ago), licensed Apache-2.0. It adds 5,385 tokens to every session, about $0.0215 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-10-11.

Related

engram AGENTS.md compared with instructions from other repositories

engram AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
engram AGENTS.mdtoejough/engramInstructions file1013d agoApache-2.0A5,385Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode