// guardrails

Runtime guardrails that halt runaway agents

Set limits on cost, loops, context size, and latency. While your agent runs, Retrace watches every step and sends a HALT the moment a limit is crossed, so a runaway loop or budget blow-out stops at the limit instead of running up your bill.

Start freeRead the docs →

Policy types

Cost budgets, loop detection, context-overflow limits, and latency caps, defined per project and switched on or off as you need them.

HALT in real time

Each running agent is watched step by step; when a policy is violated the agent receives a HALT immediately, instead of burning more budget.

Accurate accounting

Cost, tokens, step counts, and errors are accumulated reliably even when many steps arrive at once, so guardrails fire exactly when they should, not late.

Loop detection

Repeated identical tool calls, runaway step counts, and 'spinning' with no progress are caught and reported as a single, clear finding.

Trigger history

Every fired guardrail is recorded so you can audit what stopped, when, and why.

Plan-aware limits

Active guardrail counts scale with your plan, from a few on Free to unlimited on higher tiers.

terminal
retrace guardrails create --name "Cost Cap" --type cost_budget --action halt --threshold 1.0
retrace guardrails list --json
retrace guardrails triggers --limit 10

Create a cost cap, then review what it caught.

REST API

More of the platform