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"
}
{
"error": "Desktop environment not found for VM: vm-abc123. Call /create_desktop first."
}
Control Plane
Initialize Task
Set up a task configuration in a VM environment
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"
}
{
"error": "Desktop environment not found for VM: vm-abc123. Call /create_desktop first."
}
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
Task configuration object containing:
id(string): Unique task identifierinstruction(string): Task instructions for the agentconfig(array): Initialization configuration stepsevaluator(object): Evaluation configuration
Response
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"
}
{
"error": "Desktop environment not found for VM: vm-abc123. Call /create_desktop first."
}