POST
/
task
/
create
curl --request POST \
  --url 'http://localhost:2003/api/v1/task/create' \
  --header 'x-api-key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task": "Monitor a website for price changes",
    "agent": "BROWSER_AGENT",
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "form_input",
          "description": "Use this tool to ask information from the user",
          "parameters": {
            "type": "object",
            "properties": {
              "heading": {
                "type": "string",
                "description": "The heading of the form input"
              },
              "description": {
                "type": "string",
                "description": "The description of the form input"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Input field type"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label text"
                    }
                  }
                }
              }
            }
          }
        }
      }
    ]
  }'
{
  "success": true,
  "data": {
    "taskId": "task_123"
  }
}
curl --request POST \
  --url 'http://localhost:2003/api/v1/task/create' \
  --header 'x-api-key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task": "Monitor a website for price changes",
    "agent": "BROWSER_AGENT",
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "form_input",
          "description": "Use this tool to ask information from the user",
          "parameters": {
            "type": "object",
            "properties": {
              "heading": {
                "type": "string",
                "description": "The heading of the form input"
              },
              "description": {
                "type": "string",
                "description": "The description of the form input"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Input field type"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label text"
                    }
                  }
                }
              }
            }
          }
        }
      }
    ]
  }'
{
  "success": true,
  "data": {
    "taskId": "task_123"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
task
string
required

Natural language description of the task to be automated

Example:

"Monitor a website for price changes"

agent
string
default:BROWSER_AGENT

Agent to use for the task

tools
object[]

List of tools available to the agent

Response

200 - application/json
Successful response
success
boolean

Indicates if the request was successful

Example:

true

data
object
error
string

Error message if the request failed