Policy & Guardrails

Policy, PII, and safety guardrails that check every request and response inside the runtime, tested before they go live.

Testing the HIPAA Clinical Trials Guardrail: a prompt with an SSN and email is blocked before it reaches the model
20M+
Requests and responses screened
99.7%
Guardrail compliance
1M+
Sensitive entities masked or blocked
Demo

Create, Share, and Test a Guardrail

Build a HIPAA guardrail in the wizard, share it with your team, then see what it catches.

Runtime Guardrails

Checks run inside the runtime on every request and response.

Mask or Block per Entity

Replace each entity with a placeholder or refuse the turn, separately for requests and responses.

Test Before It Goes Live

Run a prompt through a draft policy and see every rule that fired.

Version History

Drafts, published versions, and a record of who changed what.

Authoring

Describe the Policy, Review the Diff

Write the rule in a sentence. Changes are staged for you to review before they take effect, and every published policy is a version with history.

You said
"Block prompt injection hard, and don't let it discuss medical advice."
Staged proposal
+Content filter · prompt attack  NONE ──▶ HIGH
+Denied topic · Medical advice  added, in BLOCK / out BLOCK
Definition  "Advice about diagnosis, treatment or medication."
Examples   "Can I take aspirin with this?" +2 more
Review changesPublish versionStaged, not yet in effect
Sensitive information

Block or Mask, per Entity

Thirty-plus standard entity types, plus your own patterns. Each is set separately for requests and responses.

Entity typeActionRequestsResponses
US_SOCIAL_SECURITY_NUMBERMask✓✓
PHONEMask✓✓
EMAILMask✓✓
NAMEMask✓✓
MRN (custom) ^MRN-\d{8}$Mask—✓
API-KEY (custom) ^sk-[A-Za-z0-9]{32}Block✓✓
Preview under these settings
Schedule a follow-up for {NAME}, record MRN-20418833, SSN {US_SOCIAL_SECURITY_NUMBER}, reachable at {EMAIL}, or {PHONE}.
Requests. MRN is masked in responses only, so a typed record number passes here. A message containing an API key is refused, and the user sees your blocked message.
Test bench

See What Fired Before It Goes Live

Every detection comes back with the rule that fired, its confidence, the action taken, and the text it matched.

209 ms
Processing time
49 / 49
Characters checked
2
Entities flagged
Detect Mode

Set a denied topic to detect instead of block, and the test shows what it found without refusing the turn. For example, flag every mention of a side effect for your safety team while the assistant keeps answering. Detect mode is available for denied topics. Content filters always block.

The Test Guardrail result: SSN and email blocked, 209 ms processing time, 49 of 49 characters checked
Reach

Write It Once, Arm It Everywhere

Attach a policy to one agent or to every conversation in the workspace, then share it with your team.

1

Attach to Agents

Turn on a policy for one agent or for every conversation in the workspace.

2

Share with Your Team

Each person gets their own copy in their account, kept in step with yours.

The guardrails list: seven policies, including the HIPAA Clinical Trials Guardrail, and where each one applies
The HIPAA Clinical Trials Guardrail with a tooltip on its Share button
Your guardrails
How it works

From Policy to Production

PII, safety, and prompt-injection guardrail library
Actions set per direction on every rule
Custom blocked-message text per direction
Standard entity types plus custom patterns
Draft, publish, and version history per policy
AI-assisted policy authoring with staged changes

Frequently Asked Questions

Common questions about Policy & Guardrails.

Where do guardrails actually run?+
Inside the ThinkStack runtime, on every request and every response. Five policy types are available: content filters, denied topics, word filters, sensitive information, and grounding. Each is set separately for requests and responses, except grounding, which checks responses against what the agent retrieved.
Can we choose between blocking and masking?+
Yes, per entity type and per direction. More than 30 standard entity types are supported, plus custom patterns for identifiers only your organization uses. Each can be masked with a placeholder or can block the turn, and requests and responses are set separately, so a record number a user types can pass on the way in and still be masked on the way out.
How do we know a policy works before it goes live?+
Run real prompts through the draft policy. ThinkStack returns the verdict and every rule that fired, with its confidence, the action taken, and the text it matched, before the policy is published. Changes are staged as proposals you review before they take effect.
What do users see when a guardrail stops a turn?+
The message you wrote for that case, set separately for requests and responses. In agent conversations, the guardrail step also appears in the conversation, so it's clear a policy acted. Every change to the policy itself is kept in its version history.
Can one policy cover the whole workspace?+
Yes. A policy can be applied to a single agent or to every conversation in the workspace. Share it and each person gets their own copy that stays in step with yours, so a central rule doesn't have to be rebuilt per team. Every published policy is a version with history.
Can we run a guardrail without it blocking anything?+
Yes, for denied topics. Set a denied topic to detect instead of block, and it reports what it found without refusing the turn, so you can see what it would catch before you enforce it. Content filters always block.
What does it take to put a policy into production?+
Three steps. Describe the rule and review the staged changes. Test it on real prompts before it goes live. Then publish a version and apply it to one agent or to every conversation in the workspace, with actions set per direction and per entity type.