---
docId: doc_ae56869783d441c4a107a3c823875ab3
title: List agents
description: "Lists workspace agents, their states and their draft and published versions."
api:
  group: agentes
  auth: bearer
  operations:
    - operationId: listAgents
      method: GET
      path: '/v1/agents'
      postmanName: List agents
---

<script>
  import { Ways } from '$lib/components';
</script>

# List agents

Find a workspace agent and use its `id` to read or edit it. The list shows newest agents first and indicates which have unpublished changes.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/agents?limit=20" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.agents.list();
```

</Ways.Way>
</Ways>

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `limit` | integer | Agents per page, from 1 to 100. Defaults to `20` | - |
| `pageToken` | string | The `nextPageToken` from the previous page | - |
| `workspace` | string | Only if the credential has access to several workspaces | - |

## Response

```json
{
  "status": "success",
  "data": [
    {
      "id": "Xq8mTe2LwP4kZ1aB9cDf",
      "name": "Sales",
      "imageUrl": "/images/agents/avatars/p12.jpg",
      "status": "active",
      "owners": ["ana@acme.com"],
      "draft": { "versionId": "v4", "number": 4 },
      "publication": { "versionId": "v3", "number": 3 },
      "hasUnpublishedChanges": true,
      "createdAt": "2026-10-28T12:00:00.000Z"
    }
  ],
  "nextPageToken": null
}
```

## Response fields

| Field | Description |
|-------|-------------|
| `data` | Agents on this page, each with the fields from [Get an agent](/api-reference/agents/get#response-fields) |
| `nextPageToken` | Token for the next page. `null` when there are no more |

## Notes

- To read the next page, repeat the request with `pageToken` set to the `nextPageToken` you received. See [Pagination](/api-reference/pagination).
- A page can contain fewer than `limit` agents and still have a next page. Keep reading while `nextPageToken` is not `null`. The SDK’s `platic.agents.iterate()` handles this automatically.
- Deleted agents don't appear.
