Skip to main content

Policy Categories & Templates

Waxell ships with 26 policy categories and pre-built templates. Categories define what kind of governance you want. Templates provide ready-to-use configurations you can enable with one click.

Policy Categories

Every policy belongs to a category that determines how it's evaluated and what controls it exposes.

Operational Guardrails

CategoryWhat it controlsActions
Rate LimitRequest rates and concurrency limits per agent, user, or teamwarn, throttle, block
CostToken and dollar budgets (per-run, daily, monthly)warn, block
SchedulingAllowed operation hours and days (e.g., business hours only)warn, skip, block
SafetyStep limits, tool call limits, execution depthwarn, block
Kill SwitchEmergency stop based on error rates or anomaly thresholdsblock
AuditAudit logging behavior, retention periods, detail levelsallow
OperationsTimeouts, retry limits, concurrency settingswarn, block
ControlWebhook notifications, execution control, alertingallow
LLMModel allowlists/blocklists, provider restrictionswarn, block
QualityOutput quality thresholds, stability checkswarn, block
ContentInput/output scanning for PII, credentials, and injection patternswarn, redact, block

Data & Security Boundaries

CategoryWhat it controlsActions
Data AccessWhich data sources agents can read/write, record limitswarn, block
NetworkOutbound domain allowlists/blocklists, protocol restrictionswarn, block
ScopeBlast radius limits -- max records modified, files changed, transaction amountswarn, block
Code ExecutionAllowed languages, paths, commands, sandbox requirementswarn, block
Input ValidationInbound data schema validation, size limits, sanitizationwarn, block

Cognitive Governance

CategoryWhat it controlsActions
GroundingSource grounding requirements, citation minimums, abstention thresholdswarn, block
RetrievalVector/RAG quality governance -- relevance scores, source age, diversitywarn, block
ReasoningDecision explainability, bias detection, logical consistencywarn, block

Agent Action Control

CategoryWhat it controlsActions
ApprovalHuman-in-the-loop gates for high-stakes actions, cost thresholdsblock
DelegationMulti-agent trust -- delegation depth, allowed delegates, policy inheritancewarn, block
CommunicationOutput channel governance -- allowed channels, recipient restrictionswarn, block

Trust, Privacy & Compliance

CategoryWhat it controlsActions
PrivacyData minimization, retention policies, consent requirements, residencywarn, block
IdentityAI disclosure requirements, impersonation preventionwarn, block
MemorySession isolation, cross-session memory, retention limits, forbidden typeswarn, block
ComplianceRegulatory profile validation (HIPAA, SOC 2, PCI-DSS) -- verifies required policies are activewarn, block
Context ManagementConversation length, context window utilization, message count, session durationwarn, block

Policy Actions

When a policy evaluates, it returns one of these actions:

ActionEffect
allowExecution proceeds normally
warnExecution proceeds, warning recorded in trace
redactSensitive content masked with ##TYPE## placeholders, execution proceeds
throttleExecution delayed (rate-limited)
blockExecution stopped, PolicyViolationError raised
skipExecution skipped silently (no error raised)
retryExecution retried with backoff

Policies are evaluated in priority order. The first blocking result stops evaluation. Warnings and redactions accumulate across all matching policies.

Pre-Built Templates

Templates are ready-to-use policy configurations. Create a policy from a template in the dashboard or via the API -- no configuration needed for sensible defaults.

General Templates

These apply to all agents by default:

TemplateCategoryDefault Configuration
Default Budget PolicyCostDaily token and cost limits with warn thresholds
Standard Rate LimitRate LimitRequests per minute/hour per agent
Business Hours OnlySchedulingMon-Fri, 9am-5pm PT
Standard Safety PolicySafetymax_steps: 100, max_tool_calls: 50
Error Rate Kill SwitchKill Switch20% error threshold over 5-minute window
Full Audit LoggingAudit90-day retention, full detail
PII ProtectionContentDetects SSN, email, phone, credit card
Prompt Injection GuardContentBlocks "ignore previous instructions" patterns
Credential Leak PreventionContentDetects API keys, secrets, AWS keys, tokens
LLM Model AllowlistLLMRestrict to approved models only
Webhook NotificationsControlSend events to your webhook URL
Standard TimeoutOperations300-second execution timeout
Output Quality CheckQualityMinimum quality thresholds

Data & Security Templates

