# Policy Manager

The Policy Manager is where operators create, edit, and apply spending policies — the edicts that govern every vault in the fleet. Changes propagate to all attached vaults within one Solana slot (\~400ms).

Navigate here from the sidebar under **Policies**.

***

## Policy list

The policy list shows all policies in the organisation, including TherosAI presets. Each row shows:

* Policy name and ID
* Key parameters: `maxPerTx`, `maxPerDay`, `velocityCap`
* Number of vaults currently using this policy
* Last modified time
* A **preset** badge for TherosAI-managed policies (not editable)

***

## Creating a policy

Click **New Policy** to open the policy editor.

### Editor fields

| Field                     | Input type       | Notes                                                                                                         |
| ------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------- |
| Name                      | Text             | Required. Used in the dashboard and API responses.                                                            |
| Max per transaction       | Currency input   | Leave blank for no limit.                                                                                     |
| Max per day (rolling 24h) | Currency input   | Leave blank for no limit.                                                                                     |
| Max per month             | Currency input   | Leave blank for no limit.                                                                                     |
| Velocity cap              | Integer          | Max transactions per hour. Leave blank for no limit.                                                          |
| Allowed recipients        | Tag input        | Add Solana addresses or domain strings. Empty = any recipient allowed. Treasury opens only where you command. |
| Blocked categories        | Multi-select     | Select from the TherosAI category taxonomy.                                                                   |
| Require co-sign above     | Currency input   | Leave blank to disable co-signing.                                                                            |
| Expiry                    | Date/time picker | Leave blank for no expiry.                                                                                    |

Click **Create Policy** to save. The policy is immediately available to attach to wallets.

***

## Editing a policy

Click any policy name to open the editor in edit mode. All fields are editable on custom policies. TherosAI preset policies display a read-only view with a **Clone** button.

When you save changes:

* All vaults currently using this policy receive the updated rules immediately.
* The change is recorded in the policy audit log — permanent and tamper-evident.

***

## Audit log

Every policy has an audit log accessible from the policy detail view: **Policies → \[policy name] → Audit Log**.

Each entry shows:

* Timestamp
* Who made the change (user name and ID)
* Which fields changed (old value → new value)

The audit log is append-only and cannot be edited.

***

## Applying a policy to wallets

From the policy detail view, the **Attached Vaults** panel lists all vaults using this policy. You can:

* Search and add additional vaults to this policy
* Reassign individual vaults to a different policy

To apply a policy change to a large number of vaults at once, use `PATCH /v1/wallets` in the API with a `policyId` filter and batch update.

***

## Cloning a preset

TherosAI presets (`pol_conservative`, `pol_moderate`, `pol_permissive`, `pol_locked`) cannot be edited. To use them as a starting point:

1. Open the preset policy.
2. Click **Clone Policy**.
3. Name your clone and adjust parameters.
4. Save - the clone is now a fully editable custom policy.

***

## Deleting a policy

A policy can only be deleted when no vaults are attached to it. If vaults are attached, reassign them first.

Click **Delete Policy** from the policy detail view. Deletion is permanent — the policy is removed from the TherosAI system. Historical transactions that referenced this policy ID retain their association for audit purposes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.therosai.com/dashboard/policy-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
