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/cortexprism/cortex/agents-mdgit clone --depth 1 https://github.com/CortexPrism/cortexWhat 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.03181 | $0.03181 |
| Opus 5 | $0.01590 | $0.01590 |
| Sonnet 5 | $0.00636 | $0.00636 |
| Haiku 4.5 | $0.00318 | $0.00318 |
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 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 — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CortexPrism — AI Agent Operating System
Project Identity
CortexPrism is a self-hosted, open-source AI agent operating system — an autonomous agent runtime that turns any LLM into a capable digital agent. It provides persistent memory, a rich tool ecosystem, sandboxed code execution, multi-agent orchestration, a full-featured web UI, and enterprise-grade security.
- License: Apache 2.0
- Version: 0.53.0 (see
deno.json) - Repository:
CortexPrism/cortexon GitHub - CI:
.github/workflows/ci.yml(runs on push tomain)
Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Deno 2.x (TypeScript strict mode) |
| Database | libSQL (SQLite-compatible) via @libsql/client |
| Testing | Deno test runner |
| CLI framework | @cliffy/command |
| LLM SDKs | Anthropic, OpenAI, Google Generative AI, AWS Bedrock |
| Frontend | Inline SPA (Tailwind CDN, CodeMirror 6, vanilla JS, 78 modular files) |
| Package manager | Deno import maps (deno.json) |
Build & CI Commands
deno task check # Type-check all files
deno task lint # Lint all files
deno task fmt # Format all files (auto-fix)
deno task test # Run all tests (sets --allow-all)
deno run --allow-all src/main.ts <command> # Run CLI
CI runs deno fmt --check, deno lint, deno check src/main.ts, deno test --allow-all on
ubuntu, macos, and windows.
Package Structure (v0.48.6+)
The codebase is organized into 6 coarse packages under packages/ and a composition root in src/:
packages/
├── core/ — @cortex/core
│ ├── contracts/ — pure interface definitions (ICortexConfig, IDbClient, etc.)
│ └── src/ — config, db, i18n, utils, plugins
├── gate/ — @cortex/gate
│ ├── contracts/
│ └── src/ — security (policy, vault, supervisor), sandbox, vfs
├── ai/ — @cortex/ai
│ ├── contracts/
│ └── src/ — agent, tools, memory, llm, pipeline, skills
├── server/ — @cortex/server
│ ├── contracts/
│ └── src/ — server, hub, channels, a2a, mcp, voice, workspace, codegraph
├── infra/ — @cortex/infra
│ ├── contracts/
│ └── src/ — processes, services, scheduler, ipc, triggers, workflow, observability
└── cli/ — @cortex/cli
├── contracts/
└── src/ — cli commands, tui
src/
├── agent/ — agent loop orchestrator (81 lines)
│ stages/ — 7 pipeline stages (setup, history, assessment, prompt-builder, model-selector, llm-stream, tool-executor)
│ post/ — post-turn modules (response, background, cleanup)
│ helpers/ — shared helpers (preferences, strip-tool-calls, nanoid)
│ pipeline/ — pipeline context
├── server/
│ server.ts — HTTP server entry (composition root for server)
│ new-router.ts — route dispatcher (replaced 6,075-line monolith)
│ routes/ — 69 route modules (one per API area)
│ ui/
│ │ mod.ts — UI assembler (concatenates JS + HTML)
│ │ js/ — 29 concatenated JS modules
│ │ pages/ — 46 page HTML templates
│ │ shared/ — shared utilities
│ │ css.ts — embedded CSS
│ │ shell.ts — sidebar/layout HTML
│ │ providers.ts
├── main.ts — CLI entry point (composition root)
└── tests/ — 30 test files (flat structure)
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 · 260 lines · 3,181 tokens per session scan A 777521caf5a9
cortex AGENTS.md is an instructions file published in the GitHub repository CortexPrism/cortex (192 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 3,181 tokens to every session, about $0.0159 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
latchkey AGENTS.md
Instructions for imbue-ai/latchkey: For information about the high-level goal and motivations, see README.md.
get-fable AGENTS.md
Instructions for imMamdouhaboammar/get-fable, covering get-fable repository instructions, purpose, working contract, canonical lifecycle packs and runtime semantics.
atlas CLAUDE.md
Instructions for atlas-php/atlas: BEFORE ANY TASK: Read and follow AGENTS.md completely.
lihongwei-cn CLAUDE.md
Instructions for LiHongwei-cn/lihongwei-cn, covering claude.md — claude code 项目记忆, 用户身份, 回复风格(红线), 网站 and 技术栈.
lihongwei-cn copilot-instructions.md
Instructions for LiHongwei-cn/lihongwei-cn: 1|# Universal Agent Spec — 通用规范核心 2| 3|> 本文件是所有 AI Agent 共享的行为规范。 4|> 各 Agent 适配文件(agents/ 目录)在部署时会把本文件内容与 Agent 专属配置合并。 5|> 修改本文件 = 修改所有 Agent 的行为。 6| 7|## 语言规则 8| 9|始终使用中文(简体中文)回复。 10| 11|仅以下内容使用英文: 12|- 代码本身(变量名、函数名、类名、关键字) 13|- URL 链接、命令行指令、API Key 14|…
github-agentic-workflows CLAUDE.md
Instructions for zircote-plugins/github-agentic-workflows, covering claude.md — aw-author plugin, project, commands, branching and quality gates.