Back to Eliza

Workbench API

packages/docs/rest/workbench.md

2.0.19.7 KB
Original Source

The workbench API manages the agent's task board and todo list. Tasks represent higher-level objectives tracked by the runtime, while todos are lightweight checklist items. Todos are persisted to the database when the todo data service plugin is available, falling back to the runtime task system otherwise. The overview endpoint aggregates both alongside trigger, autonomy, and life-ops state for the dashboard.

Endpoints

MethodPathDescription
GET/api/workbench/overviewDashboard overview
GET/api/workbench/tasksList all tasks
POST/api/workbench/tasksCreate a workbench task
GET/api/workbench/tasks/:idGet a single task
PUT/api/workbench/tasks/:idUpdate a task
DELETE/api/workbench/tasks/:idDelete a task
GET/api/workbench/todosList all todos
POST/api/workbench/todosCreate or update a workbench to-do item
POST/api/workbench/vfs/projectsCreate or open a VFS project
GET/api/workbench/vfs/projects/:id/quotaRead VFS quota
GET/api/workbench/vfs/projects/:id/filesList VFS files
GET/api/workbench/vfs/projects/:id/fileRead a VFS file
PUT/api/workbench/vfs/projects/:id/fileWrite a VFS file
DELETE/api/workbench/vfs/projects/:id/fileDelete a VFS file
GET/api/workbench/vfs/projects/:id/snapshotsList snapshots
POST/api/workbench/vfs/projects/:id/snapshotsCreate snapshot
GET/api/workbench/vfs/projects/:id/diffDiff current files against a snapshot
POST/api/workbench/vfs/projects/:id/rollbackRoll back to snapshot
POST/api/workbench/vfs/projects/:id/compile-pluginCompile TypeScript/JS from VFS
POST/api/workbench/vfs/projects/:id/load-pluginLoad a VFS plugin into the runtime
GET/api/workbench/vfs/pluginsList loaded VFS plugins
DELETE/api/workbench/vfs/projects/:id/plugins/:pluginNameUnload a VFS plugin

GET /api/workbench/overview

Returns a combined view of tasks, triggers, todos, autonomy state, life-ops data, and summary counts. This is the primary endpoint for the workbench dashboard. When the LifeOps service is available, the response includes a lifeops object with the full LifeOps overview.

Response

json
{
  "tasks": [
    {
      "id": "uuid",
      "name": "Process incoming data",
      "description": "Analyze and store data feeds",
      "tags": ["workbench-task"],
      "isCompleted": false
    }
  ],
  "triggers": [
    {
      "id": "uuid",
      "displayName": "Hourly Check",
      "enabled": true,
      "schedule": "0 * * * *"
    }
  ],
  "todos": [
    {
      "id": "uuid",
      "name": "Review latest logs",
      "description": "Check for anomalies",
      "isCompleted": false,
      "priority": 1,
      "isUrgent": false,
      "type": "task"
    }
  ],
  "summary": {
    "totalTasks": 3,
    "completedTasks": 1,
    "totalTriggers": 2,
    "activeTriggers": 2,
    "totalTodos": 5,
    "completedTodos": 2
  },
  "autonomy": {
    "enabled": true,
    "thinking": false,
    "lastEventAt": 1718000000000
  },
  "lifeops": {
    "occurrences": [],
    "goals": [],
    "reminders": [],
    "summary": {
      "activeOccurrenceCount": 0,
      "overdueOccurrenceCount": 0,
      "snoozedOccurrenceCount": 0,
      "activeReminderCount": 0,
      "activeGoalCount": 0
    }
  },
  "tasksAvailable": true,
  "triggersAvailable": true,
  "todosAvailable": true,
  "lifeopsAvailable": true
}

Tasks

GET /api/workbench/tasks

List all workbench tasks, sorted alphabetically by name.

Response

json
{
  "tasks": [
    {
      "id": "uuid",
      "name": "Process data",
      "description": "...",
      "tags": ["workbench-task"],
      "isCompleted": false
    }
  ]
}

POST /api/workbench/tasks

Create a new workbench task.

Request Body

FieldTypeRequiredDescription
namestringYesTask name
descriptionstringNoTask description
tagsstring[]NoAdditional tags (auto-includes workbench-task)
isCompletedbooleanNoInitial completion state (default false)

Response (201)

json
{
  "task": {
    "id": "uuid",
    "name": "New task",
    "description": "",
    "tags": ["workbench-task"],
    "isCompleted": false
  }
}

GET /api/workbench/tasks/:id

Get a single task by ID.

Response

json
{
  "task": { "id": "uuid", "name": "...", "isCompleted": false }
}
StatusCondition
404Task not found

PUT /api/workbench/tasks/:id

Update an existing task.

Request Body