TemplateCategoryDefault Configuration
Read-Only Data AccessData AccessAll sources read-only, block writes
Restricted Data AccessData AccessBlock HR/payroll/financial sources by default
Internal Only NetworkNetworkBlock external domains, internal only
Domain AllowlistNetworkExplicit list of approved external services
Read-Only ScopeScopeZero deletes, zero writes, require rollback
Limited Write ScopeScopeMax 100 records, 10 files, $1000 transactions
Claude Code SandboxCode ExecutionSandbox required, block dangerous commands, restrict filesystem
Restricted Code ExecutionCode ExecutionPython only, workspace paths, 30s limit
Strict Input ValidationInput ValidationSchema required, 100KB max, reject empty, sanitize HTML
Permissive InputInput ValidationWarn on large inputs, no schema required

Cognitive Governance Templates

TemplateCategoryDefault Configuration
Strict GroundingGroundingRequire sources, min 2 citations, block unsupported claims
RAG GroundingGroundingSource grounding required, factual consistency check
High-Quality RAGRetrievalMin 0.8 relevance, 90-day max age, source diversity
Strict RetrievalRetrievalBlock on low relevance, allowlisted collections only
Explainable DecisionsReasoningRequire explanations, alternatives considered, confidence scores
Fair Decision MakingReasoningBias detection enabled, protected attributes, block on bias

Agent Action Templates

TemplateCategoryDefault Configuration
High-Stakes Approval GateApprovalRequire approval for financial, delete, and external comms
Cost Approval GateApprovalRequire approval when estimated cost > $10
Strict DelegationDelegationMax depth 2, inherit policies, require approval
Open DelegationDelegationNo depth limit, inherit policies, no approval needed
Internal Only CommunicationsCommunicationBlock email/Slack/SMS, allow internal API and DB only
Governed External CommsCommunicationAllow email to company domain, require disclaimer

Trust, Privacy & Compliance Templates

TemplateCategoryDefault Configuration
GDPR BasicsPrivacyRequire consent, 30-day PII retention, EU residency
Data MinimizationPrivacyMinimization enabled, purpose limitation, short retention
AI Disclosure RequiredIdentityRequire disclosure footer, prevent impersonation
Ephemeral SessionsMemorySession isolation, purge on completion, no cross-session memory
Governed MemoryMemoryAllow memory with retention limits and type restrictions
HIPAA ProfileComplianceRequires audit, content, privacy, data-access with health settings
SOC 2 ProfileComplianceRequires audit, safety, kill, operations with enterprise settings

Claude Code Templates

Purpose-built policies for teams using Claude Code with Waxell governance:

TemplateCategoryDefault Configuration
Session BudgetCostPer-session token/cost limits
Daily BudgetCostHard daily limit (blocks, not warns)
Model RestrictionLLMSonnet + Haiku only (no Opus)
Business HoursSchedulingMon-Fri, 8am-8pm ET
Kill SwitchKill SwitchError rate + anomaly detection
Full AuditAuditSOC 2 / ISO 27001 compliant logging
Rate LimitRate LimitPer-user request throttling
Secret ScanningContentAPI keys, credentials, PII in prompts
Webhook NotificationsControlReal-time event streaming

Creating Policies from Templates

Via Dashboard

  1. Navigate to Governance > Policies
  2. Click New Policy
  3. Select a template -- configuration is pre-filled
  4. Adjust scope (which agents, users, or teams it applies to)
  5. Enable

Via API

# List available templates
curl -H "Authorization: Bearer $TOKEN" \
https://acme.waxell.dev/waxell/v1/policy-templates/

# List categories
curl -H "Authorization: Bearer $TOKEN" \
https://acme.waxell.dev/waxell/v1/policy-categories/

Via Platform Assistant

Ask the assistant to create a policy:

"Create a rate limit policy for my support-bot agent, max 100 requests per hour"

The assistant renders an interactive policy card you can review and confirm before it's created. See Platform Assistant for details.

Policy Scoping

Every policy can be scoped to specific targets. Scopes are combined with AND logic -- a policy scoped to agent support-bot AND user group enterprise only applies to enterprise users running support-bot.

ScopeWhat it filters
agentsAgent names
agent_idsSpecific agent UUIDs
usersUser IDs
user_groupsUser group names
teamsTeam names
workflowsWorkflow names
toolsTool names
modelsLLM model names

Unscoped policies (no filters) apply globally to all executions.

Enforcement Points

Policies are checked at three points during execution:

  1. Pre-execution -- Before the agent runs. Blocks prevent the run from starting.
  2. Mid-execution -- During the run (if mid_execution_governance=True). Checked on each record_step() call.
  3. Post-execution -- After the run completes. Records violations for analytics.
import waxell_observe as waxell

waxell.init()

@waxell.observe(
agent_name="support-bot",
enforce_policy=True, # Pre-execution check
mid_execution_governance=True, # Mid-execution checks
)
async def handle_query(query: str) -> str:
# Policies checked before this runs
response = await call_llm(query)

# Each step triggers a mid-execution policy check
waxell.step("process", output={"status": "done"})

return response

Next Steps