Skip to content
Dashboard

Start task (async)

agent.tasks.start(TaskStartParams**kwargs) -> TaskStartResponse
POST/agent/tasks

Starts an agent task and returns a task_id immediately.

ParametersExpand Collapse
agent_type: Optional[str]
environment_id: Optional[str]
instruction: Optional[str]
kind: Optional[Literal["desktop", "browser"]]
One of the following:
"desktop"
"browser"
max_steps: Optional[int]
model: Optional[str]
persistent: Optional[bool]
screenshot_mode: Optional[Literal["url", "base64"]]
One of the following:
"url"
"base64"
temperature: Optional[float]
viewport_height: Optional[int]
viewport_width: Optional[int]
ReturnsExpand Collapse
class TaskStartResponse:
status: Optional[str]
task_id: Optional[str]

Start task (async)

import os
from tzafon import Lightcone

client = Lightcone(
    api_key=os.environ.get("TZAFON_API_KEY"),  # This is the default and can be omitted
)
response = client.agent.tasks.start()
print(response.task_id)
{
  "status": "status",
  "task_id": "task_id"
}
Returns Examples
{
  "status": "status",
  "task_id": "task_id"
}