Skip to content

raw dashboard serves a browser app and a small local JSON API. The API is intended for the bundled app. You can use it for scripts on the same machine, but its shape can change between releases.

  • The server binds to 127.0.0.1. The port defaults to 21517. Port 0 picks a free port.
  • Every /api route requires Authorization: Bearer TOKEN. The token is printed in the launch URL.
  • The Host header must match the listener’s address and port, or, with raw dashboard --remote, the one registered https://<name>.trycloudflare.com address. A browser Origin must match the origin of an accepted listener exactly.
  • Wrong tokens are throttled per client: 10 in 60 seconds, then 429 rate_limited with Retry-After. A valid token is never counted.
  • Query-string tokens are not accepted.
  • Responses cannot be read or embedded from another origin.
  • JSON request bodies are limited to 1 MiB. Uploads have their own limits.

Errors use one shape:

{ "error": { "code": "invalid_input", "message": "...", "details": {} } }
Status Meaning
400 Malformed input.
401 Missing or invalid token.
403 Host or origin not allowed.
404 Resource not found.
409 Conflict. A state changed, or a revision is stale.
413 Body or upload too large.
415 Unsupported media type.
422 Input is well-formed but invalid, such as an unknown agent.
500 Internal error.
503 A required capability is unavailable.

GET /api/bootstrap returns the server version, the working directory, the config path, the default agent, and whether the config is valid. remote is true while a public quick-tunnel address is registered. It returns no credentials, no config body, and no conversation text.

Method and path Description
GET /api/workspaces Lists recently used directories, with session and running counts. Add include=<path> to pin directories.
POST /api/workspaces/validate Body { "cwd": "..." }. Checks that the directory exists and returns its canonical path.
GET /api/workspaces/browse?path=&hidden=&q= Lists sub-directories for a folder picker. Lists directory names only.
GET /api/workspaces/files?cwd=&refresh= Lists the workspace’s files for the Files tab, in the same git-aware view @ references use. Returns { root, entries, total, truncated }.
GET /api/workspaces/file?cwd=&path= Returns one workspace file for display: text (at most 1 MiB, then truncated: true) or binary: true. Read-only, and limited to the selected workspace.

Choosing a workspace changes the working directory for relative paths. It does not change file permissions.

Method and path Description
GET /api/sessions?cwd=&title=&before=&limit= Lists sessions, 20 per page by default and 100 at most. Uses opaque cursors.
POST /api/sessions Body { "cwd", "agent"? }. Creates an empty session without a model request.
GET /api/sessions/:id Returns the session, its latest history page, metrics, recent operations, waiting messages, and ownership (idle, here, or elsewhere).
GET /api/sessions/:id/history?before=&limit= Loads older history.
PATCH /api/sessions/:id Body { "title" }. Renames the session.
DELETE /api/sessions/:id Deletes the session. Refused while a writer is active.
POST /api/sessions/:id/operations Starts a turn or a compaction. Body { "clientRequestId", "kind": "turn" or "compact", "agent", "input"?, "attachments"?, "files"?, "request"? }. Returns 202 with a receipt.
GET /api/sessions/:id/operations?clientRequestId= Finds a receipt after a lost response.
GET /api/operations/:id Reads one receipt.
POST /api/operations/:id/cancel Cancels work that this server owns.
POST /api/sessions/:id/inputs Sends a message. While a turn of the dashboard runs, the message is queued, or it interrupts the turn. Body { "clientRequestId", "agent", "input", "attachments"?, "files"?, "request"?, "mode": "queue" or "interrupt" }. Returns 202 with { "operation" } when a turn starts, or { "queued" } when the message waits.
GET /api/sessions/:id/inputs Lists the waiting messages as { "items" }. With ?clientRequestId=, returns the receipt of that message, for a lost response.
POST /api/sessions/:id/inputs/:inputId/send-now Sends a waiting, paused or blocked message now. If a turn is running, it is interrupted.
POST /api/sessions/:id/inputs/:inputId/edit Takes a waiting, paused or blocked message back. It is deleted, and the response returns its input, files and staged attachments so the composer can edit it.
DELETE /api/sessions/:id/inputs/:inputId Deletes a waiting, paused or blocked message. Returns 204.
GET /api/sessions/:id/metrics Returns metrics and whether they are stale. Missing values are null, never zero.

