> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# policy • AI Agent SDK

> Exec Policy Engine for PraisonAI Agents.

# policy

<Badge color="blue">AI Agent</Badge>

Exec Policy Engine for PraisonAI Agents.

Provides policy-based execution control:

* Define rules for what agents can/cannot do
* Tool execution policies
* Resource access control
* Rate limiting and quotas

Zero Performance Impact:

* All imports are lazy loaded via **getattr**
* Policies only evaluated when enabled
* No overhead when no policies defined

Usage:
from praisonaiagents.policy import PolicyEngine, Policy, PolicyRule

# Create a policy engine

engine = PolicyEngine()

# Add a policy

policy = Policy(
name="no\_delete",
rules=\[
PolicyRule(
action="deny",
resource="tool:delete\_\*",
reason="Delete operations are not allowed"
)
]
)
engine.add\_policy(policy)

# Check if action is allowed

result = engine.check("tool:delete\_file", context=\{})

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import policy
```
