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/bongsuchoi/memex/agents-mdgit clone --depth 1 https://github.com/BongSuCHOI/memexWhat 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.01540 | $0.01540 |
| Opus 5 | $0.00770 | $0.00770 |
| Sonnet 5 | $0.00308 | $0.00308 |
| Haiku 4.5 | $0.00154 | $0.00154 |
Grade A, and why
memex 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 — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memex contributor rules
Memex is a Codex-native, local-first long-term memory system. This file contains
repository-wide guardrails for humans and coding agents. Keep it short: detailed
behavior belongs in the owner documents under docs/.
Core invariants
$CODEX_HOME/sessionsrollout JSONL is the default conversation source. Never modify source rollouts; archive/index/database state is derived.- Canonical absolute
session_meta.cwdis project identity. Do not infer project identity from basename, archive path, display name, or process cwd. - Enforce project/global/all scope at every query, import, graph traversal, and relation-write boundary.
- Preserve exact fact provenance to source exchanges. Human assertions and allowlisted local repo/Git/test observations may be learnable; Memex recall, assistant synthesis, external/unknown output, and unverified generated output are searchable but not learnable evidence.
- Preserve
exchanges.rowidon update. Extraction uses rowid watermarks. - Extraction claim, fact/provenance writes, saved counts, and watermark advance must commit atomically or remain retryable.
- Model-backed work uses isolated local
codex execonly. Default model:gpt-5.6-luna; override withMEMEX_CODEX_MODEL. - Automatic lifecycle work must be bounded, retry-safe, and observable.
Fact state and sync protocol v4
Treat durable fact state as independent axes:
- semantic — fact meaning/scope; guarded by
semantic_generationandsemantic_updated_at - lifecycle — active/inactive; guarded by
lifecycle_generationandlifecycle_updated_at - lineage —
source_exchange_idsandconsolidated_count - local-derived — KR text, ontology, relations, vectors
Do not collapse semantic and lifecycle into one clock.
Lineage is monotonic:
source_exchange_ids→ set unionconsolidated_count→ max
This applies to both existing local facts and fresh remote inserts.
Protocol v4 durable payload contains only:
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 · 172 lines · 1,540 tokens per session scan A 9e2612d44f03
memex AGENTS.md is an instructions file published in the GitHub repository BongSuCHOI/memex (0 stars, last pushed 2d ago), licensed MIT. It adds 1,540 tokens to every session, about $0.0077 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-31.
Other instructions, from other repositories
PlaudBlender copilot-instructions.md
Instructions for Gunnarguy/PlaudBlender, covering plaudblender — ai agent instructions, quick orientation, what this project does, ui layout (dash v2 — appv2/) and project structure.
m_flow AGENTS.md
AGENTS.md instructions for FlowElement-xinliuyuansu/m_flow, covering m-flow — developer & agent reference, 1. repository map, extension points, 2. local development and python backend (requires python 3.10 – 3.13).
open-ontologies CLAUDE.md
Instructions for fabio-rovai/open-ontologies, covering open ontologies, ontology engineering workflow, generate, validate and load and reason.
engraphis CLAUDE.md
Instructions for Coding-Dev-Tools/engraphis, covering claude.md, the one rule that prevents most mistakes, before you say "done" — run the canonical gate, slash commands available here and working style in this repo.
kglite CLAUDE.md
Instructions for kkollsga/kglite, covering kglite — claude code conventions, build & test, architecture, the boundary principle (wrappers vs core) — summary and in-memory is the core product.
tpu_performance_autoresearch_wiki GEMINI.md
Instructions for vlasenkoalexey/tpu_performance_autoresearch_wiki, covering gemini/antigravity operating rules, platform adaptation (claude code → gemini/antigravity), 1. skills — native, no emulation, 2. never-stop hook & retrospectives and 3. session and transcript resolution.