SuperAPI AI Directory

martin-loop

Open-source control layer for AI coding agents. Adds hard budget caps, verifier gates, explicit stop reasons, and run receipts around Claude Code, Codex, and Ralph-style autonomous coding workflows.

Open website

About this tool

MartinLoop is an open-source control layer built around AI coding tasks, designed to let developers hand real software tasks to coding agents without supervising them the entire time. According to official materials, it is built from experience with thousands of agent runs, and its core question is: when you want to hand a real task to an agent and walk away with confidence, can you ensure the task always stays focused, bounded, verifiable, and accountable.

In terms of purpose, MartinLoop serves as a management system external to coding agents; it does not replace the agents themselves, nor does it replace Git, CI, code review, or security scanning tools. It connects the control path from preflight checks to post-run evidence, providing a unified governance execution record for these workflows. It is suited to scenarios that require clear task criteria, hard budgets and iteration limits, controlled retries and stop conditions, independent verifier commands, recovery and rollback evidence, bounded completion decisions, and run receipts.

Key capabilities include: budget control, with a hard spending cap settable via --budget-usd and an attempt limit settable via --max-iterations; verifier gating, requiring completion to be based on fresh verification evidence tied to the current run and workspace, with run results having three clear verdicts: VERIFIED, STOPPED, and NEEDS REVIEW; policy checks, which can block unsafe verifier commands, risky path changes, and secret-like task inputs before execution; failure classification, providing 13 canonical runtime failure categories; run receipts and dossiers, with martin dossier --latest for viewing the latest result, martin runs verify --latest for verifying stored integrity, and martin share --latest for generating a local share package containing a redacted JSON receipt, a Markdown summary, and a proof-card SVG; local-first optional hosted sync, where after configuring MARTIN_API_TOKEN and MARTIN_TELEMETRY_ENDPOINT, retained evidence can be sent via martin sync status and martin sync flush; MCP integration, where @martinloop/mcp@latest can be installed or martin mcp print-config can be used to generate host configuration.

In terms of usage, users can first run npx -y martin-loop@latest audit to audit the API-equivalent spending of fixed retry loops, add --offline to disable network access, or --share to generate a shareable summary. Then run npx -y martin-loop@latest start for the installation guide, or use npm install -g martin-loop@latest for a global install. Then use martin run to define the goal, validators, budget, and iteration limit. A demo command npx -y martin-loop@latest demo is also provided, along with a Swarm mode demo that requires no provider calls and incurs no cost. When --model is provided, MartinLoop passes it through as-is and does not inject a hidden fallback model.

Use cases include: letting an agent take on a larger task without having to watch every step, maintaining a unified workflow across different coding agent runtimes, performing preflight checks before committing, controlling retry boundaries, and generating an execution record available for review. It supports native agent CLIs (Codex, Claude Code, Gemini CLI) and OpenAI-compatible endpoints (Kimi K2, NVIDIA Nemotron, DeepSeek, Qwen/Qwen Coder, Mistral/Codestral, OpenRouter/Together/Fireworks routing, Ollama, LM Studio, llama.cpp, etc.), with --engine openai enabling OpenAI-compatible endpoints.

In terms of limitations, MartinLoop does not replace the coding agent itself, nor does it replace Git, GitHub, CI, dedicated security scanners, observability platforms, or code review. Validators only prove the checks they run, and VERIFIED does not mean the code is error-free or safe to merge. Cost and token output always carry a source label (actual, calculated, estimated, or unavailable); for Codex, authoritative usage is reported only when the host exposes it, otherwise it is marked as estimated. Receipt integrity must be verified before a run is treated as trusted external review evidence. The Army mode demo is only locally simulated evidence, does not participate in persistent storage, and does not evaluate signed receipt integrity. Arcade is for display only and cannot change agents, budgets, validators, policy decisions, run results, or receipt evidence. Specific pricing, rates, and similar information are not currently provided.