mex AGENTS.md

mex AGENTS.md is an instructions file for Codex, OpenCode from mex-memory/mex. It costs 205 tokens per session, scanned A, original, MIT.

Project instructions for MEX, a persistent memory system for AI coding agents that stores structured project context and detects drift.

In plain words
What is it for?
Use them to guide session startup, load only relevant project memory, invoke MEX workflows, and report whether changes remain local or need to be committed and pushed.
Why use it?
They tell an agent which project context to read, when to create a durable specification proposal or team handoff, and how to describe what was changed.

Instructions file for CodexOpenCode

About the project

mex is a repository-local knowledge system for AI coding agents that turns codebase discoveries into connected Markdown documentation and a code graph. It helps agents and developers retain architectural decisions, conventions, edge cases, and project context across coding sessions while detecting documentation affected by code changes. The catalogue skills and instructions are add-ons for using mex with coding agents.

mex-memory/mex · 1,542 stars · on GitHub

Install

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.

agentmods
npx agentmods add instructions/mex-memory/mex/agents-md
Clone the repo
git clone --depth 1 https://github.com/mex-memory/mex

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 mex AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mex-memory/mex/agents-md.svg)](https://agentmods.dev/instructions/mex-memory/mex/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mex-memory/mex/agents-md"><img src="https://agentmods.dev/badge/instructions/mex-memory/mex/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 205 This file is loaded in full into every session.
When invoked 205 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00205 $0.00205
Opus 5 $0.00102 $0.00102
Sonnet 5 $0.00041 $0.00041
Haiku 4.5 $0.00020 $0.00020

Measured yesterday against content hash 4ddfb6a2a54c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mex 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 yesterday.

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 · 10 lines

What it actually says

MEX agent skills

  • At the start of every session, read .mex/AGENTS.md and .mex/ROUTER.md before project work; follow ROUTER.md to load only the relevant context.
  • Use $mex-inbox for durable governed Spec proposals and $mex-relay for durable team handoffs. Invoke them automatically when intent clearly matches; explicit invocation remains available.
  • When MEX context materially influences an answer or implementation, include one concise acknowledgement: MEX context used: <specific records/files/entities consulted>.
  • Do not claim an author, date, or historical event unless the retrieved data actually provides it.
  • After a MEX write, say exactly what changed and its sharing boundary: a local draft is checkout-only and nothing is shared; a canonical artifact is written to the working tree and requires commit/push to share.
  • Skill activation is not approval for canonical actions.
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. yesterday First seen · 10 lines · 205 tokens per session scan A 4ddfb6a2a54c

Subscribe to this mod's changes

mex AGENTS.md is an instructions file published in the GitHub repository mex-memory/mex (1,542 stars, last pushed today), licensed MIT. It adds 205 tokens to every session, about $0.0010 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-09-03.

Related

Other instructions, from other repositories

ccRecall CLAUDE.md

Claude Code instructions for tznthou/ccRecall, covering ccrecall — ai memory service for claude code, 定位, 指令, 技術約束 and 架構.

tznthou/ccRecall · 948 tokens

Iron-mem CLAUDE.md

Instructions for BMC-INC/Iron-mem, a project described as: Agent-native memory infrastructure for AI coding assistants. Governed session capture, LLM compression, hybrid retrieval (FTS + vector + RRF), temporal knowledge graph, content-addressed storage, compliance-grade classification. Single Rust binary, MCP server.…

BMC-INC/Iron-mem · 9 tokens

ai-mind-map copilot-instructions.md

Copilot instructions for shdra06/ai-mind-map, covering ai mind map mcp — code memory engine (v1.4.0), 🚀 first thing to do in every conversation, quick lookup: "i need to..." → use this tool, ⚡ session lifecycle (always use these) and 🔍 find code (instead of grep/reading files).

shdra06/ai-mind-map · 1,132 tokens

contextmax CLAUDE.md

Instructions for galliani/contextmax, covering claude.md - ai assistant guidelines, project overview, core principles, development commands and start development server.

galliani/contextmax · 1,602 tokens

ai-mind-map CLAUDE.md

Claude Code instructions for shdra06/ai-mind-map, covering ai mind map mcp — code memory engine (v1.4.0), 🚀 first thing to do in every conversation, quick lookup: "i need to..." → use this tool, ⚡ session lifecycle (always use these) and 🔍 find code (instead of grep/reading files).

shdra06/ai-mind-map · 1,132 tokens

repo-context-mcp AGENTS.md

Instructions for nduc99911/repo-context-mcp, covering agents.md — repo-context-mcp, project, layout, commands and conventions.

nduc99911/repo-context-mcp · 301 tokens