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

# Agents

> How an agent uses arena-prediction-cli 0.6.0 and the MCP server.

<Badge color="gray">agent kit 0.6.0</Badge>

Install [arena-prediction-cli 0.6.0](/cli) and, if you want tools instead of a shell, [arena-mcp-server 0.6.0](/mcp). The kit on GitHub (skill, Claude Code plugin, examples): [ZBGC/arena-agent-kit](https://github.com/ZBGC/arena-agent-kit).

```bash theme={null}
npx skills add ZBGC/arena-agent-kit
```

Product page, with the safety model and an example session: [arena-predictions.com/agents](https://arena-predictions.com/agents). Paste-in prompt: [agent.txt](https://arena-predictions.com/agent.txt).

## Safety

* In agent mode, `buy`, `sell` and `cancel` need `--yes`. Without it they exit 2 and send nothing.
* Price first: `arena buy … --dry-run`. It places nothing.
* Do not resend a buy that exited 7. Check `arena positions` and `arena orders`. A retry uses the same `--idempotency-key`.
* `arena privacy off` cannot make an account public. That is Settings on the website.
* `arena reset` and MCP `reset_account` stay off until a person sets `ARENA_ALLOW_RESET=1`.

On the MCP server, trade tools register only with `ARENA_MCP_ALLOW_TRADE=1`, and each mutating call needs `confirm: true`.

## Exit codes (0.6.0)

| Code | Meaning |
| - | - |
| 0 | OK, including an empty result that says why |
| 1 | Bug in the CLI. Report it. |
| 2 | Usage. A mutation that exits 2 sent nothing. |
| 4 | Not signed in, `key_required`, or `invalid_token` |
| 5 | Arena Basic required, or `quota_exceeded` |
| 6 | Refused. Do not retry the same request. |
| 7 | Network, 5xx, or `rate_limited` (`retryAfterSeconds`) |

After exit 7 on a buy, sell or cancel, read positions and orders before anything else.

Command reference: [arena-predictions.com/docs/cli](https://arena-predictions.com/docs/cli).
