# List AI agents

> The AI agents of a workspace.

Source: https://docs.mycrmsim.com/docs/ai-agents/list-ai-agents

```http
GET https://backend.mysmsgateway.app/api/v1/ext/ai-agents
```

- Category: myCRMSIM AI Agents / AI Agents
- Auth: Bearer access token
- Scope: `ai_agents.read`

Each agent comes with its whole configuration (`config_metadata`). Agents are per workspace.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | query | number | yes | A workspace of the installer. Example: `7` |
| `status` | query | enum | no | Default all. One of: `draft`, `active`, `paused`. |
| `search` | query | string | no | Matches the agent name. |
| `page` | query | number | no | Default 1. Example: `1` |
| `limit` | query | number | no | 1–100, default 25. Anything else is a 400. Example: `25` |

## Response fields (ai_agent)

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Agent id. |
| `name` | string | Agent name. |
| `role` | string | What the agent is for — its job, in a sentence or two. |
| `persona` | string | Who it speaks as, and how. |
| `status` | string | `draft`, `active` (answering) or `paused`. |
| `workspace_id` | string | The workspace it works in. |
| `config_metadata` | object | The whole configuration: model, tone, opening messages, follow-ups, qualifying questions, FAQs, goal and calendar. See Create AI agent. |
| `created_at` | string (ISO 8601) | Created. |
| `updated_at` | string (ISO 8601) | Last saved. |

## Response 200

OK

```json
{
  "success": true,
  "data": [
    {
      "id": "a3f1c2d4-5b6e-4f70-8a91-b2c3d4e5f607",
      "name": "Revive",
      "role": "Reactivate old leads for Harbour Dental and book them in for a check-up.",
      "persona": "Sam, a friendly front-desk assistant at Harbour Dental. Short, warm messages.",
      "status": "draft",
      "workspace_id": "7",
      "config_metadata": {
        "model": "gpt-4.1-mini",
        "tone": "Friendly",
        "ghl_tag": "revive-2026",
        "company_info": "Harbour Dental, Sydney. Check-ups, cleaning, whitening.",
        "initial_messages": [
          "Hi {{contact.first_name}}, it's Sam from Harbour Dental. It's been a while — would you like to book a check-up?"
        ],
        "followUps": [
          {
            "text": "Just checking in, {{contact.first_name}} — any time suit you this week?",
            "delay": {
              "days": 2,
              "hours": 0,
              "minutes": 0
            }
          }
        ],
        "qualification_enabled": true,
        "questions": [
          {
            "id": "q1",
            "text": "Is it a check-up or something hurting?"
          }
        ],
        "faqs": [
          {
            "question": "Do you take insurance?",
            "answer": "Yes, all major funds."
          }
        ],
        "config": {
          "end_goal": "Book Appointment",
          "calendar_provider": "native",
          "calendar_id": "12",
          "calendar_ids": [
            "12"
          ],
          "disqualify_trigger": "Not interested or moved away"
        }
      },
      "created_at": "2026-10-28T09:00:00.000Z",
      "updated_at": "2026-10-28T09:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "max_limit": 100,
    "total": 1,
    "total_pages": 1
  }
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): ai_agents.read. This integration was granted: …"
}
```

## Response 404

workspace_id does not exist or is not the installer's (same response for both)

```json
{
  "success": false,
  "message": "Workspace not found or not accessible to this token"
}
```

## Response 502

The AI service could not be reached

```json
{
  "success": false,
  "message": "The AI service could not be reached. Try again later."
}
```
