Skip to main content

POST /tasks

curl -X POST http://localhost:3001/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "Write a blog post about AI trends",
    "taskType": "one_shot",
    "approval": { "mode": "always" }
  }'

Body

FieldTypeRequiredDescription
goalstringWhat the task should accomplish
taskTypestringOptionalone_shot, recurring, continuous, triggered
scheduleobjectOptional{ interval: "2 days", count: 10 }
approvalobjectOptional{ mode: "first_n", firstN: 3 }

Response

{
  "id": "task_abc123",
  "goal": "Write a blog post about AI trends",
  "status": "planned",
  "taskType": "one_shot",
  "createdAt": 1740643200000
}
Tasks are typically created automatically by the agent engine when it detects a long_running intent. Use this endpoint for programmatic task creation.