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

# Agents

> Autonomous actors that spend on behalf of customers

# Agents

An **Agent** is an autonomous actor (AI or automation) that spends on behalf of a customer. Agents can be assigned cards and must declare intents before making purchases.

## Creating an Agent

```bash theme={"system"}
curl -X POST https://api.useproxy.ai/v1/agents \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "cust_xxx",
    "externalId": "my-agent-123",
    "name": "Shopping Agent"
  }'
```

## Agent Fields

| Field        | Type   | Description                          |
| ------------ | ------ | ------------------------------------ |
| `customerId` | string | The customer this agent belongs to   |
| `externalId` | string | Your unique identifier for the agent |
| `name`       | string | Human-readable name                  |
| `status`     | string | `active` or `suspended`              |

## Agent Status

| Status      | Description                                |
| ----------- | ------------------------------------------ |
| `active`    | Agent can access cards and make purchases  |
| `suspended` | Agent is temporarily blocked from spending |

## Policy Overrides

Agents can have policy overrides that take precedence over customer defaults:

```json theme={"system"}
{
  "policy": {
    "requireIntent": true,
    "limits": {
      "perAuth": 5000
    },
    "blockedMccs": ["7995"]
  }
}
```

## Suspend an Agent

```bash theme={"system"}
curl -X POST https://api.useproxy.ai/v1/agents/agent_xxx/suspend \
  -H "Authorization: Bearer your_api_key"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Cards" icon="credit-card" href="/concepts/cards">
    Issue cards to agents
  </Card>

  <Card title="Intents" icon="bullseye" href="/concepts/intents">
    Declare purchase intents
  </Card>
</CardGroup>
