Skip to main content
POST
/
tasks
Create Task
curl --request POST \
  --url https://api.example.com/tasks \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "<string>",
  "agent_name": "<string>",
  "branch": "<string>",
  "filesystem_id": "<string>",
  "name": "<string>",
  "params": {},
  "project_id": "<string>"
}
'
{
  "filesystem_id": "<string>",
  "id": "<string>",
  "namespace_id": "<string>",
  "agents": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "id": "<string>",
      "name": "<string>",
      "namespace_id": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "agent_input_type": "text",
      "registered_at": "2023-11-07T05:31:56Z",
      "registration_metadata": {},
      "status": "ACTIVE",
      "status_reason": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "created_version_id": "<string>",
  "current_version_id": "<string>",
  "name": "<string>",
  "params": {},
  "status": "IDLE",
  "status_reason": "<string>",
  "task_metadata": {},
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.terminaluse.com/llms.txt

Use this file to discover all available pages before exploring further.

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

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