FieldTypeRequiredDescription
namestringNoUpdated name (cannot be empty)
descriptionstringNoUpdated description
tagsstring[]NoUpdated tags
isCompletedbooleanNoCompletion state

Response

json
{
  "task": { "id": "uuid", "name": "Updated name", "isCompleted": true }
}

DELETE /api/workbench/tasks/:id

Delete a task.

Response

json
{
  "ok": true
}

Todos

GET /api/workbench/todos

List all workbench todos, sorted alphabetically. Todos are aggregated from both the database-backed todo data service and the runtime task system, de-duplicated by name.

Response

json
{
  "todos": [
    {
      "id": "uuid",
      "name": "Review logs",
      "description": "Check for errors",
      "isCompleted": false,
      "priority": 1,
      "isUrgent": false,
      "type": "task"
    }
  ]
}

POST /api/workbench/todos

Create or update a to-do item. When the todo data service plugin is available, the todo is persisted to the database first, falling back to the runtime task system on failure.

Request Body

FieldTypeRequiredDescription
namestringYesTodo name
descriptionstringNoTodo description
prioritynumberNoPriority level
isUrgentbooleanNoUrgency flag
typestringNoTodo type (default task)
isCompletedbooleanNoInitial completion state
tagsstring[]NoAdditional tags

Response (201)

json
{
  "todo": {
    "id": "uuid",
    "name": "New todo",
    "isCompleted": false,
    "priority": null,
    "isUrgent": false,
    "type": "task"
  }
}

VFS Projects

Workbench VFS projects are isolated virtual filesystems for generated apps, applets, and plugins. The VFS enforces traversal rejection, symlink rejection, project quota, max-file quota, snapshots, diff, and rollback. It is the local storage layer used by mobile-safe applets and by generated TypeScript plugins.

POST /api/workbench/vfs/projects

Create or open a VFS project.

json
{ "projectId": "demo-app" }

Responses expose virtual project metadata only. Host filesystem roots, snapshot roots, and compiled plugin disk paths are intentionally redacted from the public Workbench API.

GET/PUT/DELETE /api/workbench/vfs/projects/:id/file

GET and DELETE take a path query parameter. GET accepts encoding=utf-8|base64. PUT takes:

json
{
  "path": "src/plugin.ts",
  "content": "export default { name: 'demo' };",
  "encoding": "utf-8"
}

Snapshots, Diffs, Rollback

Create snapshots before risky generated-code edits:

json
{ "note": "before agent edit" }

Diff current files against a snapshot:

text
GET /api/workbench/vfs/projects/demo-app/diff?snapshotId=<snapshot-id>

Rollback:

json
{ "snapshotId": "<snapshot-id>" }

Compile And Load Plugins

Generated TypeScript plugins can be compiled and loaded from the VFS:

json
{
  "entry": "src/plugin.ts",
  "outFile": "dist/plugin.js",
  "format": "esm",
  "target": "node20"
}
json
{
  "entry": "src/plugin.ts",
  "compileFirst": true
}

Promote To Cloud

Use this route when a local Workbench VFS project needs full Claude, Codex, or OpenCode execution in an Eliza Cloud coding container.

text
POST /api/workbench/vfs/projects/demo-app/promote-to-cloud
json
{
  "snapshotId": "snapshot-id",
  "name": "Demo app",
  "description": "Generated app workspace",
  "preferredAgent": "codex",
  "workspacePath": "/workspace/demo-app",
  "branchName": "agent/demo-app"
}

The agent backend exports the requested snapshot, packages files with encoding=utf-8|base64, and forwards the bundle to @elizaos/plugin-elizacloud through the CLOUD_CONTAINER service. Use the returned data.source when starting a Cloud coding container; the Cloud control plane hydrates those files into the mounted workspace volume before Claude, Codex, or OpenCode starts.

Response (202)

json
{
  "success": true,
  "data": {
    "promotionId": "promotion-id",
    "status": "accepted",
    "source": {
      "sourceKind": "project",
      "projectId": "demo-app",
      "snapshotId": "snapshot-id"
    },
    "workspacePath": "/workspace/demo-app",
    "createdAt": "2026-05-11T16:00:00.000Z"
  }
}

The route fails closed. If Cloud auth is missing, the CLOUD_CONTAINER service is unavailable, or the Cloud control-plane endpoint is not deployed, the server returns an error such as 503 instead of returning a fake successful stub.

Common Error Codes

StatusCodeDescription
400INVALID_REQUESTRequest body is malformed or missing required fields
401UNAUTHORIZEDMissing or invalid authentication token
404NOT_FOUNDRequested resource does not exist
404TASK_NOT_FOUNDTask with specified ID does not exist
400EMPTY_NAMETask or todo name cannot be empty
500INTERNAL_ERRORUnexpected server error