Skip to main content
POST
/
initialize_task
curl -X POST "http://CONTROL_PLANE_IP:PORT/initialize_task" \
  -H "Content-Type: application/json" \
  -d '{
    "vm_id": "vm-abc123",
    "task_config": {
      "id": "task-001",
      "instruction": "Open the document and extract the sales data",
      "config": [
        {
          "type": "download",
          "parameters": {
            "url": "https://example.com/document.docx",
            "path": "/home/user/Documents/document.docx"
          }
        }
      ],
      "evaluator": {
        "type": "file_check",
        "expected": "/home/user/output.xlsx"
      }
    }
  }'
{
  "status": "success",
  "message": "Task initialized successfully",
  "vm_id": "vm-abc123"
}
Initializes a task in the specified desktop environment. Sets up the VM with the task configuration, including running initialization scripts to prepare the environment for the task.

Request Body

vm_id
string
required
VM identifier from /create_desktop
task_config
object
required
Task configuration object containing:
  • id (string): Unique task identifier
  • instruction (string): Task instructions for the agent
  • config (array): Initialization configuration steps
  • evaluator (object): Evaluation configuration

Response

status
string
Result status (success)
message
string
Status message
vm_id
string
VM identifier
curl -X POST "http://CONTROL_PLANE_IP:PORT/initialize_task" \
  -H "Content-Type: application/json" \
  -d '{
    "vm_id": "vm-abc123",
    "task_config": {
      "id": "task-001",
      "instruction": "Open the document and extract the sales data",
      "config": [
        {
          "type": "download",
          "parameters": {
            "url": "https://example.com/document.docx",
            "path": "/home/user/Documents/document.docx"
          }
        }
      ],
      "evaluator": {
        "type": "file_check",
        "expected": "/home/user/output.xlsx"
      }
    }
  }'
{
  "status": "success",
  "message": "Task initialized successfully",
  "vm_id": "vm-abc123"
}