Stage0

Policy Templates

Pre-built policy templates for common AI agent scenarios. Copy them, customize them, and align them to your own runtime before production rollout.

Quick Start Templates

Start quickly with ready-to-use configurations, then tune thresholds to match the actual risk of each workflow.

Loop guard templates on this page match the current backend schema: max_iterations, timeout, same_tool, no_repeat_calls, max_cost_usd. These checks can read runtime counters from context or derive the same state server-side from a stable run_id.

Basic Safety

Essential protections for any AI agent

max_iterations: 20
max_cost_usd: 5.00
require_approval_for: [delete, write]

Production Ready

Comprehensive guards for production deployments

max_iterations: 10
max_cost_usd: 1.00
no_pii_in_output: true
require_approval_for: [delete, drop, truncate]
audit_all_requests: true
rate_limit: 100/hour

Development

Relaxed policies for development and testing

max_iterations: 50
max_cost_usd: 10.00
warn_only: true
log_all_decisions: true

Templates by Category

Cost Control

Budget Guard

Prevent runaway costs by setting spending limits per request or session.

Best for: Any agent making paid API calls
max_cost_usd: 1.00
warn_at_percent: 80
block_at_percent: 100

Token Limiter

Limit token usage to prevent expensive model calls.

Best for: LLM-powered applications
max_tokens: 4000
max_output_tokens: 1000
model_whitelist: [gpt-3.5-turbo, claude-instant]

Security

PII Protection

Detect and block requests that would expose personally identifiable information.

Best for: Customer-facing AI tools
no_pii_in_output: true
detect_patterns: [email, phone, ssn, credit_card]
redact_or_block: block

Data Exfiltration Block

Prevent bulk data extraction and suspicious export patterns.

Best for: Database-connected agents
max_records_per_request: 100
block_bulk_export: true
audit_all_exports: true

Safety

Destructive Action Gate

Require approval for any destructive or irreversible operations.

Best for: Admin panels, DevOps tools
require_approval_for: [delete, drop, truncate]
approval_timeout_seconds: 300
min_approvers: 1

Content Policy

Enforce content guidelines for AI-generated outputs.

Best for: AI content generation
content_policy: standard
block_categories: [hate, violence, self_harm, sexual]
require_human_review_for: sensitive_topics

Performance

Loop Prevention

Use the current loop-guard schema to defer runaway iterations, repeated tool calls, timeout overruns, and cumulative cost spikes.

Best for: Agent orchestration, agentic workflows
max_iterations: 10
timeout: 60s
same_tool: 3x
no_repeat_calls: true
max_cost_usd: 0.50

Rate Limiter

Control request frequency to protect downstream services.

Best for: API-intensive applications
requests_per_minute: 60
burst_limit: 10
cooldown_seconds: 60

Using These Templates

1

Choose a template

Pick the template that matches the risk profile of your use case.

2

Customize values

Adjust thresholds, approvals, and limits to fit your own runtime and operating rules.

3

Deploy carefully

Add constraints to your `/check` requests. For loop guards, either send runtime counters in `context` or keep the same `run_id` across checks so the backend can persist state.