# Automatic agent protection

> Configure automatic freezes, review why an agent was stopped, and restore access safely

- Human URL: https://conto.finance/docs/guides/auto-freeze
- Raw Markdown: https://conto.finance/docs/guides/auto-freeze.md
- Terminal view: https://conto.finance/ai/docs/guides/auto-freeze

Documentation group: Spending controls

Automatic protection freezes an agent and its wallets when its payment activity crosses a
threshold. It is off for new agents. While it is off, a crossed threshold creates a dashboard alert
and the agent keeps paying. A frozen agent cannot start new payments until a team member restores
it.

Use it as a backstop alongside payment policies and approval rules. Policies decide whether each
payment is allowed. Automatic protection can stop the agent when a pattern of activity needs review.

## Protection settings

Read the current settings with `GET /api/agents/{id}/freeze-config`. A new agent returns
`"enabled": false`:

```json
{
  "enabled": false,
  "thresholds": {
    "maxConsecutivePolicyViolations": 5,
    "maxConsecutivePaymentFailures": 5,
    "spendVelocityMultiplier": 3,
    "largePaymentMultiplier": 10,
    "minimumTrustScore": 0.2,
    "trustScoreDropThreshold": 0.3,
    "maxNewCounterpartiesPerHour": 10
  }
}
```

| Threshold                        | What it controls                                                                                                        |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `maxConsecutivePolicyViolations` | Consecutive policy-denied payments that trigger protection                                                              |
| `maxConsecutivePaymentFailures`  | Consecutive failed payments that trigger protection                                                                     |
| `spendVelocityMultiplier`        | How far recent payment activity may rise above the agent's established rate                                             |
| `largePaymentMultiplier`         | How large one payment may be relative to the agent's established payment size                                           |
| `minimumTrustScore`              | Lowest acceptable average counterparty trust score, from `0` to `1`                                                     |
| `trustScoreDropThreshold`        | Largest acceptable drop in average counterparty trust within 24 hours, as a fraction of the earlier score (`0.3` = 30%) |
| `maxNewCounterpartiesPerHour`    | Number of different recipients, new or known, the agent may pay within one hour                                         |

The large-payment check needs 10 confirmed payments of history, and the velocity check ignores
hours with less than $50 of spend. The velocity check counts the agent's confirmed wallet payments,
its card purchases, and its [checkout](https://conto.finance/docs/guides/checkout-checkpoints) purchases together, and runs
after each wallet payment, each connected-card purchase, and each new checkout. A checkout counts
while its spend is held and after it is paid. Test card purchases are not counted. Consecutive failures and policy violations protect a new agent
from its first payment.

## Update settings

Send only the values you want to change. Omitted values keep their current setting. Set
`"enabled": true` to turn protection on.

```bash
curl -X PATCH https://conto.finance/api/agents/AGENT_ID/freeze-config \
  -H "Authorization: Bearer $CONTO_ORG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "thresholds": {
      "maxConsecutivePolicyViolations": 3,
      "maxConsecutivePaymentFailures": 3,
      "maxNewCounterpartiesPerHour": 5
    }
  }'
```

The API key needs the `agents:write` scope. The dashboard has no control for these settings. The
agent's **Overview** tab shows freeze history.

## Freeze or restore an agent manually

`reason` is optional and appears in the freeze history.

```bash
curl -X POST https://conto.finance/api/agents/AGENT_ID/freeze \
  -H "Authorization: Bearer $CONTO_ORG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Reviewing an unexpected supplier payment",
    "freezeWallets": true
  }'
```

```bash
curl -X POST https://conto.finance/api/agents/AGENT_ID/unfreeze \
  -H "Authorization: Bearer $CONTO_ORG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Supplier details verified",
    "unfreezeWallets": true
  }'
```

## When an owner loses access

Every active agent has an owner. When an owner loses access to the organization, Conto freezes each
active agent they own, whether or not automatic protection is on. The agent's history shows
"Automatic protection" with the reason that its owner lost access. Its wallets are not frozen.

To restore the agent, assign it a new owner on its page, then restore it. Restoring an agent whose
owner was removed or whose account is suspended returns `409` with code `OWNER_REQUIRED`.

## Stop all agent spending

An owner can freeze every active agent in the organization at once from **Budgets**. Only an owner
in a signed-in session can do this. API keys and agent keys are refused.

- New payments and card requests are refused until an owner resumes. An agent created during the
  stop starts frozen, and no agent can be unfrozen or activated.
- **Resume spending** restores only the agents the stop froze. An agent frozen for another reason
  stays frozen, and so does an agent with no active owner.
- Conto raises one alert for the organization and sends no `agent.frozen` webhooks. Issued cards are
  paused at their provider.
- One-time card numbers already issued can't be recalled, and transactions already sent can't be
  undone. A purchase already in flight can still complete, and an agent holding its own wallet key
  or card number can still pay outside Conto.

## Review status history

Use `GET /api/agents/{id}/freeze-history` to reconcile when and why access changed:

```json
{
  "items": [
    {
      "id": "freeze_01JZ...",
      "action": "FROZEN",
      "actionLabel": "Frozen",
      "source": "AUTOMATIC_PROTECTION",
      "sourceLabel": "Automatic protection",
      "reason": "Several payments failed in succession.",
      "occurredAt": "2026-07-15T18:24:00.000Z"
    }
  ],
  "total": 1,
  "limit": 20,
  "offset": 0
}
```

Use each event `id` as a stable reconciliation or support reference. Automatic events include a
plain-language reason. Team actions include the optional `reason` supplied with the freeze or
restore request.
