Back to components

AI Interfaces

Guardrail Policy Card

A safety policy summary showing enforcement mode, recent events, and enabled controls.

guardrailssafetypolicy

Installation

Copy and paste the code into your project.

Accessibility notes

Every policy exposes its name, event count, enforcement mode, and textual enabled state.

Guardrails

Production policy

Active
  • Sensitive data

    3 events this week

    Block
  • Unsafe content

    0 events this week

    Block
  • Off-topic requests

    12 events this week

    Review

Preview accent

TypeScript
const policies = [{ name: "Sensitive data", mode: "Block", events: 3 }, { name: "Unsafe content", mode: "Block", events: 0 }, { name: "Off-topic requests", mode: "Review", events: 12 }];

export function GuardrailPolicyCard() {
  return <section className="w-full max-w-sm rounded-xl border border-white/12 bg-[#0b0f14]/92 p-4 shadow-2xl">
    <header className="flex items-start justify-between gap-4"><div><p className="text-xs font-semibold uppercase tracking-[0.18em] text-[#fb923c]">Guardrails</p><h3 className="mt-1 text-base font-bold text-white">Production policy</h3></div><span className="rounded-full bg-[#40E0D0]/10 px-2.5 py-1 text-[0.65rem] font-bold text-[#d8fffb]">Active</span></header>
    <ul className="mt-4 divide-y divide-white/8 rounded-lg border border-white/9 bg-white/[0.025]">{policies.map((policy) => <li key={policy.name} className="grid grid-cols-[1fr_auto_auto] items-center gap-3 px-3 py-3"><div><p className="text-xs font-semibold text-slate-200">{policy.name}</p><p className="mt-1 text-[0.65rem] text-slate-500">{policy.events} events this week</p></div><span className="rounded-md bg-white/[0.06] px-2 py-1 text-[0.65rem] font-semibold text-slate-300">{policy.mode}</span><span className="h-2 w-2 rounded-full bg-[#40E0D0]" aria-label="Enabled" /></li>)}</ul>
    <button type="button" className="mt-3 w-full rounded-full border border-white/12 px-4 py-2.5 text-xs font-bold text-slate-200">Configure policies</button>
  </section>;
}
Usage
<GuardrailPolicyCard />

Related components

Policy trace

Guardrail decision

Review
  1. PII detection

    Redact

    Email address

  2. Allowed topics

    Pass

    Customer support

  3. Action scope

    Review

    Refund over $500

Final action requires approval because the refund exceeds the autonomous limit.

AI Interfaces

Guardrail Decision Trace

Advanced

An explainable policy trace showing which safeguards passed, transformed, or escalated an AI action.

guardrailspolicyaudit
View component

Budget circuit

Run spending limit

90% used
Model calls
$7.82
Tool calls
$1.14
Remaining
$1.04

Execution pauses automatically at the $10 limit.

AI Interfaces

Budget Circuit Breaker

Advanced

A live spending guard that pauses expensive AI runs before they cross a configured limit.

budgetcostsafety
View component

Human checkpoint

Approve release action?

The agent is paused before a high-impact step.

  • Publishes to production
  • Notifies 12 subscribers

Auto-cancels in 4:58

AI Interfaces

Human Checkpoint Card

Intermediate

A high-impact approval gate that explains consequences before an agent continues.

approvalagentsafety
View component