# Agents in Workspace

`GET` `/v1/ai/workspaces/{workspace_id}/agents`

List the Agents in the specified Workspace. The returned `uid` is the Agent identifier used in the [Start Conversation](/docs/ai/chat/conversation) endpoint path; only Agents with `is_published` set to `true` can start conversations.

## Parameters

### Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | Yes | Workspace ID |

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer | No | Page number, starts at 1, default 1 |
| `limit` | integer | No | Page size, default 20 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/ai/workspaces/<workspace_id>/agents' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `agents` | object[] | Yes | Agent list |
| `└ uid` | string | Yes | Agent UID, used as the path parameter of [Start Conversation](/docs/ai/chat/conversation) |
| `└ name` | string | Yes | Agent name |
| `└ description` | string | No | Agent description |
| `└ mode` | string | Yes | Agent mode, e.g. `chat` |
| `└ icon` | string | No | Icon URL |
| `└ is_published` | boolean | Yes | Whether published; only published Agents can start conversations |
| `└ published_at` | int64 | No | Publish time, Unix timestamp in seconds; 0 if unpublished |
| `└ created_at` | int64 | No | Creation time, Unix timestamp in seconds |
| `└ updated_at` | int64 | No | Last updated time, Unix timestamp in seconds |
| `total` | int32 | Yes | Total number of matching Agents |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "agents": [
      {
        "uid": "ag_7d3f9b2c",
        "name": "US Stock Analyst",
        "description": "Answers US stock questions with market and fundamental data",
        "mode": "chat",
        "icon": "https://cdn.longbridge.com/icons/agent.png",
        "is_published": true,
        "published_at": 1742000000,
        "created_at": 1741000000,
        "updated_at": 1742001000
      }
    ],
    "total": 12
  }
}
```
