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

# Agent Lifecycle

> Agent states, pausing, and the emergency stop

An agent is always in one of three states:

| State      | Can transact?                     | Reversible? | API key |
| ---------- | --------------------------------- | ----------- | ------- |
| `active`   | Yes, within policy                | —           | Active  |
| `paused`   | No — every payment is auto-denied | Yes         | Kept    |
| `archived` | No — terminal                     | **No**      | Revoked |

## Pause and resume

Pausing is the everyday stop: one click (or `POST /v1/agents/:id/pause`), takes effect immediately, and is fully reversible. While paused, the policy engine denies every transaction, but the agent keeps its API key and configuration — resume (`POST /v1/agents/:id/resume`) puts it right back to work.

Pausing is deliberately friction-free: no re-authentication required, because it only ever *reduces* what the agent can do.

## Archive

Archiving (`DELETE /v1/agents/:id`) is the terminal state: the agent's API key is revoked and its wallet policy is detached. Archived agents cannot be reactivated. Archiving requires step-up authentication.

## The emergency stop

For a suspected-compromise scenario, the hard stop is **pause + revoke the API key**:

```bash theme={null}
POST   /v1/agents/:id/pause    # stop all spending immediately
DELETE /v1/agents/:id/key      # cut the agent's access entirely
```

This halts everything while staying reversible — investigate, then either resume with a freshly minted key (`POST /v1/agents/:id/key`) or archive.

## API keys

* Each agent has **at most one active key** at a time.
* Keys are shown **once** at creation, then stored only as a hash — copy it immediately.
* Keys don't expire on a schedule; revocation is the kill mechanism, and it propagates within seconds.
* Minting and revoking keys requires step-up authentication. Pausing does not touch the key.
