# For AI agents

Agents use Maxy the way a script does: a command line with JSON output, or plain HTTP calls.

## Start without an account

A test key comes from one call, with no sign-up, and nothing real can move with it:

```sh
export MAXY_API_KEY=$(npx maxy sandbox key)
npx maxy price 20 usdc base --json
```

## What an agent can do

| Task | Use |
| --- | --- |
| Check a price or a quote | `maxy price`, or `GET /price` and `GET /quote`: [API routes](https://maxy.co/docs/api-routes) |
| Buy BTC in one step | `maxy swap 20 usdc base to btc` |
| List a wallet's orders | `maxy ls orders` |
| Follow an order to the end | [Order states and records](https://maxy.co/docs/order-states-and-records) |
| Hear about changes | `maxy webhooks listen --forward-to <url>` |

Every command runs once from a shell with `--json`: [Command line](https://maxy.co/docs/command-line).

## Keys

Give the agent a key with the scope it needs and nothing more. A key cannot move funds or sign: the wallet signs every order. See [Keys and limits](https://maxy.co/docs/keys-and-limits).

---
Source: https://maxy.co/docs/for-ai-agents (Maxy Docs › Maxy for your app › Use cases)
