MARTINLOOP

MartinLoop — Your AI agent doesn't know when to stop.

Same task. $2.30 with MartinLoop. $5.20 without. AI agents burn cash retrying blind. MartinLoop sets the budget, verifies the fix, and exits clean — before the bill arrives. Reproducible via pnpm --filter @martin/benchmarks eval on the flaky-CI-gate task.

Open source · MIT licensed · martin-loop on npm · Keesan12/Martin-Loop on GitHub

npm install -g martin-loop
martin run "your task" --budget 3 --verify "pnpm test"
martin inspect

Your AI budget is leaking. Engineering knows. Finance doesn't.

  • Wasted tokens. By the 5th retry, 80% of what the model reads is its own failed attempts. You're paying for it to re-read garbage.
  • Every error gets the same fix: retry. Syntax error? Retry. Hallucination? Retry. Logic bug? Retry. No diagnosis, no targeted fix — just another $2 burned.
  • No spending limit. There's no cap inside the loop. Finance sees a $40K bill they can't explain. AI budgets get frozen.

Four things happen on every MartinLoop run.

  1. Smarter retries. Failed attempts get compressed into structured signals. Token usage stays flat instead of growing with every retry.
  2. Targeted failure handling. 11 failure types, each with a different response. Syntax → constraint fix. Hallucination → grounding check. Logic → chain-of-thought scaffold.
  3. Hard budget cap. Set a dollar limit before the run starts. MartinLoop tracks spend in real time and stops before the cap — not after.
  4. Smart exits. MartinLoop can exit with a partial result when diminishing returns kick in or the budget ceiling approaches. Every run ships something useful.

Pricing

  • Open Source — $0. Full governed runtime. MIT licensed. Unlimited loops. No account required.
  • Pro — $49/mo. Adds the MartinLoop Dashboard, loop heatmap, and cost tracking history.
  • Growth — $149/mo. Failure taxonomy reports, smart model routing, custom budget governors, finance-ready cost reports.
  • Enterprise — $499/mo. Hosted control plane, custom classifiers, compliance-ready audit trails, on-prem deployment, SLA.

FAQ

What is MartinLoop?
The open-source control plane for AI coding agents. Hard budget stops, JSONL run records, an inspectable audit trail, an 11-class failure taxonomy, and test-verified completion.
How much can a governed run save vs an ungoverned one?
On the flaky-CI-gate benchmark, a MartinLoop-governed run completes for $2.30 vs $5.20 ungoverned — a 2.3× reduction. Reproduce with pnpm --filter @martin/benchmarks eval.
Is it open source?
Yes. The core is MIT licensed. The hosted dashboard and managed control plane are commercial.
Who is it for?
Engineering teams, platform teams, and CTOs running AI coding agents in production who need budget control and auditability.