Tasks API
The current Rust/Axum implementation uses memory storage for local integration and the workspace prototype.
Base URL
Production API is supplied by deployment configuration. Locally it listens on http://127.0.0.1:8080 by default.
The machine-readable contract is kept in api/openapi.yaml.
Create a task
POST /api/v1/tasks
{
"title": "Clean the June sales workbook",
"description": "Summarize by region and write a brief",
"kind": "spreadsheet",
"input": {"file_id": "sales-june.xlsx"}
}The endpoint returns 201 Created and a task object. kind accepts spreadsheet, report, resume, ocr, or custom.
Read and manage
GET /api/v1/tasks: list tasks newest first;GET /api/v1/tasks/{id}: read one task;POST /api/v1/tasks/{id}/cancel: cancel queued or running work;PUT /api/v1/tasks/{id}: update a task (prototype surface);DELETE /api/v1/tasks/{id}: delete a task.
Health check
GET /healthz returns:
{"status":"ok","service":"xaiworker-api"}Storage is currently an in-memory map, so a restart loses tasks. A persistent repository and agent queue will be added behind the same contract.