built on the axon runtime

The coding agent that lives
in your terminal.

cortex streams the model, dispatches tools, persists an append-only session, and prunes its own context under pressure — then gets out of your way. No Electron. No browser tab. Just a transcript you can scroll, search and copy.

7
built-in tools
∞
session scrollback
2
LLMs · main + pruner
1
binary · zero deps
why cortex

A loop, a product, and a terminal.

axon ships the loop. cortex ships the product on top — the config, the role text, and the terminal it talks through. Everything layers one direction.

⌘
Committed scrollback
The transcript writes to your terminal's own scrollback — not an alternate screen. A finished session stays scrollable, searchable and copyable, even after cortex exits.
✂
Self-pruning context
A cheap secondary model parks stale context so the main model stays under its window. Old blocks are summarized, not dropped — you keep the thread without paying for it twice.
⟳
Append-only sessions
Every turn is persisted as it happens. Undo a file edit byte for byte, resume a session, or audit exactly what the agent did and when.
🔌
MCP, auto-discovered
Spawn any Model Context Protocol server at startup and its tools are wired in automatically — GitHub, filesystems, databases, anything that speaks MCP.
⌗
Composable non-interactive mode
--prompt writes the answer to stdout and everything else to stderr, so cortex pipes cleanly into scripts: cortex --prompt "…" > out.txt
🔭
Wire-level traces
Every request and reply is logged to a trace file — the composed system prompt, the windowed conversation, the pruner's curator calls. Prompt-engineer against reality.
how it works

One turn, four moves.

cortex plans, reads, edits and verifies — then stops. The loop is deliberately tight: a turn that ends with only a plan has produced nothing.

01
🗺️
Plan
State the shape of the work before it's expensive to change your mind.
02
📖
Read
Search before you read, read before you write. No guessing paths.
03
✏️
Edit
Change files in place. Atomic, recorded, revertable byte for byte.
04
✅
Verify
Run the thing that proves it — the test, the build, the command.

Config that layers, not sprawls.

Three sources, each overriding the last. Your user config holds defaults, a project config overrides per-repo, and the environment overrides both — field by field.

  • ✓ A project config that names only a model keeps the API key from your user config.
  • ✓ Known providers supply a default base_url automatically.
  • ✓ A $-prefixed api_key reads straight from the environment.
  • ✓ One shared providers.json across every axon-family tool.
# ~/.config/cortex/config.yaml
name: reviewer

provider: openrouter
model: deepseek/deepseek-v3.2

pruner:
  model: meta-llama/llama-3.1-8b

mcp_servers:
  github:
    command: docker
    args: ["run", "-i", "--rm",
           "ghcr.io/github/github-mcp-server"]
    env: ["GITHUB_TOKEN=…"]

Ship edits, not prompts.

Install in one command. Run in your repo. Watch it work.

Install cortex →Quick start