Rules for turns:

  • The server uses the agent’s config as currently saved. The browser cannot supply a config.
  • A repeated clientRequestId with the same intent returns the original receipt. Reusing it for a different intent returns 409.
  • Nothing submits work on a GET, a refresh, or a reconnect.

A waiting message has an id, its clientRequestId, its text, its state and mode, and reason when one is known. state is queued, delivering, paused (after Stop or an error) or blocked (a UserPromptSubmit hook refused it). A queue holds at most 20 messages. Errors include 409 queue_full, 409 already_sent for a message the agent has taken, 409 busy when another process holds the session, and 400 invalid_mode. How the queue delivers messages is described in Sessions.

Method and path Description
POST /api/sessions/:id/attachments Uploads one PNG or JPEG. The body is the raw file, with Content-Type set. Returns 201 with an id.
GET /api/sessions/:id/attachments/:attachmentId Returns the bytes of a staged attachment. It does not consume the attachment.
DELETE /api/sessions/:id/attachments/:attachmentId Removes a staged attachment.
GET /api/sessions/:id/files?q=&limit= Searches workspace files for references. In a git repository it follows .gitignore. Elsewhere it skips .git, node_modules, and symlinks.
GET /api/sessions/:id/history/:sequence/attachments/:index Returns the stored bytes of one attachment in a user message.
GET /api/sessions/:id/tool-results/:callId/full Returns the complete saved output of a tool call whose result was truncated or cleared from context. Returns 410 full_output_unavailable once the saved copy is gone.

Turns can refer to up to 8 staged attachments and up to 20 workspace files. A file path must stay inside the workspace. Attachments are not accepted on compaction. Staged attachments are kept in memory for 30 minutes.

Images are sent to the model only when the model has vision: true. Otherwise the model receives a text placeholder, and the saved session keeps the original image.

Method and path Description
GET /api/agents/:name/composer Returns the agent’s selected skills, its vision setting, the attachment kinds it accepts, and any request controls the provider supports. Needs no credentials.

A turn can carry request: { effort?, serviceTier? } to change those controls for one operation. The change is never written to the config.

GET /api/sessions/:id/events is a Server-Sent Events stream. Send Last-Event-ID to replay retained events. The route also accepts POST with the same authentication, frames and cursor, because proxies such as Cloudflare quick tunnels buffer GET event streams. The bundled app uses POST only when bootstrap reports remote: true. A client that cannot replay receives a fresh snapshot.

Each event has an instanceId, a sessionId, a sequence, a type, and data. Event types include snapshots, committed history, text and reasoning, tool state, operation state, compaction, metrics, approvals, waiting messages, panels, interactions, commands, and host errors.

The server keeps up to 4096 events and 4 MiB per session for replay. Large live output is paged separately with GET /api/sessions/:id/output?operationId=&segmentId=&offset=.

Method and path Description
POST /api/permissions/:approvalId Body { "operationId", "callId", "allow" }. The first valid answer wins. Later answers return 409.
GET /api/activity Lists active and recent operations and pending approvals, without bodies.

Approvals are created only for matching ask rules. A pending approval waits 24 hours by default, independent of the request timeout. Then it expires and the call is denied. Stopping the run cancels it. RAW_APPROVAL_TIMEOUT_MS in the dashboard’s environment can shorten the wait. Each pending approval carries a title and a summary, the call’s headline.

Method and path Description
GET /api/sessions/:id/panels?agent=NAME Lists the panels for the session’s agent.
GET /api/sessions/:id/panels/:panel Returns one panel, or 404 unknown_panel.
POST /api/sessions/:id/panels/:panel/actions Runs a tool action. Body { "action", "agent", "block"?, "item"?, "clientRequestId" }. Returns 202 with an operationId.
GET /api/sessions/:id/views/:instanceId Returns one saved chat view.

Panel IDs in paths are the full owner#panel form, URL-encoded. A panel action goes through the tool’s normal rules, approval, and hooks. Errors include 409 session_busy, 409 stale_panel, 409 agent_mismatch, 403 action_denied, and 422 invalid_action.

