Deterministic-first agent routing · v0.1

Scale down before you scale up.

GrokMax is a deterministic-first execution pipeline for GrokBot-heavy teams. It routes every task to the cheapest capable executor, slims context to what matters, and caches the result across five layers — so nothing is paid for twice.

$0
cost to answer a math task
5
cache layers
33
benchmark fixtures at 100%
109
tests, all passing

Fixtures and tests measured on our machine with the deterministic resolver only — zero spend, no model in the loop. Savings on GrokBot usage are router-level proxies, honestly labeled as such.

How it works

Most tasks are not GrokBot-only tasks.

GrokMax catches cheap work before it becomes an expensive invocation. The pipeline treats GrokBot as the last resort, not the default.

01

Slice context

Send ~1,500 relevant tokens instead of 20,000. The reduction is a proxy for token cost — never a billed measurement.

02

Compile the micro-prompt

Hard constraints survive verbatim. validatePreservation fails loudly if a constraint token is ever lost in compression.

03

Route to the cheapest worker

deterministic > api > chatgpt > opencode > grokbot. GrokBot is the most capable and the most expensive — so it is always last.

04

Execute responsibly

Zero-cost local resolvers handle math, hashing, file counts, and git. Over-budget GrokBot routes refuse rather than pretend.

05

Cache across five layers

L1 exact, L2 normalized, L3 semantic, L4 artifact, L5 durable knowledge. Identical and near-identical tasks cost nothing twice.

06

Ledger everything

Every run is recorded with honest labels: measured, estimated, or proxy. No number gets to pretend it is something it is not.

RouteCostHandlesPreferred
deterministic$0math · hash · file-count · gitalways
api$direct tools and endpointsalways
chatgpt$$research & cheap generationalways
opencode$$repository modificationalways
grokbot$$$$persistent · authed · unavailableonly when nothing else can

Why the honesty matters

Integrity is the product.

Every number GrokMax reports is labeled. Savings are proxies unless they were manually imported from live observation — because that is the only honest way to talk about a platform we cannot see into.

ClaimFigureHonest label
Benchmark fixtures33 tasks · 5 suites · 100% resolve · 100% outcomemeasured on our machine, deterministic resolver only
Automated tests109 tests across 12 fileslocally verified, reproducible via pnpm vitest run
Math task$0.00 — local evaluator, no model in the loopmeasured
Savings on GrokBot usagerouter-level avoided-GrokBot countsproxy — GrokBot platform usage is not directly observable
Context reductionproportion of tokens trimmedproxy for token cost, not a billed measurement

We never claim to measure GrokBot’s platform usage. We also never release a version whose doctor, tests, or performance gates are red. If GrokMax cannot prove it, GrokMax does not claim it.

CLI

One binary. Honest answers.

Install locally with pnpm, run the doctor, and let the pipeline decide who pays for what.

Inside the terminal
$ grokmax doctor
STATUS: 17 healthy, 1 warning, 0 failure
  ✓ node            Node 26.5.0
  ✓ sqlite          SQLite read/write verified
  ✓ exact-cache     L1 round-trip verified
  ✓ semantic-cache  reachable, cold miss as expected
  ✓ routing         router works; sample route=opencode
  ✓ prompt-compiler constraints preserved verbatim
  ✓ opencode-cli    OpenCode CLI detected
  ! grokbot-bridge  GROKMAX_GROKBOT_BRIDGE unset; deemed unavailable

Commands

  • grokmax optimize "<goal>"Full pipeline: plan + outcome
  • grokmax route "<goal>"Routing decision only — never executes
  • grokmax dry-run "<goal>"Skip execution, show what would happen
  • grokmax doctorHealth checks across every subsystem
  • grokmax benchmarkRun the fixture suites, measured locally
  • grokmax savingsHonest report — proxies labeled as such
  • grokmax cache stats | prune | clearCache health and maintenance
  • grokmax statusOne-view aggregate across everything

Get started

Scale down before you scale up.

Clone the repo, install with pnpm, and run the doctor on your own workspace. See what stops being expensive.

git clone grokmaxpnpm install && pnpm cli doctor