cortex: Instructions file for Codex

AGENTS.md

cortex AGENTS.md is an instructions file for Codex, OpenCode from CortexLM/cortex. It costs 2,574 tokens per session, scanned A, original, Apache-2.0.

Project instructions for Cortex, a Rust monorepo—a repository containing multiple related programs and libraries—for a decentralized AI research control system. They explain the repository layout, release rules, deployment setup, and security requirements.

In plain words
What is it for?
Use them when changing Cortex binaries, shared Rust libraries, deployment files, documentation, configuration, or release and production workflows.
Why use it?
They give coding agents the project’s boundaries and non-negotiable practices, such as keeping secrets out of images and using fixed production image versions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is CortexLM/cortex's own configuration. It tells Codex and OpenCode how to work on cortex 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 cortex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CortexLM/cortex. 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/CortexLM/cortex/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/CortexLM/cortex

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/cortexlm/cortex/agents-md"><img src="https://agentmods.dev/badge/instructions/cortexlm/cortex/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,574 This file is loaded in full into every session.
When invoked 2,574 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.02574 $0.02574
Opus 5.5 $0.01030 $0.01030
Sonnet 5.5 $0.00515 $0.00515
Haiku 4.5 $0.00257 $0.00257

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

Security

Grade A, and why

cortex 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 19d 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 · 206 lines

How it starts

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

AGENTS.md - Cortex research network

This file is the working contract for code and operator changes. Link to the canonical documentation instead of duplicating runbooks.

Product

Cortex is an autonomous research subnet on Bittensor. Proof runs inside the master. Every other challenge is a Docker container that implements the challenge contract; the master loads it from an operator registry and records its leaves.

Challenge Source Purpose
proof this repository operator-created research topics evaluated by Cortex's recursive language-model engine
bounty CortexLM/bounty container useful vulnerability reports, scored from the CortexLM/backend public feed
opentype OpentypeAI/challenge container exact-gold typed-decision duels on DiffusionGemma weights

Shares always sum to 10,000 basis points. Algorithm 1 is the legacy bounty/proof 2,000/8,000 profile; algorithm 2 is bounty/proof 3,000/7,000 (document version >=2); algorithm 3 (document version >=3) admits any 1..64 unique ids and pays each challenge share * min(sum(leaves), 10^12) / 10^12. Activation is a profile version bump on the master (config/challenges.toml). Design, Prism and Relearn are retired products and their documentation has been removed. No active code, service, challenge profile row or leaf may register them.

Start with the architecture, Proof, challenge containers and the threat model. Do not describe a fake-boundary test, one model call or a pinned image as proof of live KVM execution, scientific reproduction or on-chain payment.

Source map

Path Responsibility
src/cortex/protocol/ frozen v2 SCALE (unsigned wire), Merkle and aggregation
src/cortex/gateway/ durable leaves, immutable seals and burn fallback
src/cortex/validator/ independent recomputation, root consensus and chain dispatch
src/cortex/challenges/ container registry, weights client, public proxy and auto-updating supervisor
src/cortex/proof/ topics, submissions, setup, executor offers and reward allocation
src/cortex/rlm/ recursive agent, budgets, compaction, journals and shared knowledge
src/cortex/vm/ Firecracker host, guest protocol and measured experiment lifecycle
deploy/ Python images, master/validator roles and VM-host service
tests/ protocol, service, HTTP, persistence and lifecycle regressions

Read the full file on GitHub · 206 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. 19d ago Changed · +8 lines · +215 tokens per session bf23dd51848e
  2. 1mo ago Changed · -2 lines · -30 tokens per session 7d0f305e89e2
  3. 1mo ago Changed · +3 lines · +96 tokens per session 15c3132cf832
  4. 1mo ago Changed · +7 lines · +136 tokens per session ac5a4ee011f9
  5. 1mo ago Changed · +50 lines · -3,991 tokens per session 66508430fc15
  6. 1mo ago Changed · +249 tokens per session 11d20b4b3e96
  7. 1mo ago Changed · +229 tokens per session 6268ed76b03f
  8. 1mo ago Changed · +532 tokens per session 84ed800263f7
  9. 1mo ago Changed · +2 lines · +1,458 tokens per session 6307c48b050a
  10. 2mo ago First seen · 138 lines · 3,680 tokens per session scan A 83827c58ac4c

Subscribe to this mod's changes

cortex AGENTS.md is an instructions file published in the GitHub repository CortexLM/cortex (160 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,574 tokens to every session, about $0.0103 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-30.

Related

cortex AGENTS.md compared with instructions from other repositories

cortex AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cortex AGENTS.mdCortexLM/cortexInstructions file160yesterdayApache-2.0A2,574Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot