The conductor, not another instrument.
apex sits in front of the AI coding agents you already have — ollama · claude · codex · agy · opencode — and routes every goal by your objective: cheapest that can provably do it, most capable, or fastest (learned from your own run history). Now it's one chat in front of a decentralized fleet: the orchestrator decides what each message is, machines across your LAN claim the work, reserve their file areas before writing, and every merge is gated, fenced, and self-healing — conflicts reconcile themselves, never you.
↑ live demo — pick the cheapest provider, escalate only if a real gate fails, then keep it true
Every other tool makes you pick a model up front and pay frontier prices for all of it. apex doesn't.
Complex goals decompose into trivial, independent tasks that machines work in parallel and merge back without stepping on each other — on greenfield and existing codebases. The trick isn't merging harder; it's conflict-freedom compiled before anything runs, then enforced while it does.
Scout + reserve — unknown-scope tasks get a cheap read-only scout that predicts their file area; every task leases its area (refs/apex/reserve/*) before writing, and overlapping leases resolve deterministically with no coordinator. Write-fences — deliveries carry durable scope trailers; out-of-scope changes are quarantined at integration, preserved, and reconciled. Contract-first ordering — interface tasks (types, schemas, stubs) complete first; dependents code against frozen contracts they cannot modify. Repo knowledge — a git-history map of hot files, co-change pairs, and seams teaches the planner where an existing codebase can actually be split. And after every merge: gates re-run, overwrites are detected by blob comparison, and failures auto-dispatch a reconcile task a capable agent claims. Read the architecture →
Bare apex opens a live tmux home: a goal-pursuing REPL beside the plan, the run history, and the filesystem changing in real time. Even a free local model writes real files — apex materializes them to disk.
Each is a real, tested command. Most exploit the fact that apex conducts many agents — things a single-agent tool can't do.
One input on web and CLI. Questions get answered; goals become pursuits — assigned to a free fleet machine when one is online, run locally otherwise. You never pick a mode.
The orchestrator (classify → plan → consolidate) defaults to the most capable brain — Claude Code on opus when installed. Workers stay cheapest-first, chosen by each machine for itself.
Before writing, tasks reserve their file areas as git refs. Unknown scopes get scouted by a small local model. Two agents can't write the same files — the overlap loses the race and retries.
Every delivery is measured against its reserved scope and labeled with durable commit trailers. Out-of-scope changes never integrate silently — they're quarantined, preserved, and reconciled.
After every merge: gates re-run in the integrated tree, overwrites are caught by blob comparison, and any failure auto-dispatches a reconcile task. Keep + reconcile, never revert — and never a human.
Coupled work starts with an interface task that delivers the contracts (types, schemas, stubs). Dependents code against them, can't modify them, and get them on disk before they run.
Hot files, co-change pairs, and seams mined from git history steer decomposition on real codebases: hot files get one serialized register task; boundaries follow the seams.
Register this machine as a worker in one click, flip the worker on/off with a slider, watch its console live, and see every remote task's plan and execution map — with the worker's name on each step.
Each CLI agent gets its own persistent session named after it and the project (apex_claude_myapp) — set up and authorize claude/codex/agy right in the web terminal.
Chat history persists across restarts and is shared between web and CLI — pick up in the browser exactly where the terminal left off. In-flight fleet tasks come back as live cards.
Agentic CLIs edit with their own tools; text-only models emit FILE: blocks that apex materializes to disk (path-escape safe). Even ollama builds, doesn't describe.
Bare apex opens a REPL beside live todo, history, and filesystem panes — watch the plan advance and files appear.
Declare a goal; apex checks desired vs actual state and converges on drift via a pursuit. The control-loop pattern, over your codebase.
Fire pursuits, reconciliations, or tasks on an interval or cron — via an in-process daemon or exported to your OS crontab.
The REPL remembers the conversation and auto-builds a project brief (reuse CLAUDE.md or generate one) that every agent receives — so stateless models stay on-context.
Approve the plan, then pause / step / resume / cancel a running pursuit — in the web UI or the REPL, where you can also switch model or provider mid-run.
Every subtask streams the concrete provider:model that executed it — never a bare provider. In the web UI, provider & model are two linked selects (pick a provider, get its models).
Launch the REPL and an interactive picker lets you choose the provider, then its model — no more silent default. Enter skips; your pick is saved as the default. Re-run with /setup. In the web UI, every plan step gets its own provider + model selects.
apex mines its own run log for what went wrong — doom loops, rollbacks, rejected reviews, timeouts — and distils durable lessons that get injected into every future prompt. Model-agnostic: a codex failure teaches the next ollama run. Then apex improve patches apex itself, verified and auto-rolled-back.
Ten named guardrails on every agent apex dispatches: no filesystem destruction, no self-destruction, no privilege escalation, no secret exfiltration, no remote code, no history rewriting, no leaving the workspace, no system tampering, no persistence, no touching its own guardrails. Each one toggleable in settings — and an agent can't toggle them itself (that's #10).
Next to every task: who's working it (concrete provider:model, even when routing is auto) and how much of the model's context window is left — real token counts when the API reports them, estimated otherwise. In the REPL, the tmux TODO pane, and the web UI.
The web UI's Pursue tab (now the first tab) renders the run as a live flow diagram — plan → each subtask → outcome. The executing node pulses, its inbound edge flows, and every node carries its provider:model and a context-fill bar.
routing = cheapest · best · fastest. Cheapest is the provably-verified default; best starts at the strongest brain; fastest orders providers by your machine's own measured latencies. Escalation walks whichever order you chose.
Always routes to the cheapest available provider — free local CLIs first, paid APIs last.
Run cheap, check an executable gate, escalate only on failure. The cheapest model that passes wins.
Repeat --verify — all must pass. Tests and no-secrets and lint.
A hard spend cap. Escalation stops when the cap is hit; pursuits end with budget_exhausted.
Provable privacy — only free local providers may run; the run records zero external calls.
A bandit over your history routes each task to the provider that wins that kind at lowest cost. Improves with use.
Let a model decide. On ollama, a small model triages each task's difficulty and apex runs it on the smallest local model that fits - a rename goes to a 1B, a real feature to a 30B. Escalation still covers "not good enough".
Point many machines at one repo and they become a fleet. A top model splits a goal into bounded, gated, difficulty-rated tasks; each machine claims and delivers the ones it can run on its own compute. No server - coordination lives in git refs, and claiming is a lock-free atomic ref-create. Conflicts are prevented at plan time (disjoint file boundaries), so results integrate with no merge hell. A working Concord Manifesto.
Writer ≠ reviewer: a different model must approve each change before apex accepts it.
Snapshot before each step; revert any subtask that regresses the gate. The repo can only improve.
Fan one task to N providers in parallel; the cheapest gate-passer wins. --isolate gives each its own git worktree.
Fan a plan's subtasks out concurrently — each in its own git worktree; winners' diffs merge back onto the base tree.
No tests? apex writes the verification gate from your target, then codes against it.
Plan → execute → evaluate, capped on iterations, subtasks, and wallclock. Always reports a concrete stop reason.
Halts a pursuit that repeats itself; --ask confirms before any paid provider (fail-closed off-TTY).
A tamper-evident SHA-256 / HMAC record of a pursuit — the trust artifact for unattended runs.
Materializes the JSONL log into a queryable store via built-in node:sqlite — still zero deps.
Re-run a past pursuit deterministically — or fork it from any step onto a different provider.
apex stats shows what you spent and what you saved vs always using a paid model.
A budget-capped, auto-committing pursuit for CI; a workflow template opens a PR with a receipt.
Ask a model for a shell command, vet it against safety patterns, confirm, then run.
A local control panel with a real PTY terminal, plus the goal-pursuing REPL.
Reconciliation is the Kubernetes-controller pattern over your codebase: observe actual state, compare to the goal, and converge on drift. Schedule it and apex becomes a standing controller that checks whether other workers achieved the goal — and self-heals when they didn't.
A planner decomposes; workers execute (gated, escalated, files written); the evaluator decides done — within hard caps.
Where Kimi K2 bakes orchestration into model weights (opaque, server-side), apex keeps it external, heterogeneous, and auditable — real vendors in isolated git worktrees, winners merged back.
apex isn't trying to be the best instrument — it's the layer above them. (It runs opencode as a provider.)
| Capability | apex | opencode | claude code | aider |
|---|---|---|---|---|
| Cost-aware multi-provider routing | ● | ◐ | ○ | ◐ |
| Uses other agents as providers | ● | ○ | ○ | ○ |
| Verified escalation (gate → climb cost) | ● | ○ | ○ | ○ |
| Hard dollar budgets | ● | ○ | ○ | ○ |
| Enforced local-only / privacy | ● | ◐ | ○ | ◐ |
| Learned router (improves with use) | ● | ○ | ○ | ○ |
| Adversarial cross-model review | ● | ○ | ○ | ○ |
| Auto-rollback on gate regression | ● | ○ | ○ | ◐ |
| Parallel race / swarm (isolated worktrees) | ● | ◐ | ○ | ○ |
| Scheduled reconciliation loops | ● | ○ | ○ | ○ |
| Live dashboard (plan · history · fs) | ● | ○ | ◐ | ○ |
| Signed, tamper-evident receipts | ● | ○ | ○ | ○ |
| ROI / savings reporting | ● | ○ | ○ | ○ |
| Doom-loop / runaway guard | ● | ● | ◐ | ○ |
| SQLite session store | ● | ● | ◐ | ○ |
| Bounded autonomous loop | ● | ◐ | ◐ | ○ |
| MCP client | ◐ planned | ● | ● | ○ |
| LSP integration | ○ skip | ● | ◐ | ○ |
| Zero runtime dependencies | ● | ○ | ○ | ○ |
● full ◐ partial / different shape ○ none. apex's wedges (escalation, budgets, learned router, receipts, swarm, reconciliation, ROI) are things a single-agent tool architecturally can't do; the table-stakes it lacks (MCP, LSP) are deliberately deferred or skipped.
Phases 1–9 are built & tested; 0.2 adds materialization, the live tmux home, and the scheduler + reconciliation control plane. Next: MCP & a Models.dev registry.
* on an all-local-model history; your savings depend on your task mix.
Needs Node ≥ 24 and at least one provider — a CLI agent on your PATH, or an API key. tmux unlocks the live home.