Method and path Description
GET /api/sessions/:id/interactions/:requestId Returns one request and its state.
POST /api/sessions/:id/interactions/:requestId/responses Body { "requestId", "expectedRevision", "idempotencyKey", "response": "submit", "answers" } or { ..., "response": "cancel" }.

A stale or conflicting response returns 409. An invalid answer returns 422 and leaves the request pending. A repeat with the same key returns the original result. See Tool contract.

Commands are foreground Bash runs and background processes, shown together.

Method and path Description
GET /api/sessions/:session/commands Lists commands, running ones first, at most 132 rows. omitted counts the older rows that were left out.
GET /api/sessions/:session/commands/:id/output?cursor=0&maxBytes=65536 Returns a page of output with absolute cursors.
POST /api/sessions/:session/commands/:id/stop Body { "clientRequestId" }. Stops a background process through its policy and approval checks. Returns 202 with a control receipt.
GET /api/sessions/:session/commands/:id/controls/:controlId Reads a control receipt.

See Background processes.

Write requests use the revision from the matching read. A stale revision returns 409 conflict and never overwrites the file. Invalid candidates return 422 and leave the file unchanged.

Method and path Description
GET /api/config Returns the config path, revision, validity, and summaries of agents, variables, providers, and MCP servers. Never returns credentials, literal values, commands, or URLs.
POST /api/config/initialize Creates the starter config. Fails if the file exists.
GET /api/config/document Returns the full config for the advanced editor.
PUT /api/config/document Body { "revision", "source" }. Saves the full config after validation.
POST /api/config/validate Body { "source" }. Validates without saving.
PATCH /api/config Body { "revision", "patch" }. Replaces top-level fields. null removes a field.
GET /api/agents/:name, GET /api/models/:name Reads one agent or model with its revision.
POST /api/agents, POST /api/models Creates, edits, duplicates, renames, or deletes an agent or model.
GET /api/components/:kind Lists tools, skills, or hooks, with where each is used.
GET /api/components/:kind/:id Returns one component.
POST /api/components/:kind Creates a component from files, or forks one with cloneFrom.
GET and PUT /api/components/:kind/:id/file?path= Reads or saves one text file inside a component.
POST /api/components/:kind/:id/selection Attaches or detaches a component on an agent.
DELETE /api/components/:kind/:id Deletes a component. Refused while it is in use or read-only.
POST /api/policy/test Shows the effect a rule set would give for a tool identity and arguments. Does not run the tool.
POST /api/checks Starts an explicit variable or MCP check. Returns 202.
GET /api/checks/:id Reads a check’s state and result.
POST /api/checks/:id/cancel Cancels a check.
GET /api/diagnostics Returns version, platform, and count information. No transcripts, credentials, or variable values.

Checks have a 30-second deadline and run at most eight at a time. An MCP check lists the server’s tools and never calls one.

Model credentials use explicit edits: { "mode": "keep" }, { "mode": "clear" }, or { "mode": "set", "value": "..." } or { "mode": "set", "env": "ENV_NAME" }.

Method and path Description
GET /api/packages Lists installed aliases, their digests, and any diagnostics.
GET /api/packages/:alias Returns the package report, input schema, and where it is used.
POST /api/packages/inspect Body { "path" }. Stages a local folder or .rawpkg for review.
POST /api/packages/upload Uploads a .rawpkg as the raw request body.
GET /api/packages/stages Lists staged packages.
DELETE /api/packages/stages/:id Discards a staged package.
GET /api/packages/stages/:id/download Downloads a staged .rawpkg.
POST /api/packages/install Body { "stageId", "alias", "action": "install" or "update" or "link" }.
POST /api/packages/:alias/agent Creates an agent bound to a package agent, with your model. Does not change the default agent.
POST /api/packages/:alias/component Adds a package tool or skill to an agent, or binds a variable, provider, or MCP server.
POST /api/packages/export Exports an agent as a package and packs it.
POST /api/packages/:alias/fork Copies an installed package into an editable folder.
DELETE /api/packages/:alias Removes an alias. Refused while agents depend on it.

Staged packages are kept for 30 minutes, up to four at a time. Installing uses the staged snapshot, even if the source changes afterward. A failed update keeps the last working version.

See Packages.