Skip to main content
POST
Create task
Create a task from a command prompt. No repository or branch is supplied — the agent picks the repo(s) at runtime from the workspace’s connected repos. Optional fields: userIntent sets the initial run type; agent pins a harness as a full <provider>/<model> id (a provider-only value is rejected); files attaches uploaded assets. Otherwise mode, model, and effort come from your routing configs — include a /trigger in command to select one. The response includes the created task plus its first queued job.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
command
string
required

Task description or instructions for the agent. Include a routing /trigger to select a model, mode, and effort config.

agent
string

Optional explicit harness. Must be a complete provider/model id (e.g. claude-code/sonnet, codex/gpt-5.4, open-code/openai/gpt-5.4); a provider-only value is rejected. Overrides routing for the task.

userIntent
enum<string>
default:SWE

Run type: SWE (implement directly), PLAN (produce a plan), GOAL (work toward a goal, tracked by the harness), ASK (Q&A mode), or DEV_ENVIRONMENT (dev environment setup).

Available options:
SWE,
PLAN,
GOAL,
ASK,
DEV_ENVIRONMENT
title
string

Optional task title (auto-generated if not provided).

files
object[]

Optional file attachments provided as UI message file parts.

Response

Task created

task
object
required
job
object
required