Skip to content
Dashboard

Start task (async)

client.agent.tasks.start(TaskStartParams { agent_type, environment_id, instruction, 8 more } body, RequestOptionsoptions?): TaskStartResponse { status, task_id }
POST/agent/tasks

Starts an agent task and returns a task_id immediately.

ParametersExpand Collapse
body: TaskStartParams { agent_type, environment_id, instruction, 8 more }
agent_type?: string
environment_id?: string
instruction?: string
kind?: "desktop" | "browser"
One of the following:
"desktop"
"browser"
max_steps?: number
model?: string
persistent?: boolean
screenshot_mode?: "url" | "base64"
One of the following:
"url"
"base64"
temperature?: number
viewport_height?: number
viewport_width?: number
ReturnsExpand Collapse
TaskStartResponse { status, task_id }
status?: string
task_id?: string

Start task (async)

import Lightcone from '@tzafon/lightcone';

const client = new Lightcone({
  apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted
});

const response = await client.agent.tasks.start();

console.log(response.task_id);
{
  "status": "status",
  "task_id": "task_id"
}
Returns Examples
{
  "status": "status",
  "task_id": "task_id"
}