Skip to main content

Overview

Workspaces provide agents with an isolated sandbox file system. When an agent uses agent reasoning mode, it has access to built-in file tools (write, read, edit, grep, delete) that operate on workspace files.
Workspaces must be enabled for agents to use file tools, edit mode (chat_mode: 'edit'), and plan mode (chat_mode: 'plan'). When workspace is disabled, these tools are removed and chat mode falls back to ask.
Each workspace is scoped per-agent and per-user:
  • Authenticated users — each user gets their own workspace per agent
  • Anonymous users — each chat conversation gets an isolated workspace
Workspaces can also be published. A published workspace gives generated files or pages a public URL, and eligible plans can attach a custom domain.

Built-in File Tools

When an agent runs in agent reasoning mode, these tools are automatically available:
Tools marked “Conditional” require user approval before execution (configurable per agent). Tools marked “Auto” execute without approval.

write

Create a new file or overwrite an existing one:

read

Read a file’s content, optionally by line range:

edit

Apply an exact string replacement to a file:

grep

Search across workspace files using regex:

delete

Remove a file from the workspace (soft delete):

REST API

Manage workspaces and files programmatically. All endpoints require API key authentication.

List Workspaces

Response:

Create Workspace

Delete Workspace

The default workspace cannot be deleted.

List Files

Response:

Read File

Create File

Update File

Delete File

Rename/Move File

Publishing

Publish a workspace when the agent has created a deliverable that should be shared publicly, such as a page, report, prototype, or client-facing document.

Suggest Subdomain

Returns an available workspace subdomain and root domain.

Publish Workspace

Response:

Unpublish Workspace

A workspace with an attached custom domain must have the custom domain removed before it can be unpublished.

Custom Domains

Workspace custom domains require a plan that includes custom domains and a published workspace.

Add Custom Domain

The response includes the DNS target. The domain starts as pending until verification completes.

Domain Status

Refreshes and returns the custom domain verification status.

Domain Info

Returns the workspace subdomain URL, custom domain URL, DNS target, and custom domain status.

Remove Custom Domain

Next Steps

Chat API

Send messages and receive AI responses

API Reference

Complete API documentation