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

# Policies

> Enforce guardrails on every transaction.

# Policies

## View

```bash theme={null}
agenta sub policies get
```

## Set

```bash theme={null}
agenta sub policies set --file policy.json
agenta sub policies set --json '{"rules":[{"action":"accept","criteria":[{"type":"dailyLimitUsd","maxUsd":500}]}]}'
```

## Policy format

```json theme={null}
{
  "rules": [
    {
      "action": "accept",
      "criteria": [
        { "type": "dailyLimitUsd", "maxUsd": 500 },
        { "type": "maxPerTxUsd", "maxUsd": 100 }
      ]
    }
  ]
}
```

## Criteria types

| Type                     | Fields                                  |
| ------------------------ | --------------------------------------- |
| `maxPerTxUsd`            | `maxUsd`                                |
| `dailyLimitUsd`          | `maxUsd`                                |
| `monthlyLimitUsd`        | `maxUsd`                                |
| `rateLimit`              | `maxPerHour`                            |
| `timeWindow`             | `startHour`, `endHour`                  |
| `evmAddress`             | `operator` (`in`/`not_in`), `addresses` |
| `evmNetwork`             | `chainIds`                              |
| `blockInfiniteApprovals` | .                                       |

## Pause / Resume

```bash theme={null}
agenta sub pause     # block all signing
agenta sub resume    # re-enable
```

## Audit log

```bash theme={null}
agenta sub audit
agenta sub audit --limit 50
```
