Skip to content

These endpoints manage workspace entries (projects) tracked by the server, and bind or unbind containers to a workspace.

Get a paginated list of all workspaces (projects) known to the server.

NameInTypeRequiredDescription
pagequeryintegerNoPage number (1-indexed). Default: 1
limitqueryintegerNoItems per page (max 200). Default: 50
{
"items": [
{
"id": "global",
"worktree": "/home/user/projects/global",
"vcs": "git",
"name": "Global",
"icon": {
"url": "https://example.com/icon.png",
"override": "G",
"color": "#6366f1"
},
"commands": {
"start": "npm install"
},
"time": {
"created": 1700000000000,
"updated": 1700000001000,
"initialized": 1700000000500
},
"branches": [],
"workspace": null,
"panels": null,
"programs": null
}
],
"meta": {
"page": 1,
"limit": 50,
"total": 1,
"pages": 1
}
}
const { items, meta } = await client.agent.workspace.workspacesList({
page: 1,
limit: 50,
});

Retrieve detailed information about a specific workspace by its project ID.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace ID (24-char lowercase hex)
{
"id": "507f1f77bcf86cd799439011",
"worktree": "/home/user/projects/hoody",
"vcs": "git",
"name": "Hoody",
"icon": {
"url": "https://example.com/icon.png",
"override": "H",
"color": "#22c55e"
},
"commands": {
"start": "pnpm install"
},
"time": {
"created": 1700000000000,
"updated": 1700000001000,
"initialized": 1700000000500
},
"branches": [],
"workspace": null,
"panels": null,
"programs": null
}
const workspace = await client.agent.workspace.workspacesGet({
workspaceID: "507f1f77bcf86cd799439011",
});

Create a new workspace entry in workspace-state.

This endpoint takes no parameters.

FieldTypeRequiredDescription
worktreestringYesAbsolute path of the git worktree
namestringNoDisplay name for the workspace
colorstringNoHex or CSS color used to render the workspace chip
visiblebooleanNoWhether the workspace appears in the sidebar
containerobjectYesContainer binding configuration
{
"worktree": "/home/user/projects/hoody",
"name": "Hoody",
"color": "#22c55e",
"visible": true
}
{
"id": "507f1f77bcf86cd799439011"
}
const { id } = await client.agent.workspace.workspacesCreate({
worktree: "/home/user/projects/hoody",
name: "Hoody",
});

Update workspace properties such as name, icon, and commands.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace ID (24-char lowercase hex)
FieldTypeRequiredDescription
namestringNoNew display name for the workspace
iconobjectNoIcon override (url, override, color)
commandsobjectNoWorkspace commands (start is a startup script for new worktrees)
{
"name": "Hoody (renamed)",
"icon": {
"override": "H",
"color": "#0ea5e9"
},
"commands": {
"start": "pnpm install && pnpm dev"
}
}
{
"id": "507f1f77bcf86cd799439011",
"worktree": "/home/user/projects/hoody",
"vcs": "git",
"name": "Hoody (renamed)",
"icon": {
"url": "",
"override": "H",
"color": "#0ea5e9"
},
"commands": {
"start": "pnpm install && pnpm dev"
},
"time": {
"created": 1700000000000,
"updated": 1700000002000,
"initialized": 1700000000500
},
"branches": []
}
const updated = await client.agent.workspace.workspacesUpdate({
workspaceID: "507f1f77bcf86cd799439011",
name: "Hoody (renamed)",
});

Remove a workspace entry from workspace-state.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace ID (24-char lowercase hex)
{
"ok": true
}
await client.agent.workspace.workspacesDelete({
workspaceID: "507f1f77bcf86cd799439011",
});

These endpoints attach a running container to a workspace entry, and remove the attachment.

POST /api/v1/workspaces/{workspaceID}/container

Section titled “POST /api/v1/workspaces/{workspaceID}/container”

Set the container binding for a workspace entry.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace ID (24-char lowercase hex)
FieldTypeRequiredDescription
containerIdstringYesIdentifier of the container to bind
projectIdstringYesContainer’s project identifier
serverNodestringYesNode on which the container is running
{
"containerId": "c-8a1b2c3d4e5f",
"projectId": "p-001",
"serverNode": "node-eu-west-1"
}
{
"ok": true
}
await client.agent.workspace.bind({
workspaceID: "507f1f77bcf86cd799439011",
containerId: "c-8a1b2c3d4e5f",
projectId: "p-001",
serverNode: "node-eu-west-1",
});

DELETE /api/v1/workspaces/{workspaceID}/container

Section titled “DELETE /api/v1/workspaces/{workspaceID}/container”

Remove the container binding from a workspace entry.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace ID (24-char lowercase hex)
{
"ok": true
}
await client.agent.workspace.unbind({
workspaceID: "507f1f77bcf86cd799439011",
});