Object model
How they relate: a binding points a
(surface, target) pair at one guardrail. The guardrail holds the cascade, and each rule in it references the gates and hooks it dispatches.
Enforcement surfaces
Applies to is a two-way choice — Agent or Gateway. There is no option to target both.
Binding resolution on the agent surface tries the specific agent’s binding first, then falls back to the tenant default agent binding. The gateway surface resolves a single tenant-wide binding — there is no per-client or per-connection gateway granularity.
ctx.untrusted_content is not available on the Gateway surface. The untrusted-content score comes from the judge, which runs inside a C1AI session; there is no equivalent for an external client. A gateway rule written against ctx.untrusted_content will not behave as intended.Guardrail fields
Guardrail rule fields
Only hooks and tool gates with Managed by guardrails enabled are selectable in the hook and gate pickers, and each picker only offers hooks whose event matches it.
Audit records identify a matched rule by its ID, not its name. Renaming a rule doesn’t change what earlier records point at — but it also means a rule’s name isn’t what you search on when tracing a decision.
Actions
Modes
CEL variables
Levels are
LOW, MEDIUM, and HIGH, ordered — they compare as 0, 1, and 2 respectively, so >= works as you’d expect and the numeric form is equivalent.
Examples:
A rule whose CEL expression fails to evaluate is skipped, and the cascade continues to the next rule. It does not abort evaluation and does not deny the call — so a catch-all rule lower in the cascade still fires. This is the opposite of hook filter behavior, where a failed filter denies the call.
Evaluation order on a tool call
- Resolve the binding for the surface, and walk the guardrail’s rules top to bottom, first match wins.
- If the matched rule’s action is Block → deny. Gates and hooks never run.
- Otherwise run tool gates: the gates the rule selected, plus every gate with Managed by guardrails off. Only the first matching gate runs. A gate that requests approval or denies short-circuits here — hooks and the tool never run.
- Run pre-tool hooks: those the rule selected, plus every pre-tool hook with Managed by guardrails off. A denial blocks the call.
- The tool executes.
- Run post-tool hooks, same union rule. A denial blocks the result from reaching the caller.
Pre-output hooks
Pre-output hooks run when a chunk of the assistant’s generated response is about to be delivered. No tool call is involved, and the stage differs from the tool-call stages in four ways that each have a distinct failure mode.It is a separate cascade walk with an eligibility test
The cascade is walked again for the outgoing response, but a rule is only eligible to win if both of these hold:- its action is Evaluate hooks, and
- its Pre-output hooks list is non-empty.
- A Block-action rule can never win on this path. It curates no hook lists, so it is structurally excluded — a Block rule does not block outgoing responses.
- An Evaluate hooks rule that curates only tool gates or pre/post-tool hooks is also skipped here, so a later rule can win the response even though the earlier rule won the tool call.
Only two built-in patterns run here
Block output and Link filter. Every other built-in pattern is restricted to the tool-call events, and C1 rejects an incompatible event when you save the hook.The filter variables are different, and one name is a trap
ctx.tool_name is unset here.
A Block output hook with no surfaces is inert
An empty surface list means no surface at all, not all of them. Select Slack, Web, or both, or the hook never fires. See Tool call hooks.Tool gate fields
Only the first matching gate runs
A rule can select several tool gates, but they are not all applied. The gates are evaluated in order and the first one whose filter matches wins — its grant policy is the one that decides the call, and no further gate is consulted. The order is:- Enabled gates first
- Then ascending Priority (lower first)
- Then oldest first
Gate filter variables
A tool gate filter is evaluated against a different variable set than a guardrail rule — it sees the call’s identity and target rather than the risk axes:ctx.tool_kind and ctx.caller_kind are separate vocabularies — the values are not interchangeable:
Both fall back to
unspecified for a value C1 doesn’t recognize, so a filter written as an equality test against a specific kind won’t match an unrecognized one.
The in-product helper text on the filter field mentions only
ctx.tool_name and ctx.tool_input — the two you’ll use most. The rest are available.The untrusted content judge
There is no model selection, threshold, or per-agent judge configuration.
Constraints
Troubleshooting
My guardrail isn’t doing anything
Check, in order:- Is it bound? An unbound guardrail is evaluated on zero calls. Check Default C1AI Guardrail policy (agent) or Default C1 Gateway Guardrail policy (gateway), and any per-agent override that might be shadowing the default.
- Does the surface match? An Agent guardrail won’t appear in the gateway selector, and vice versa.
- Are the rules in Observe? Observe logs and falls through by design.
- Are the rules Disabled? An unset mode behaves as disabled.
- Is an earlier rule matching first? A broad rule above a narrow one makes the narrow one unreachable.
A rule that reads ctx.untrusted_content never matches
Either the guardrail is bound to the Gateway surface, where that variable isn’t available, or the untrusted content judge is turned off, which pins the value to low risk.
A hook or tool gate I created isn’t selectable in a rule
Its Managed by guardrails toggle is off. Turn it on from the hook or gate form, or from the toggle column in the table.A hook fires even though no rule selects it
That’s the documented behavior for Managed by guardrails off: the hook always evaluates. Turn the toggle on to bring it under rule control.Calls are being denied and I can’t tell which layer did it
Distinguish the three denial shapes:- A Block-action rule denies with your configured Deny reason.
- A tool gate doesn’t deny — it pauses the call behind an approval request. A denial only follows if the request is denied.
- A hook denies with its own reason, or fail-closed because it errored, timed out, or its filter failed to evaluate. Check the recorded hook status:
ERROR,TIMEOUT, andFILTER_ERRORmean the hook is broken, not that it matched.