Policy Engine (Cage Rules)
The Policy Engine lets you define rules that govern what agents can and cannot do inside sandboxes. Policies are enforced at the MCP tool layer, LLM proxy, file system, network, and command execution levels.How It Works
- You define policies with rules — each rule targets a scope (tool, file, command, network, llm) and specifies an action (allow, deny, audit, pause)
- When an agent attempts an operation, the engine evaluates all active policies
- The first
denyorpauserule that matches blocks the operation immediately auditrules log a cage_break event but don’t block
Policy Inheritance
Policies support a three-level hierarchy:- Org-level policies apply to all sandboxes in the account
- Team-level policies apply to a specific team
- Project-level policies apply to a specific project
Built-in Templates
Apply production-ready templates with a single command:YAML Configuration
Add policies to your.caged.yaml:
API
CLI
Content Scanning
The engine includes built-in content scanners for LLM traffic:PII Detection
Detects: email addresses, SSNs, credit card numbers, phone numbers, IP addresses, API keys, AWS secrets, private keys.Prompt Injection Detection
12 heuristic signals with weighted scoring. Blocks content scoring above 0.7 threshold.Dashboard
Manage policies from the web dashboard at/dashboard/policies:
- View all active policies with level, priority, and rule counts
- Apply templates with one click
- Enable/disable policies