Skip to main content
POST
Create Task
To send messages to a running task, use sendEvent() after creation. The create() method initializes the task but does not accept message content directly.

Body

application/json

Request for POST /tasks

agent_id
string | null

Agent ID (provide this OR agent_name)

agent_name
string | null

Agent name as 'namespace/name' (provide this OR agent_id)

branch
string | null

Target branch for version routing

filesystem_id
string | null

Existing filesystem ID

name
string | null

Task name

params
Params · object | null

Task parameters

project_id
string | null

Project ID for new filesystem

Response

Successful Response

Task response model with optional related data based on relationships

filesystem_id
string
required
id
string
required
namespace_id
string
required
agents
Agent · object[] | null
created_at
string<date-time> | null
created_version_id
string | null
current_version_id
string | null
name
string | null
params
Task parameters · object
status
enum<string> | null
Available options:
IDLE,
CANCELED,
COMPLETED,
FAILED,
RUNNING,
TERMINATED,
TIMED_OUT,
DELETED
status_reason
string | null
task_metadata
Task metadata · object
updated_at
string<date-time> | null