Skip to main content
Version: latest

kas serve

Start an HTTP server that exposes the kasmos task store over a REST API backed by SQLite. Optionally starts a second MCP server on a separate port.

kas serve [flags]

flags

flagdefaultdescription
--port7433port for the REST API
--bind0.0.0.0address to bind to
--db~/.config/kasmos/taskstore.dbpath to the SQLite database file
--mcptrueenable the MCP server (Streamable HTTP)
--mcp-port7434port for the MCP server
--admin-dirembeddedpath to the built admin SPA dist/ directory

examples

# start with defaults (port 7433, embedded admin UI)
kas serve

# use a custom port and database
kas serve --port 8080 --db /data/kasmos/tasks.db

# bind to localhost only, disable MCP
kas serve --bind 127.0.0.1 --mcp=false

# use a separately built admin UI
kas serve --admin-dir /opt/kasmos/admin/dist

rest api

All task endpoints use the project-scoped URL prefix /v1/projects/{project}/tasks.

health

methodpathdescription
GET/v1/pinghealth check — returns 200 if the store is reachable

tasks

methodpathdescription
GET/v1/projects/{project}/taskslist tasks; accepts ?status=<s> and ?topic=<t> query params
POST/v1/projects/{project}/taskscreate a task (JSON body: TaskEntry)
GET/v1/projects/{project}/tasks/{filename}get a single task
PUT/v1/projects/{project}/tasks/{filename}update task metadata

task content

methodpathdescription
GET/v1/projects/{project}/tasks/{filename}/contentretrieve plan content (returns text/markdown)
PUT/v1/projects/{project}/tasks/{filename}/contentreplace plan content (raw markdown body)

subtasks

methodpathdescription
GET/v1/projects/{project}/tasks/{filename}/subtaskslist subtask entries
PUT/v1/projects/{project}/tasks/{filename}/subtasksreplace subtask list (JSON array)
PUT/v1/projects/{project}/tasks/{filename}/subtasks/{taskNumber}/statusupdate a single subtask status

task metadata

methodpathdescription
PUT/v1/projects/{project}/tasks/{filename}/goalset task goal text
PUT/v1/projects/{project}/tasks/{filename}/phase-timestamprecord a phase timestamp
PUT/v1/projects/{project}/tasks/{filename}/clickup-task-idset ClickUp task ID
POST/v1/projects/{project}/tasks/{filename}/increment-review-cycleincrement review cycle counter
PUT/v1/projects/{project}/tasks/{filename}/pr-urlstore the PR URL
PUT/v1/projects/{project}/tasks/{filename}/pr-stateupdate PR review decision and check status
POST/v1/projects/{project}/tasks/{filename}/renamerename the task (changes stored filename)

pr reviews

methodpathdescription
POST/v1/projects/{project}/tasks/{filename}/pr-reviewsrecord a PR review (idempotent by review ID)
GET/v1/projects/{project}/tasks/{filename}/pr-reviews/pendinglist reviews not yet dispatched to a fixer
GET/v1/projects/{project}/tasks/{filename}/pr-reviews/{reviewID}/processedcheck if a review has been processed
POST/v1/projects/{project}/tasks/{filename}/pr-reviews/{reviewID}/reactedmark that a reaction was posted to a review

audit events

methodpathdescription
GET/v1/projects/{project}/audit-eventsquery audit log entries

instances

Live-preview and permission endpoints for daemon-managed SDK instances. These routes bridge the daemon control API to the browser-facing kas serve stack. Only daemon-managed SDK instances support the structured presentation response; tmux instances return supported: false.

methodpathdescription
GET/v1/projects/{project}/instances/{title}/presentationretrieve the current structured turn snapshot for a daemon-managed SDK instance; returns { supported, turns, captured_at }
POST/v1/projects/{project}/instances/{title}/permissionsubmit the user's permission choice for a pending prompt; body: { "choice": <0|1|2> } where 0 = allow once, 1 = allow always, 2 = reject

permission choice values:

valuemeaning
0allow once (allow_once)
1allow always (allow_always)
2reject (reject)

the presentation response shape:

{
"supported": true,
"captured_at": "2026-01-01T10:00:00Z",
"turns": [
{
"id": "turn-1",
"number": 1,
"started_at": "2026-01-01T10:00:00Z",
"completed_at": "2026-01-01T10:00:05Z",
"interrupted": false,
"tool_count": 2,
"rows": [
{ "kind": "tool", "text": "reading file", "tool_name": "Read", "timestamp": null, "is_error": false },
{ "kind": "result", "text": "contents", "tool_name": "", "timestamp": null, "is_error": false },
{ "kind": "response", "text": "", "tool_name": "", "timestamp": null, "is_error": false },
{ "kind": "prose", "text": "I found the file.", "tool_name": "", "timestamp": null, "is_error": false }
]
}
]
}

row kind values: thinking, tool, result, system, permission, response, prose, status.

admin ui

A built-in web admin UI is served at /admin/. To use an externally built admin SPA, pass --admin-dir pointing to the dist/ directory (must contain index.html).

mcp server

When --mcp is true (the default), a Streamable HTTP MCP server starts on --mcp-port (default 7434). The MCP endpoint is at http://<bind>:<mcp-port>/mcp. It exposes the task store and signal gateway as MCP tools, plus filesystem tools scoped to the current working directory and repo root.