StackMap
Subscribe

Guardrails vs statewright

NVIDIA's programmable guardrails for LLM apps: input, output, dialog and retrieval rails defined in Colang, wrapping any model or LangChain runnable. — versus — State-machine guardrails for AI agents: define workflow phases once and only that phase's tools unlock — enforced across Claude Code, Codex, Cursor, opencode and Pi. Rust.

The curated verdict

Both constrain what a model may do, at different layers: NeMo rails conversational I/O in Colang; statewright gates tool access by workflow phase for coding agents.

Guardrailsstatewright
Stars6.9k452
Forks79819
LanguagePythonRust
LicenseNOASSERTIONNOASSERTION
Last activity2 days ago13 days ago
Topicssecuritycoding, orchestration
Curated connections62

Guardrails — the curator's take

For when policy needs to be programmable, not a blocklist: topic bans, jailbreak checks, tool-use constraints and dialog flows written in Colang, enforced as input/output/dialog/retrieval rails around any LLM — RunnableRails drops it straight into a LangChain pipeline. NOT free at runtime: every rail is extra LLM calls and latency, Colang is its own language to learn, and rails mitigate rather than guarantee — you still red-team the result (that's garak's job).

statewright — the curator's take

'Agents are suggestions, states are laws' — gating the TOOL space per phase is the right enforcement layer, and their small-model results (2/10 → 10/10 on a 5-task SWE-bench subset) suggest constraints can substitute for scale. When NOT: it's SaaS-keyed — sign-up required, NOASSERTION license; the enforcement client is open but the service isn't. The benchmark is 5 tasks, not 2294, and hard-blocked tools also block legitimate improvisation.