---
title: pydo.genai.list_agents_by_workspace()
description: List agents by Workspace
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/genai/list_agents_by_workspace/
last_updated: "2026-10-01"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.genai.list_agents_by_workspace()

Generated on 1 Oct 2026 from `pydo` version [`v0.43.0`](https://github.com/digitalocean/pydo/releases/tag/v0.43.0v0.43.0)

## Usage

```python
client.genai.list_agents_by_workspace(
    workspace_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
    only_deployed=None,
    page=None,
    per_page=None,
)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To list all agents by a Workspace, send a GET request to [`/v2/gen-ai/workspaces/{workspace_uuid}/agents`](https://docs.digitalocean.com/reference/api/reference/agent-platform-api/index.html.md#genai_list_agents_by_workspace).

## Parameters

`workspace_uuid` string required

Workspace UUID.

`only_deployed` boolean optional

Only list agents that are deployed.

`page` integer optional

Page number.

`per_page` integer optional

Items per page.

## Pagination

This method returns paginated results. The response includes a `links.pages` object with URLs for navigating between pages. To retrieve the next page, parse the `next` URL and pass the `page` parameter:

```python
from urllib.parse import urlparse, parse_qs

resp = client.genai.list_agents_by_workspace(workspace_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", )
pages = resp.get("links", {}).get("pages", {})

while "next" in pages:
    parsed = urlparse(pages["next"])
    page = int(parse_qs(parsed.query)["page"][0])
    resp = client.genai.list_agents_by_workspace(workspace_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", page=page)
    pages = resp.get("links", {}).get("pages", {})
```

## Response Example

## Show Response Example

```json
{
  "agents": [
    {
      "api_key_infos": [],
      "api_keys": [],
      "chatbot_identifiers": [],
      "child_agents": [],
      "conversation_logs_enabled": true,
      "created_at": "2023-01-01T00:00:00Z",
      "description": "example string",
      "functions": [],
      "guardrails": [],
      "if_case": "example string",
      "instruction": "example string",
      "k": 123,
      "knowledge_bases": [],
      "max_tokens": 123,
      "mcp_servers": [],
      "name": "example name",
      "parent_agents": [],
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "provide_citations": true,
      "reasoning_effort": "example string",
      "region": "example string",
      "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
      "route_created_at": "2023-01-01T00:00:00Z",
      "route_created_by": "12345",
      "route_name": "example name",
      "route_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "tags": [
        "example string"
      ],
      "temperature": 123,
      "thinking_token_budget": 123,
      "top_p": 123,
      "updated_at": "2023-01-01T00:00:00Z",
      "url": "example string",
      "user_id": "12345",
      "uuid": "123e4567-e89b-12d3-a456-426614174000",
      "version_hash": "example string",
      "vpc_egress_ips": [
        "example string"
      ],
      "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
      "web_fetch_enabled": true,
      "web_search_enabled": true
    }
  ],
  "links": {
    "pages": {
      "first": "example string",
      "last": "example string",
      "next": "example string",
      "previous": "example string"
    }
  },
  "meta": {
    "page": 123,
    "pages": 123,
    "total": 123
  }
}
```

## More Information

See [`/v2/gen-ai/workspaces/{workspace_uuid}/agents`](https://docs.digitalocean.com/reference/api/reference/agent-platform-api/index.html.md#genai_list_agents_by_workspace) in the API reference for additional detail on responses, headers, parameters, and more.