Default server: http://127.0.0.1:8787.
GET /health— health check for tooling and process state.GET /api/status— expanded server status mirror for runtime checks.GET /api/config— renderer-safe caps, features, and environment-derived settings.GET /api/settings— persisted run profile.PATCH /api/settings— update run profile and broadcastsettings_update.
Example settings patch:
curl -X PATCH http://127.0.0.1:8787/api/settings \
-H 'content-type: application/json' \
-d '{"autoSpeculation":true,"defaultDepth":"deep","defaultFreshness":"latest","maxTabs":4}'Health/config/statusinclude model mode, caps (MAX_AGENT_TABS,MAX_SPECULATIVE_TABS,MAX_CONCURRENT_TABS,MAX_SEARCH_QUERIES), search provider, and session count./api/settingsreturns all persisted profile values, including:autoSpeculationmaxTabsdefaultDepthdefaultFreshnessvisualAnalysistheme
POST /api/predict- Request body:
{ "query": "..." } - Response: prediction object with
query,confidence,typingStage,searchPlan,budget, andwasteGuardfields.
- Request body:
-
POST /api/research/start- Request body (required):
{ "query": "..." } - Optional fields:
mode:speculative|committed(defaultcommitted)options:depth:spark|quick|standard|deepmaxTabsvisualSnapshotsincludeVisualAnalysisfreshness:auto|latest|timeless
previousSessionIdsupersedesSessionId
- Response: session snapshot including
id,mode,status,tabs,plan, andsources.
- Request body (required):
-
POST /api/research/demo- Starts a demo-mode session for no-key review paths.
- Optional body:
{ "query": "...", "options": { ... } } - Can return 403 if
DEMO_MODE_ENABLEDis false in environment.
-
POST /api/research/:id/commit- Upgrades/copies a session to committed mode.
- Optional body:
{ "query": "..." }
-
POST /api/research/:id/cancel- Cancels an active session and marks it
cancelled.
- Cancels an active session and marks it
-
DELETE /api/research/:id- Removes one session snapshot and in-memory state.
- Active sessions are canceled first, then removed.
-
DELETE /api/research- Clears completed/cancelled/error snapshots from memory and disk.
- Returns
409if active sessions remain.
-
GET /api/research- Returns up to
sessionHistoryLimitrecent sessions.
- Returns up to
-
GET /api/research/:id- Returns one persisted/active session snapshot.
-
GET /api/research/:id/export- Default: markdown, with
?format=markdown. ?format=jsonreturns portable JSON..../export.mdand.../export.jsonare equivalent legacy paths.
- Default: markdown, with
GET /wsstreams:hellopredictionagent_logsession_updatesettings_update
The UI uses session_update as the source of truth for active tabs, source notes, synthesis state, and history.
Input validation errors return HTTP 400 with { "error": "..." }.
/api/research/demo can return 403 if demo mode is disabled.