thread/get for one thread, thread/history for replay, and thread/tree for the complete workspace tree.
Methods
| Method | Params | Result | Purpose |
|---|---|---|---|
thread/start | ThreadStartParams | ThreadStartResponse | Create or open a thread. |
thread/get | ThreadGetParams | ThreadGetResponse | Load one thread. |
thread/tree | ThreadTreeParams | ThreadTreeResponse | Load threads, folders, and placements for a workspace. |
thread/history | ThreadHistoryParams | ThreadHistoryResponse | Replay persisted thread events. |
thread/move | ThreadMoveParams | ThreadMoveResponse | Move a thread within the tree. |
thread/folder/create | ThreadFolderCreateParams | ThreadFolderCreateResponse | Create a folder. |
thread/folder/move | ThreadFolderMoveParams | ThreadFolderMoveResponse | Move a folder. |
thread/folder/delete | ThreadFolderDeleteParams | ThreadFolderDeleteResponse | Delete a folder. |
thread/unsubscribe | ThreadUnsubscribeParams | ThreadUnsubscribeResponse | Stop receiving live notifications for a thread. |
Starting A Thread
Clients provide the thread id. That keeps reconnect and optimistic UI flows simple: the client can create local UI state immediately and then reconcile with the gateway response.| Field | Meaning |
|---|---|
thread_id | Client-provided stable id. |
workspace_id | Workspace that owns the thread. |
name | Optional display name. |
model, model_provider | Optional defaults used by turns in this thread. |
mode | Chat or Agent. Chat is plain assistant conversation; Agent enables tool and task orchestration. |
sandbox | Current value is FullAccess. Tool runs are not isolated yet. |
origin_kind | user, task_run, or system. |
sidebar_visibility | visible or hidden. Hidden threads are useful for subagents and internal task runs. |
agent_nickname, agent_role | Optional labels for agent/subagent threads. |
mode and sandbox are PascalCase because they are Rust enum variants without snake-case renaming. origin_kind and sidebar_visibility are snake-case strings.
Thread Modes
Chat and Agent are part of the thread model, not separate APIs. A client starts turns the same way in both modes through turn/start; the gateway decides which execution path to run.
In Chat mode the gateway focuses on conversation with the selected model. In Agent mode the gateway can compile richer context, expose tools, call MCP servers, invoke skills, create tasks, and coordinate subagents. Clients should show the mode clearly because it changes what a user should expect from a turn.
Reading One Thread
thread/get when opening a thread by id or reconciling after a notification. The response contains the durable thread row with its workspace id, mode, model defaults, status fields, and timestamps.
Workspace Tree
thread/tree is the primary method for a sidebar or thread picker. It returns related collections: threads, folders, placements, and AGENTS.md summaries. Do not sort threads by timestamps and call it a tree; folder placement is stored separately.
agents_docs contains content-free summaries for root and folder AGENTS.md files. If another client moves a thread or changes an AGENTS.md file, your client should refresh the tree after thread/tree/changed.
See AGENTS.md API for reading and editing full file content.
Moving Threads And Folders
Use move methods for tree edits instead of mutating local order and hoping the gateway catches up.thread/tree afterward to render the gateway’s resulting state.
Thread History
thread/history returns durable protocol events, not only final assistant messages. It is the replay API for rebuilding a thread timeline after reconnect, crash recovery, or opening a thread on another device.
turn/timeline when you already know the turn id; use thread/history when you need to rebuild from the thread level.
Unsubscribing
Notifications
| Event | Meaning |
|---|---|
thread/started | A thread was created/opened. |
thread/updated | Thread metadata changed. |
thread/closed | Thread was closed. |
thread/tree/changed | The workspace thread tree changed and should be reloaded. |
thread/agents_doc/changed | A root or folder AGENTS.md file changed and affected tree summaries or effective instructions. |
thread/get, thread/tree, thread/history, or turn/timeline as needed.