Policy Control Loop
- Agent identity
- Principal identity
- Tenant
- Environment
- Capability risk
- Input arguments
- Output
- Runtime metadata
- Application-specific policy data
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Brane gives AI agents policy control by evaluating Python policies before and after capability execution.
Capability + AgentAction + PolicyContext -> Policy -> Decision
@runtime.before_capability("refund_customer")
def refund_limit(ctx):
if ctx.arg("amount_usd", 0) > 100:
return Decision(type="deny", reason="Refund exceeds tenant limit")
return Decision(type="allow")
@runtime.after_capability("call_model")
def block_secret_leak(ctx):
if "SECRET_KEY" in str(ctx.output or ""):
return Decision(type="deny", reason="Possible secret in output")
return Decision(type="allow")
| Category | Example policy |
|---|---|
| Financial control | Deny refunds above a tenant limit |
| Data control | Allow only SELECT queries |
| Tenant control | Block cross-tenant actions |
| Environment control | Block high-risk capabilities in prod |
| Tool control | Deny destructive tools without approval |
| Output control | Deny responses containing secrets or PII |
Was this page helpful?
