---
title: pydo.genai.create_workspace()
description: Create a Workspace
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/genai/create_workspace/
last_updated: "2026-08-03"
---

> **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.create_workspace()

Generated on 3 Aug 2026 from `pydo` version [`v0.40.0`](https://github.com/digitalocean/pydo/releases/tag/v0.40.0v0.40.0)

## Usage

```python
client.genai.create_workspace(
    body={
        "agent_uuids": [...],
        "description": "example string",
        "name": "example name",
    },
)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To create a new workspace, send a POST request to [`/v2/gen-ai/workspaces`](https://docs.digitalocean.com/reference/api/reference/gradientai-platform/index.html.md#genai_create_workspace). The response body contains a JSON object with the newly created workspace object.

## Parameters

`agent_uuids` array of strings optional

Example: `['example string']`

Ids of the agents(s) to attach to the workspace

`description` string optional

Example: `example string`

Description of the workspace

`name` string optional

Example: `example name`

Name of the workspace

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "agent_uuids": [
    "example string"
  ],
  "description": "example string",
  "name": "example name"
}

resp = client.genai.create_workspace(body=req)
```

## Response Example

## Show Response Example

```json
{
  "workspace": {
    "agents": [],
    "created_at": "2023-01-01T00:00:00Z",
    "created_by": "12345",
    "created_by_email": "example@example.com",
    "deleted_at": "2023-01-01T00:00:00Z",
    "description": "example string",
    "evaluation_test_cases": [],
    "name": "example name",
    "updated_at": "2023-01-01T00:00:00Z",
    "uuid": "123e4567-e89b-12d3-a456-426614174000"
  }
}
```

## More Information

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