Skip to main content
Workspaces group threads, provider configuration, skills, MCP policy, tasks, artifacts, and settings. Clients can list workspaces, create new ones, select the active workspace for a connection, persist the current workspace, and rename existing workspaces. Threads are the primary conversation container. A thread has a workspace, mode (Chat or Agent), model, model provider, optional name, sidebar visibility, and turn history.

Workspace Methods

MethodParamsResultPurpose
workspace/listWorkspaceListParamsWorkspaceListResponseReturn known workspaces.
workspace/defaultWorkspaceDefaultParamsWorkspaceDefaultResponseReturn or create the default workspace.
workspace/createWorkspaceCreateParamsWorkspaceCreateResponseCreate a workspace by caller-provided workspace_id.
workspace/selectWorkspaceSelectParamsWorkspaceSelectResponseSelect a workspace for the current connection and optionally make it current.
workspace/updateWorkspaceUpdateParamsWorkspaceUpdateResponseUpdate workspace metadata such as the display name.

Workspace Shape

FieldMeaning
idStable workspace id.
nameDisplay name.
is_activeWhether the workspace can be selected.
is_currentWhether the workspace is the persisted current workspace for the gateway.
created_at, updated_atUnix timestamps.

Listing Workspaces

{
  "jsonrpc": "2.0",
  "id": "aaaaaaaaaaaaaaaaaaaaa",
  "method": "workspace/list",
  "params": {}
}
Response:
{
  "workspaces": [
    {
      "id": "ws_000000000000000001",
      "name": "Default Workspace",
      "is_active": true,
      "is_current": true,
      "created_at": 1760000000,
      "updated_at": 1760000000
    }
  ]
}

workspace/default

Use this when a client needs a workspace id and wants the gateway to ensure the default workspace exists.
{
  "jsonrpc": "2.0",
  "id": "aaaaaaaaaaaaaaaaaaaaa",
  "method": "workspace/default",
  "params": {}
}
Response:
{
  "workspace": {
    "id": "ws_000000000000000001",
    "name": "Default Workspace",
    "is_active": true,
    "is_current": true,
    "created_at": 1760000000,
    "updated_at": 1760000000
  }
}

Creating A Workspace

The client generates the workspace_id. name is optional; if omitted, the gateway assigns a default display name. Set make_current when the new workspace should become the persisted current workspace.
{
  "jsonrpc": "2.0",
  "id": "bbbbbbbbbbbbbbbbbbbbb",
  "method": "workspace/create",
  "params": {
    "workspace_id": "ws_000000000000000002",
    "name": "Client A",
    "make_current": true
  }
}
Response:
{
  "workspace": {
    "id": "ws_000000000000000002",
    "name": "Client A",
    "is_active": true,
    "is_current": true,
    "created_at": 1760000100,
    "updated_at": 1760000100
  }
}

Selecting A Workspace

workspace/select associates the current WebSocket connection with a workspace. Set make_current when the selection should also be persisted as the gateway’s current workspace.
{
  "jsonrpc": "2.0",
  "id": "ccccccccccccccccccccc",
  "method": "workspace/select",
  "params": {
    "workspace_id": "ws_000000000000000002",
    "make_current": true
  }
}
After selecting a workspace, clients should reload workspace-scoped views such as the thread tree, providers, MCP servers, skills, tasks, and artifacts.

Updating A Workspace

Use workspace/update to rename a workspace.
{
  "jsonrpc": "2.0",
  "id": "ddddddddddddddddddddd",
  "method": "workspace/update",
  "params": {
    "workspace_id": "ws_000000000000000002",
    "name": "Client A Research"
  }
}

Workspace Notifications

The gateway sends workspace/changed when a workspace is created, updated, or when the current workspace changes. The notification payload has kind (created, updated, or current_changed) and workspace.

Thread Methods

MethodParamsResultPurpose
thread/startThreadStartParamsThreadStartResponseCreate a thread and subscribe the current connection to it.
thread/getThreadGetParamsThreadGetResponseLoad one thread.
thread/treeThreadTreeParamsThreadTreeResponseLoad workspace threads, folders, and placements.
thread/historyThreadHistoryParamsThreadHistoryResponseReplay durable history events for a thread.
thread/moveThreadMoveParamsThreadMoveResponseMove a thread into or out of a folder.
thread/folder/createThreadFolderCreateParamsThreadFolderCreateResponseCreate a folder.
thread/folder/moveThreadFolderMoveParamsThreadFolderMoveResponseMove a folder under another folder or to root.
thread/folder/deleteThreadFolderDeleteParamsThreadFolderDeleteResponseDelete a folder.
thread/unsubscribeThreadUnsubscribeParamsThreadUnsubscribeResponseStop sending thread-scoped notifications to this connection.

Starting A Thread

{
  "jsonrpc": "2.0",
  "id": "eeeeeeeeeeeeeeeeeeeee",
  "method": "thread/start",
  "params": {
    "thread_id": "thr_000000000000000001",
    "workspace_id": "ws_000000000000000001",
    "name": "Research",
    "model": "google/gemini-3-flash-preview",
    "model_provider": "openrouter",
    "mode": "Agent",
    "sandbox": "FullAccess"
  }
}
Important fields:
FieldNotes
thread_idClient-provided id.
workspace_idWorkspace that owns the thread.
modeChat disables tools; Agent enables the agent loop and tool orchestration.
sandboxCurrently FullAccess only. Tool runs are not separately sandboxed yet.
origin_kinduser, task_run, or system. Task subagents use hidden task-run threads.
sidebar_visibilityvisible or hidden. Hidden is used for internal/task threads.
agent_nickname, agent_roleOptional labels for task/subagent threads.
Response:
{
  "thread": {
    "id": "thr_000000000000000001",
    "workspace_id": "ws_000000000000000001",
    "name": "Research",
    "mode": "Agent",
    "status": "Idle"
  },
  "sandbox": {
    "mode": "FullAccess"
  }
}

Thread Tree

thread/tree returns all threads plus folders and placement rows for a workspace. Clients should use this instead of trying to infer sidebar layout from thread rows alone.
{
  "method": "thread/tree",
  "params": {
    "workspace_id": "ws_000000000000000001"
  }
}
Result shape:
{
  "workspace_id": "ws_000000000000000001",
  "threads": [],
  "folders": [],
  "placements": [
    {
      "thread_id": "thr_000000000000000001",
      "workspace_id": "ws_000000000000000001",
      "folder_id": null
    }
  ]
}

Thread History

thread/history returns durable events, not only final messages. It is the replay API for rebuilding a timeline after reconnect.
{
  "method": "thread/history",
  "params": {
    "thread_id": "thr_000000000000000001",
    "limit": 500
  }
}
History event payloads include turn start, item start, item deltas, item completion, recovery events, tool retry events, tool loop budget events, and terminal turn events.

Thread Notifications

EventParamsMeaning
thread/startedThreadStartedNotificationA thread was created and started.
thread/updatedThreadUpdatedNotificationThread metadata or status changed.
thread/closedThreadClosedNotificationThread was closed/unloaded for this client context.
thread/tree/changedThreadTreeChangedNotificationThread/folder/sidebar tree should be reloaded.
Thread subscription is connection-scoped. Starting or interacting with a thread associates the connection with that thread/workspace; thread/unsubscribe removes the thread subscription for that connection.