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

# Error Responses

> Standard error format and common error codes.

All errors return a consistent JSON structure:

```json theme={null}
{
  "error": {
    "code": "AGENT_NOT_FOUND",
    "message": "The requested agent does not exist or is not accessible",
    "request_id": "req_01HX..."
  }
}
```

## Common error codes

| Code                       | HTTP Status | What it means                                  |
| -------------------------- | ----------- | ---------------------------------------------- |
| `AUTH_INVALID_CREDENTIALS` | 401         | Wrong `client_id` or `client_secret`           |
| `AUTH_AGENT_REVOKED`       | 401         | Agent has been permanently revoked             |
| `AUTH_AGENT_SUSPENDED`     | 403         | Agent is suspended                             |
| `POLICY_SCOPE_DENIED`      | 403         | Policy doesn't allow the requested scope       |
| `AGENT_NOT_FOUND`          | 404         | Agent doesn't exist in your workspace          |
| `POLICY_NOT_FOUND`         | 404         | Policy doesn't exist                           |
| `VALIDATION_ERROR`         | 400         | Request body failed validation                 |
| `RATE_LIMIT_EXCEEDED`      | 429         | Too many requests — check `Retry-After` header |

## Request IDs

Every response includes an `X-Request-ID` header. Include this in any support request.
