Server API

CLI-JAW exposes 141 HTTP API endpoints across 15 route modules. All mutation routes require authentication.

Base URL

http://localhost:3457    # Single instance (jaw serve)
http://localhost:24576   # Dashboard (jaw dashboard)

Authentication

Loopback requests (127.0.0.1, localhost, ::1) are authenticated automatically. Remote requests need a Bearer token from GET /api/auth/token.

Route Modules

ModuleRoutesDescription
server.ts14Bootstrap, health, WebSocket
settings.ts18Settings, prompt, heartbeat, MCP, CLI registry
memory.ts13Memory runtime + KV + files
browser.ts41CDP, web-ai, tabs, debug
jaw-memory.ts11Jaw memory search/read/save
orchestrate.ts11PABCD state, workers, dispatch
goal.ts3Goal CRUD
goal-run.ts3Bounded goal execution
messaging.ts6Upload, voice, channel send
employees.ts5Employee CRUD
skills.ts5Skills list/enable/disable
avatar.ts4Avatar images
traces.ts3Trace read
heartbeat.ts2Heartbeat config
i18n.ts2Language/locale

Key Endpoints

Chat

MethodPathDescription
POST/api/chatSend message (streaming NDJSON response)
GET/api/chat/historyGet chat history
POST/api/chat/stopStop generation

Goal

MethodPathDescription
GET/api/goalGet active goal
POST/api/goalSet/update/done/cancel goal
GET/api/goal/historyGoal history

Orchestration

MethodPathDescription
GET/api/orchestrate/stateCurrent PABCD state
PUT/api/orchestrate/stateTransition state
POST/api/orchestrate/resetReset to IDLE
POST/api/orchestrate/dispatchDispatch worker

Settings

MethodPathDescription
GET/api/settingsGet settings
PATCH/api/settingsUpdate settings
GET/api/settings/promptGet system prompt