aicoolies logo
Statewright logo
Statewright logo

Statewright

State-machine guardrails for controlling which tools AI coding agents can use at each phase.

open sourceupdated Jun 3, 2026

Statewright is a guardrail layer for AI coding agents that uses explicit state machines to control what an agent can do at each stage of a workflow. Instead of relying only on prompt instructions, teams can model phases such as plan, implement, test, and review, then constrain tool access for clients like Claude Code, Codex, Cursor, opencode, and related MCP workflows.

Statewright focuses on a specific agent reliability problem: AI coding agents often have too much tool access at the wrong time. Rather than depending only on natural-language instructions, Statewright uses state-machine guardrails so teams can define workflow phases and control what an agent is allowed to do in each phase. That makes it more of an agent-control layer than a coding assistant by itself, and it fits the growing need for explicit policy around autonomous coding workflows.

In practice, the useful pattern is to model phases such as planning, implementation, testing and review, then restrict tools according to the current state. A coding agent might be allowed to inspect files during planning, edit during implementation, run tests in a verification phase and avoid destructive commands unless explicitly permitted. That fits the direction of Claude Code, Codex, Cursor and MCP-style tool use, where the safety problem is less about text generation and more about actions.

Statewright is still a young project, so teams should treat benchmark and reliability claims carefully until they reproduce them in their own repositories. It may require workflow modeling effort before the benefits are obvious, and overly rigid state machines can slow down exploratory development. Even so, the concept is timely: as coding agents become more autonomous, phase-aware tool permissions are a practical way to reduce accidental damage and make agent behavior easier to reason about.

Pricing

Public site and GitHub project are available; commercial terms and long-term licensing should be verified before making procurement claims.

Platforms

State-machine guardrail project for AI coding agents and MCP-oriented workflows, with a public site and GitHub repository.

Categories

Tags

Use Cases

Alternatives

Guardrails AI logo

Guardrails AI

Validate and structure LLM outputs with composable Guards

Guardrails AI is an open-source Python and JavaScript framework for validating and structuring LLM outputs using composable Guards built from a Hub of pre-built validators. It handles structured data extraction with Pydantic models, content safety checks including toxicity, PII detection, competitor mentions, and bias filtering, plus automatic re-prompting when validation fails. The Guardrails Hub offers dozens of validators from regex matching to hallucination detection via LLM judges.

free
NVIDIA logo

NeMo Guardrails

Programmable safety rails for LLM applications

NeMo Guardrails is NVIDIA's open-source toolkit for adding programmable safety rails to LLM applications. It supports five guardrail types — input, dialog, retrieval, execution, and output rails — covering content safety, jailbreak detection, topic control, PII masking, hallucination detection, and fact-checking. The toolkit uses Colang, a domain-specific language for defining conversational constraints, and integrates with OpenAI, Azure, Anthropic, HuggingFace, and LangChain/LangGraph.

free
Claude Code logo

Claude Code

Top Pick

Anthropic's agentic coding CLI

Anthropic's agentic CLI coding tool that delegates complex tasks to Claude directly from the terminal. Understands entire codebases via automatic context gathering, edits multiple files, runs shell commands, and manages Git workflows autonomously. Supports CLAUDE.md for persistent project instructions, integrates with VS Code and JetBrains, and uses Claude Opus/Sonnet with extended thinking for complex architectural decisions. Built for terminal-first developers.

paid
Cursor logo

Cursor

Top Pick

The AI-first code editor

AI-first code editor built as a VS Code fork that deeply integrates LLMs into every part of the development workflow. Features Tab autocomplete with multi-line predictions, Cmd+K inline editing, AI chat with full codebase awareness, and Agent mode for autonomous multi-file edits with terminal execution. Supports GPT-4, Claude, and more with automatic context from project files and docs. Includes privacy mode for SOC 2 compliance. The leading AI-native IDE with 100K+ paying users.

freemiumTelemetry

Related Tools

Grok logo

Grok Build

Top Pick

xAI's terminal coding agent with parallel subagents and worktree-aware automation

Grok Build is xAI's terminal-first coding agent for planning, editing, testing, and reviewing code from a local CLI. The early beta exposes subagent controls, worktree mode, headless JSON output, best-of-N parallel attempts, sandbox profiles, and experimental memory. It fits developers comparing Claude Code, Codex, and Gemini CLI for local agentic workflows with deeper parallel execution.

paid
Jean logo

Jean

Top Pick

AI agent dev environment with parallel git worktrees, magic git commands, and Linear integration.

Jean is an open-source desktop dev environment for AI agents from coolLabs (the team behind Coolify). It runs multiple coding agents — Claude Code, Codex, and others — in parallel inside isolated git worktrees, each with its own chat session and terminal. Magic git commands handle commits, PR descriptions, code reviews, and merge conflicts with AI assistance, while built-in Linear and GitHub integrations load issue context into every session.

Open Source
Factory Droid logo

Factory Droid

Top Pick

Enterprise-grade AI coding agent system by Factory

System of specialized AI Droids — Code, Knowledge, Reliability, and Product — each optimized for specific development tasks. Ranked #1 on Terminal-Bench with 58.75% score. BYOK model with support for Anthropic and OpenAI models. Enterprise-focused approach that treats AI coding as a team of specialized agents rather than a single general-purpose assistant.

paid
OpenCode logo

OpenCode

Top Pick

Open-source AI coding agent for the terminal

Open-source terminal-based AI coding agent built in Go by the SST team, with a rich TUI (Bubble Tea) supporting 75+ model providers including OpenAI, Anthropic, Gemini, Bedrock, Groq, and OpenRouter. Features vim-like editing, persistent SQLite sessions, and LSP integration for 40+ languages. Fully free with no vendor lock-in, it has rapidly grown to 95k+ GitHub stars.

Open Source
Amp logo

Amp

Top Pick

Agentic coding tool by Sourcegraph (formerly Cody)

Frontier coding agent from Sourcegraph that runs in the terminal and as IDE extensions for VS Code, Cursor, Windsurf, and JetBrains. Amp wields the strongest available models — Claude, GPT, and Gemini frontier tiers — with no token caps or context window throttling. Built around full-fidelity tool use, multi-file edits, oracle-style planning subagents, and team-shared threads. Token-based pricing with no subscription tier; pay only for the model usage you trigger.

api-usage-based
Mitosis logo

Mitosis

Write components once and compile them into native code for multiple frameworks

Mitosis is Builder.io-backed open-source infrastructure for writing a component once and compiling it into native framework components for React, Vue, Angular, Svelte, Qwik, Solid, React Native, and other targets. It supports cross-framework design systems and Figma-to-code synchronization, but is distinct from the Builder.io visual builder product.

Open Source