This page is generated from the routers that packages/agents-host/src/main.ts joins into the runtime's listener. Do not edit it by hand. Run bun run docs:http-routes to regenerate it, and CI fails when it is out of date.
It lists the 149 routes these files in packages/agents-host/src register, sorted by path: http.ts, account-tokens.ts, account-login.ts, mcp-doors.ts, account-reset-credits.ts, github.ts, github-write-doors.ts, pr-overlap-pass.ts, host-load.ts, previews.ts, main.ts. Runtime HTTP API explains them by task and lists the error codes.
A path that contains ${...} is a template. The router registers it once for each value of that expression.
These files also register routes, but on a different listener, so this page leaves them out:
account-leases.ts: Its router serves the optional lease listener that Tailscale Serve exposes. The runtime's listener has only itsPOST /accounts/:name/lease, whichmain.tsregisters.reader.ts: It is a separate read-only process,bun src/reader.ts <data-directory> <port>, that serves its route on its own port.
The source is the file that registers the route. The handler is the expression the route runs, as written there. The request schema is the one the handler decodes its body or query with. The response schema is one the handler encodes with. Both are read from the handler's own declaration in its source file. A handler declared in another file, or one that builds its response without a schema, shows no schema.
| Method | Path | Source | Handler | Request schema | Response schema |
|---|---|---|---|---|---|
| GET | /accounts | account-tokens.ts | list | ||
| POST | /accounts | account-login.ts | create | CreateAccountRequest | |
| GET | /accounts/${spec.id}/callback | mcp-doors.ts | callback | ||
| GET | /accounts/${spec.id}/login/:state | mcp-doors.ts | loginStatus | ||
| POST | /accounts/${spec.id}/login/start | mcp-doors.ts | start | ||
| POST | /accounts/${spec.id}/prepare | mcp-doors.ts | prepare | ||
| GET | /accounts/${spec.id}/status | mcp-doors.ts | status | ||
| POST | /accounts/:name/lease | main.ts | leases.lease | ||
| GET | /accounts/:name/login/:state | account-login.ts | status | ||
| POST | /accounts/:name/login/complete | account-login.ts | complete | LoginCompleteRequest | |
| POST | /accounts/:name/login/start | account-login.ts | start | LoginStartRequest | |
| POST | /accounts/:name/reenable | account-tokens.ts | reenable | (inline) | |
| GET | /accounts/:name/reset-credits | account-reset-credits.ts | list | ||
| POST | /accounts/:name/reset-credits/consume | account-reset-credits.ts | consume | ResetConsumeRequest | |
| POST | /accounts/:name/token | account-tokens.ts | token | ||
| GET | /accounts/connected | account-tokens.ts | connected | ||
| POST | /accounts/model-refusals/clear | account-tokens.ts | clearRefusals | ClearRefusalsRequest | |
| POST | /accounts/opencode | account-login.ts | createOpencode | CreateOpencodeAccountRequest | |
| GET | /attention | http.ts | attentionSnapshot | ||
| GET | /attention/:id | http.ts | attentionItem | ||
| GET | /attention/changes | http.ts | attentionChanges | ||
| GET | /attention/follow | http.ts | attentionFollow | ||
| GET | /code/files | http.ts | codeFiles | ||
| GET | /code/outline | http.ts | codeOutline | ||
| GET | /code/read | http.ts | codeRead | ||
| GET | /code/roots | http.ts | codeRoots | ||
| POST | /code/search | http.ts | codeSearch | CodeSearchBody | |
| GET | /drain | http.ts | drainStatus | ||
| POST | /drain | http.ts | drainArm | DrainBody | |
| DELETE | /drain | http.ts | drainDisarm | ||
| POST | /drain/claim | http.ts | drainClaim | DrainClaimBody | |
| DELETE | /drain/claim | http.ts | drainRelease | DrainReleaseBody | |
| GET | /github/:owner/:repo/prs | github.ts | listDoor | ||
| GET | /github/:owner/:repo/prs/:number/checks | github.ts | door(reads.checks, true) | ||
| GET | /github/:owner/:repo/prs/:number/comments | github.ts | door(reads.comments, true) | ||
| GET | /github/:owner/:repo/prs/:number/diff | github.ts | door(reads.diff, true) | ||
| POST | /github/overlap | pr-overlap-pass.ts | overlapConfig | ||
| GET | /health | http.ts | healthRoute | ||
| GET | /host-load | host-load.ts | Effect.flatMap(read, (reading) => HttpServerResponse.json(reading, { headers: { "cache-control": "no-store" } })) | ||
| GET | /incidents | http.ts | incidentsSnapshot | ||
| GET | /keeper/spawn-pause | http.ts | spawnPauseStatus | ||
| POST | /keeper/spawn-pause/clear | http.ts | spawnPauseClear | SpawnPauseClearBody | |
| GET | /limits | http.ts | limitsRoute | ||
| GET | /live | http.ts | liveRoute | ||
| GET | /live-activity | http.ts | liveActivityRoute | ||
| GET | /metrics | http.ts | metricsRoute | ||
| GET | /metrics/cost-per-merged-pr | http.ts | costRoute | ||
| GET | /metrics/estate | http.ts | metricsEstate | ||
| GET | /metrics/history | http.ts | metricsHistory | ||
| GET | /metrics/keeper | http.ts | metricsKeeper | ||
| GET | /peers | http.ts | peersRoute | ||
| POST | /peers/external | http.ts | registerExternalPeer | ExternalPeerBody | |
| DELETE | /peers/external/:name | http.ts | unregisterExternalPeer | ||
| GET | /previews | previews.ts | list | ||
| POST | /previews | previews.ts | create | PreviewBody | |
| DELETE | /previews/:id | previews.ts | remove | ||
| GET | /rooms/:id | http.ts | roomRoute | ||
| POST | /rooms/:id/finalize | http.ts | finalizeRoute | RoomFinalizeBody | |
| POST | /rooms/:id/rounds | http.ts | fireRoundRoute | RoomRoundBody | |
| GET | /rooms/:id/rounds/:n | http.ts | roundRoute | ||
| GET | /rooms/capabilities | http.ts | roomCapabilitiesRoute | ||
| POST | /spawn | http.ts | spawn | SpawnBody | |
| GET | /threads | http.ts | threads | ||
| GET | /threads/:id | http.ts | thread | ||
| DELETE | /threads/:id | http.ts | setArchived("archived") | ||
| GET | /threads/:id/agui | http.ts | agui | ||
| GET | /threads/:id/agui-page | http.ts | aguiPage | ||
| POST | /threads/:id/approvals/:approvalId | http.ts | resolveApproval | ApprovalBody | |
| GET | /threads/:id/attachments | http.ts | attachments | ||
| GET | /threads/:id/compact | http.ts | compactStatus | ||
| POST | /threads/:id/compact | http.ts | compact | CompactBody | |
| POST | /threads/:id/events | http.ts | appendEvent | AppendableEventBody | |
| GET | /threads/:id/follow | http.ts | followLog | ||
| POST | /threads/:id/fork | http.ts | fork | ForkBody | |
| POST | /threads/:id/gate | http.ts | gate | GateBody | |
| POST | /threads/:id/handoff | http.ts | handoff | HandoffInput | |
| GET | /threads/:id/handoffs | http.ts | handoffs | ||
| POST | /threads/:id/handoffs/:fromSeq/accept | http.ts | answerHandoff(false) | (inline) | |
| POST | /threads/:id/handoffs/:fromSeq/decline | http.ts | answerHandoff(true) | (inline) | |
| GET | /threads/:id/head | http.ts | threadHead | ||
| POST | /threads/:id/interrupt | http.ts | interrupt | InterruptQuery | |
| GET | /threads/:id/loop | http.ts | loopStatus | ||
| POST | /threads/:id/loop | http.ts | loopStart | LoopBody | |
| POST | /threads/:id/loop/continue | http.ts | loopContinue | LoopContinueBody | |
| POST | /threads/:id/loop/stop | http.ts | loopStop | ||
| GET | /threads/:id/memory | http.ts | threadMemory | ||
| POST | /threads/:id/merge | http.ts | merge | MergeBody | |
| POST | /threads/:id/messages | http.ts | enqueue | EnqueueBody | |
| PATCH | /threads/:id/messages/:seq | http.ts | editHeld | HeldEditBody | |
| DELETE | /threads/:id/messages/:seq | http.ts | withdrawHeld | ||
| POST | /threads/:id/notify | http.ts | notify | NoticeBody | |
| DELETE | /threads/:id/notify | http.ts | clearNotice | ||
| GET | /threads/:id/operations | http.ts | operations | ||
| POST | /threads/:id/operations | http.ts | startOperationRoute | OperationStartBody | |
| GET | /threads/:id/operations/:operation | http.ts | operationStateRoute | ||
| POST | /threads/:id/operations/:operation | http.ts | recordOperationRoute | OperationRecordBody | |
| GET | /threads/:id/questions/:requestId | http.ts | questionStatus | ||
| POST | /threads/:id/questions/:requestId/answer | http.ts | questionDoor("answer") | QuestionAnswerBody, QuestionTargetBody | |
| POST | /threads/:id/questions/:requestId/continue | http.ts | questionDoor("continue") | QuestionAnswerBody, QuestionTargetBody | |
| POST | /threads/:id/questions/:requestId/dismiss | http.ts | questionDoor("dismiss") | QuestionAnswerBody, QuestionTargetBody | |
| POST | /threads/:id/recover | http.ts | recover | RecoverPayload | |
| POST | /threads/:id/restore | http.ts | setArchived("restored") | ||
| POST | /threads/:id/role | http.ts | threadRole | RoleBody | |
| PUT | /threads/:id/seat-lease | http.ts | seatLease | SeatLeaseBody | |
| GET | /threads/:id/seats | http.ts | seats | ||
| POST | /threads/:id/seats | http.ts | seatJoin | SeatBody | |
| DELETE | /threads/:id/seats/:name | http.ts | seatLeave | ||
| POST | /threads/:id/seats/replace | http.ts | seatReplace | SeatReplaceBody | |
| POST | /threads/:id/send | http.ts | send | SendBody | |
| GET | /threads/:id/steering | http.ts | steering | ||
| GET | /threads/:id/stream | http.ts | streamDeltas | ||
| GET | /threads/:id/subscriptions | http.ts | subscriptions | ||
| POST | /threads/:id/subscriptions | http.ts | subscribe | SubscribeBody | |
| DELETE | /threads/:id/subscriptions/:watch | http.ts | unsubscribe | ||
| GET | /threads/:id/tail | http.ts | tail | ||
| GET | /threads/:id/tool-results/:seq | http.ts | toolResult | ||
| GET | /threads/:id/turn | http.ts | turnStatus | ||
| POST | /threads/:id/ui/generate | http.ts | generateUi | UiGenerateBody | |
| GET | /timings | http.ts | timingsRoute | ||
| POST | /v1/chat/completions | http.ts | completions.chatCompletions | ||
| GET | /v1/models | http.ts | completions.models | ||
| GET | /watch/ws | http.ts | watchDoors.stream | ||
| GET | /watches | http.ts | watchDoors.listAll | ||
| POST | /watches | http.ts | watchDoors.add | ||
| DELETE | /watches/:thread/:id | http.ts | watchDoors.remove | ||
| GET | /workspaces | http.ts | workspacesRoute | ||
| GET | /workspaces/:name | http.ts | workspaceRoute | ||
| GET | /workspaces/:name/approvals | http.ts | workspaceApprovals | ||
| GET | /workspaces/:name/changes | http.ts | followWorkspaceChanges | ||
| POST | /workspaces/:name/changes/:stream | http.ts | workspaceChangesControl | ChangeControl | |
| GET | /workspaces/:name/events | http.ts | followWorkspaceEvents | StoredEvent | |
| GET | /workspaces/:name/github-writes/:key | github-write-doors.ts | statusRoute | ||
| POST | /workspaces/:name/github/prs/:number/threads/:threadId/replies | github-write-doors.ts | replyRoute | ThreadReplyRequest | |
| PUT | /workspaces/:name/github/prs/:number/threads/:threadId/resolution | github-write-doors.ts | resolutionRoute | ThreadResolutionRequest | |
| POST | /workspaces/:name/github/prs/:number/threads/resolution | github-write-doors.ts | bulkRoute | BulkResolutionRequest | |
| GET | /workspaces/:name/head | http.ts | workspaceHeadRoute | ||
| GET | /workspaces/:name/memory | http.ts | workspaceMemoryBrowse | ||
| POST | /workspaces/:name/memory/recall | http.ts | workspaceMemoryRecall | MemoryRecallBody | |
| POST | /workspaces/:name/memory/reflect | http.ts | workspaceMemoryReflect | MemoryReflectBody | |
| POST | /workspaces/:name/memory/retain | http.ts | workspaceMemoryRetain | MemoryRetainBody | |
| PUT | /workspaces/:name/policy | http.ts | workspacePolicyRoute | WorkspacePolicy | |
| GET | /workspaces/:name/pr-agent-starts/:key | http.ts | prAgentStartRoute | ||
| POST | /workspaces/:name/prs/:number/agents | http.ts | prAgentRoute | PrAgentRequest | |
| GET | /workspaces/:name/prs/:number/receipt | http.ts | receiptRoute | (inline) | |
| GET | /workspaces/:name/questions | http.ts | workspaceQuestions | ||
| GET | /workspaces/:name/reflex | http.ts | workspaceReflex | ||
| GET | /workspaces/:name/rooms | http.ts | findRoomRoute | RoomFindQuery | |
| POST | /workspaces/:name/rooms | http.ts | armRoomRoute | RoomArmBody | |
| GET | /workspaces/:name/tail | http.ts | workspaceTail |