# Agent approvals

An agent connected over MCP can read your work, draft notes and plan
attacks. Starting traffic against a target is a different kind of step,
so by default it waits for you.

## What asks

When an agent starts a **scan** or an **Intruder attack**, Phantom first
applies the usual checks: the vault scope, the engagement rules (active
testing, dates, windows, the daily budget) and the agent quotas. If all
of them pass, the agent is told to wait (`approval_required`, with the
id of the request) and the request appears in **Settings > Privacy >
Agent approvals** and in your notifications.

A request names the agent token, the operation and the host. Asking
again for the same thing while it waits does not add another request.

Single requests (a Repeater send, a replay) do not ask: they stay under
the scope, the engagement rules and the agent quotas. External report
submission is never done by an agent at all; handing a report off is
yours, as described in [Programs](./programs.md).

## Deciding

- **Approve once** lets that agent start that operation against that
  host one time, within an hour. The next start asks again.
- **Deny** closes the request; a new attempt makes a new one.
- A request nobody decides lapses after a day.

Only you decide. An agent that tries to approve its own request, or to
change the setting, is refused. Every request has the same actions on
right click.

## Turning it off

Choose **Let agents start** to let agents start scans and attacks
within the scope, the engagement rules and their quotas without asking.
Your own scans and attacks never ask either way.

## REST

| Route | Body | Returns |
|---|---|---|
| `GET /agent-approvals/mode` | | `{mode}`: `ask` or `allowed` |
| `PUT /agent-approvals/mode` | `{mode}` | the mode (user only) |
| `GET /agent-approvals?status=pending` | | requests, newest first |
| `POST /agent-approvals/{id}/decision` | `{approve}` | the request (user only; `409` once decided) |
