Statewright is a state machine guardrail system for AI coding agents that constrains which tools an agent can use in each workflow phase. Instead of giving agents 40+ tools at once, it enforces phase-specific tool access (e.g., read-only during planning, edit tools during implementation, test commands only during testing). Built on a deterministic Rust engine with no LLM in the loop, it integrates via MCP and hooks with Claude Code, Codex, Cursor, opencode, and Pi. Research on a 5-task SWE-bench subset showed two local models (13.8GB and 19.9GB) improved from 2/10 to 10/10 with constraints enabled. Workflows are defined in JSON with states, transitions, guards, and tool allow-lists. Free tier available; managed cloud handles workflow storage and the MCP gateway.
Table of contents
QuickstartThe problemThe approachResearch resultsQuick startHow it worksDefine your own workflowsSupported agentsPricingSelf-hostingTradeoffsDocsContributingLicenseSort: