Live betaAgent Guardrails

Control what your agents can do.

Check tool calls before execution. Block prohibited actions, request human approval, and mask sensitive data before it reaches the agent.

Runtime policy checksIllustrative example
  1. Agentselects tool
  2. pre_toolCheck call Blocked
  3. Tool did not run
  4. post_toolCheck resultNot reached
  5. Agent receivesresultNothing received
export_customer_records(format="csv")The agent asks for a tool it is not permitted to use.Blocked

Tool did not run.

Rule
Tool not permitted for this agent
Decision
Blocked
Reason
export_customer_records is not on this agent's allowed tools.

A policy checks the call before execution. It can block the call or wait for approval. A second check masks sensitive fields before the agent receives the result.
Enforcement

Check the call before it runs.

Apply your policies to the tool and its arguments. Stop a prohibited call or pause it for approval.

Two checks around every tool callIllustrative example
Guard checks in your framework’s tool hook
Agent selects tool
pre_toolAllow, deny, ask or rewrite the call
Tool executes
post_toolRewrite the result, for example to redact PII
Agent reads the result
Works withClaude Code hooksOpenAI Agents SDKLangChainGoogle ADKFastMCP
guard decisions · refund-agent · sample data
pre_toolexport_customer_records(format="csv")Tool not permitted for this agentDeny
pre_toolissue_refund(amount=950.00)Refund exceeds the $500 example limit, so a person approvesAsk
post_toollookup_customer(customer_id="cust_001")email in the result, replaced with [REDACTED]Rewrite
pre_toolsearch_orders(customer_id="cust_001")No rule matchedAllow
Each decision is recorded alongside the agent trace.
Human approval

Pause actions that need a person.

Set rules for actions that require review. The tool waits for approval before it runs.

Approving one action does not activate a policy. Approving a policy is a separate step, covered below.

Refund approvalIllustrative example
Requested refund
$950
Example approval limit
$500
Status
Awaiting approval
  1. Refund requestedissue_refund(amount=950.00)
  2. Check: exceeds the $500 limitPolicy pauses the call
  3. Awaiting approvalA person reviews the request
  4. Tool has not runWaits for a decision

Tool has not run.

Illustrative policy. Your team sets the approval limit.
Results

Mask sensitive fields in tool results.

Check the result before the agent receives it. Replace sensitive fields with a redaction marker.

Tool resultIllustrative example
Source resultemail: customer@example.com
Mask email
Agent receivesemail: [REDACTED]

Agent receives the masked result.

Masking changes what the agent receives. It does not change the source system or earlier logs.
Evidence

See which policy matched and why.

Review the tool call, the matched rule, and the decision alongside the agent run.

decision record · refund-agent · sample data
Agent run
refund-agent, example run
Tool
export_customer_records
Rule
Tool not permitted for this agent
Decision
Blocked
Reason
export_customer_records is not on this agent's allowed tools.
Time
2 min ago
Each decision is recorded alongside the agent trace.
Policy decisions per daySample data
  • Blocked
  • Approval requested
  • Masked
Table view
Policy decisions per day: blocked, approval requested and masked, sample data
DayBlockedApproval requestedMasked
Nov 1025
Nov 2036
Nov 3024
Nov 4045
Nov 5037
Nov 6036
Nov 7 · Tool restriction rule active745
Nov 8936
Nov 9854
Nov 101047
Nov 11836
Nov 12745
Nov 13946
Nov 14836

Sample data: blocks begin on the day the rule is active. Approval requests and masked results come from separate rules, so the rule does not change them.

Configuration and operations

Test a policy before you activate it.

Compare the proposed rule with captured calls. Review the results, choose its scope, and activate the rule.

Policy-protected runIllustrative example
  1. Tool callexport_customer_records(format="csv"), requested by the agentBefore the tool runs
  2. MatchThe tool is not on this agent’s allowed listTool restrictions
  3. DecisionBlock the call and record why. The tool does not run.Deny
  4. RecordThe decision is linked to the agent run and its trace.Recorded
One rule, seven steps
  1. Finding reviewedYour team accepts the findingYour approval
  2. Condition definedSame order_id + amount within 10 minAutomatic
  3. Scope selectedrefund-agent, all sessionsYour approval
  4. Replay validatedCaptured calls from the test setAutomatic
  5. Apply Guard ruleActivates the proposed ruleYour approval
  6. Later call checkedIn the tool hook, before it runsAutomatic
  7. Decision recordedLinked to the run and the findingAutomatic
