跳到主要内容

Kanban API

Task Kanban Board API

Overview

The task kanban board functionality is built on top of existing Viben data models and does not require separate kanban data storage:

  • Workspace = Kanban Project (workspace as project)
  • Background Tasks = Kanban Task (background agent tasks as kanban tasks)

Data Reuse

Kanban ConceptViben ImplementationAPI Endpoint
ProjectWorkspaceGET /api/workspaces
TaskBackground TaskGET /api/agent/tasks/subscribe (SSE)
Stop TaskStop TaskPOST /api/agent/tasks/:taskId/stop

Workspace API

GET /api/workspaces

Returns all workspaces, including the global workspace.

Background Tasks API

GET /api/agent/tasks/subscribe (SSE)

Subscribe to background task status updates. Response format:

{
"type": "tasks",
"tasks": [
{
"taskId": "uuid",
"sessionId": "agent-session-uuid",
"prompt": "user input",
"status": "running",
"startedAt": "ISO timestamp",
"completedAt": "ISO timestamp (optional)",
"cost": 0.001,
"duration": 1234
}
]
}

Task Status:

StatusDescription
runningRunning
completedCompleted
errorError
cancelledCancelled
POST /api/agent/tasks/:taskId/stop

Stop a background task.

Kanban Column Mapping

Column NameBackground Task Status
In Progressrunning
Donecompleted
Errorerror
Cancelledcancelled

Frontend Integration

The frontend uses the following hooks to fetch kanban data:

  1. useLocalWorkspaces() - Get workspace list as projects
  2. useBackgroundTasks() - Get background tasks as kanban tasks