# Set boundaries for what your agents can do.

**Status:** Live beta. Guardrails is part of CtrlB AI Observability. Agent tracing, Self-Improving Agents, Evals and Guardrails are all in live beta. Examples on the page use sample data from one scenario: a refund agent whose payment tool times out after the refund already completed, so the agent tries again.

Check tool calls before they run. Block repeats, ask for approval, or redact sensitive results. Every decision gets a record.

## How Guard works

Guard runs in the request path, inside your framework's tool hook: Claude Code hooks, OpenAI Agents SDK, LangChain, Google ADK and FastMCP. It checks a tool call before it executes (`pre_tool`) and handles the result after it returns (`post_tool`). Decisions are allow, deny, ask a human, or rewrite.

## Rule categories

| Category | Checked |
|----------|---------|
| Tool allow lists | pre_tool |
| Sensitive data and PII | pre_tool arguments, post_tool results (rewrite) |
| Repeated calls and loops | pre_tool, within one session |
| Argument-keyed time windows | pre_tool, across sessions |
| Finding-linked action rules | pre_tool |

## From a finding to an active rule

A finding is reviewed, a condition and scope are defined, the rule is replayed against the frozen case set, and an authorized user selects Apply Guard rule. The new version, its scope, actor and activation time are recorded, and later decisions link back to the finding and its trend.

## Metadata

- **Canonical HTML**: https://ctrlb.ai/ai-observability/guardrails
- **Last updated**: 2026-11-04

## FAQ

### Where are policies enforced?

In the request path, inside your framework's tool hook. Guard checks a tool call before it executes and handles the result after it returns. It works with Claude Code hooks, the OpenAI Agents SDK, LangChain, Google ADK and FastMCP.

### How are policies configured?

Choose a rule type, condition and scope, then select Apply Guard rule. For time windows, also choose the argument key and duration. Each activation creates a version you can review or roll back.

### How much latency does a check add?

Guard runs in the request path, so every check adds time to the tool call. How much depends on the rules in scope. Measure it on your own workload during the beta.

### How is data handled?

Rewrite rules can redact sensitive data from a tool result before the agent reads it. Decision records are written to your lake, next to the agent trace.

### How do Guardrails relate to Evals?

Before you apply a rule, Guard replays the frozen case set's captured calls through it and compares the decisions with the expected outcomes. After you apply it, the finding's trend shows what happened next.

## Related

- [AI Observability](https://ctrlb.ai/ai-observability): See agent runs alongside your application telemetry.
- [Self-Improving Agents](https://ctrlb.ai/ai-observability/self-improving-agents): Turn production failures into rules and pull requests.
- [Evals](https://ctrlb.ai/ai-observability/evaluations): Turn real failures into test cases. Compare versions.

## Links

- [Book a demo](https://ctrlb.ai/contact?source=demo-guardrails)
- [AI Observability pricing](https://ctrlb.ai/ai-observability#pricing)
- [Documentation](https://docs.ctrlb.ai/)