Action rule refund.repeat-windowProposed from a finding
Tool
issue_refund
Match on
order_id + amount
Window
10 min
Scope
refund-agent, all sessions
On match
Deny
Policy replay on captured calls
  • Repeat attempts, same order and amountDeny expected deny
  • Partial refunds, different amountAllow expected allow
  • Retry after the window closedAllow expected allow

No legitimate refunds in the case set would be denied.

Identifiers and versions Sample data
Finding
F-218
Rule version
refund.repeat-window v1
Test set
refund-timeouts v3
Preview with sample data
Version history refund.repeat-windowSample data
  1. CurrentActiveApplied from the finding by Platform on-call
  2. draftReplay passedProposed from the finding, validated on captured calls
Review a version, or roll back to the one before it. Each change gets its own version.
Repeated calls and time windows
Five calls · order 1042Illustrative example

Deny identical tool calls in the same session. A new session starts fresh.

  1. 0:00 Session A$180 refundFirst attemptAllow, first call
  2. 0:31 Session A$180 refundIdentical call, same sessionDeny
  3. 4:10 Session B$180 refundNew session, extra argumentAllow
  4. 6:02 Session C$40 partial refundPartial refund, different amountAllow
  5. 14:20 Session D$180 refundOutside the 10 min windowAllow

A matching attempt does not prove a payment completed. Check payment telemetry to see whether a refund went through.

Compare both scopes in a table
Five refund calls for order 1042Sample data
TimeCallSession-localArgument-keyed
0:00Session Aissue_refund(1042, 180.00)First attemptAllow, first callAllow, first call
0:31Session Aissue_refund(1042, 180.00)Identical call, same sessionDenyDeny
4:10Session Bissue_refund(1042, 180.00, note="retry")New session, extra argumentAllowDeny
6:02Session Cissue_refund(1042, 40.00)Partial refund, different amountAllowAllow
14:20Session Dissue_refund(1042, 180.00)Outside the 10 min windowAllowAllow
Runtime behavior
  • In the request pathGuardrails run in your framework's tool hook. Each check runs before the call executes or before the agent reads the result. Because checks run in the request path, each checked call takes longer by the time the check needs.
  • Versioned configurationEach Apply Guard rule creates a version with its scope, who applied it and when. Earlier versions stay for review and rollback.
  • Failure behavior per ruleWhat happens if a check cannot complete is part of each rule's configuration. You set it when you apply the rule.
Policies

Choose what to check.

Each policy type runs at a point in the tool hook and records what it decided.

AllowDenyAsk a personRewrite
  • Tool restrictionsWhich tools an agent may call
    Where
    pre_tool
    On a match
    Deny, or ask a person
    Recorded
    The rule and the blocked call
  • Approval rulesArguments above a limit, such as a refund amount
    Where
    pre_tool
    On a match
    Pause the call until a person approves
    Recorded
    The limit, the amount and the decision
  • Result maskingSensitive fields in tool results
    Where
    post_tool
    On a match
    Replace the field with a redaction marker
    Recorded
    The rule and the marker in the result
  • Repeated callsThe same tool and arguments within a time window
    Where
    pre_tool
    On a match
    Deny, or ask a person
    Recorded
    The matched call, the window and the earlier call
FAQ

Common questions

Where are policies enforced?

In the request path, inside your framework's tool hook. Guardrails check a tool call before it runs and the result after it returns. They work 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. Each activation creates a version you can review or roll back.

How much latency does a check add?

Checks run in the request path, so each one 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 fields in a tool result before the agent reads it. Decision records are written to your lake, next to the agent trace.

What does the session-local loop rule cover?

Repeated calls to the same tool with the same arguments inside one session. It stops an agent looping on an identical call.

How does the argument-keyed time window extend that?

Choose a key, such as a stable refund operation ID (refund_op_id), and a window. The rule catches matching attempts across sessions even when other arguments differ. A match shows repeated attempts, not a completed payment. Payment telemetry confirms whether the refund went through.

How are guardrails different from evaluations?

Evaluations test behavior against your criteria. Guardrails check actions and results during execution. Use evaluations to test a proposed rule before you activate it.

Live beta

Test a policy on your agent workflow.

See where the check runs and what the agent receives.

Live beta. From $499/month, plus usage.