Guardrails

Create and manage runtime guardrails and review what they caught.

Guardrails enforce runtime safety policies — cost ceilings, loop breakers, and tool-pattern rules that can halt an agent action before it runs. The guardrails commands manage those policies from the terminal.

List guardrails

retrace guardrails list
retrace guardrails list --json

Create a guardrail

retrace guardrails create \
  --name "Cost Cap" \
  --type cost_budget \
  --action halt \
  --threshold 1.0

Review triggers

See where guardrails fired recently:

retrace guardrails triggers --limit 10

Next steps

  • Traces — inspect runs that a guardrail stopped.
  • Configuration — set defaults for output and project.

On this page