Add A New Task
curl --request POST \
--url https://app.agentcloud.dev/{resourceSlug}/forms/task/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: task.json' \
--data '{
"name": "<string>",
"description": "<string>",
"_id": "<string>",
"orgId": "<string>",
"teamId": "<string>",
"agentId": "<string>",
"expectedOutput": "<string>",
"toolIds": [
"<string>"
],
"asyncExecution": true,
"context": [
"<string>"
],
"outputJson": {},
"outputPydantic": {},
"outputFile": "<string>",
"icon": {
"id": {},
"filename": "<string>"
},
"requiresHumanInput": true,
"displayOnlyFinalOutput": true,
"hidden": true,
"formFields": [
{
"position": "<string>",
"name": "<string>",
"label": "<string>",
"description": "<string>",
"required": true,
"options": [
"<string>"
],
"tooltip": "<string>"
}
],
"isStructuredOutput": true
}'import requests
url = "https://app.agentcloud.dev/{resourceSlug}/forms/task/add"
payload = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "task.json"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'task.json'},
body: '{\n "name": "<string>",\n "description": "<string>",\n "_id": "<string>",\n "orgId": "<string>",\n "teamId": "<string>",\n "agentId": "<string>",\n "expectedOutput": "<string>",\n "toolIds": [\n "<string>"\n ],\n "asyncExecution": true,\n "context": [\n "<string>"\n ],\n "outputJson": {},\n "outputPydantic": {},\n "outputFile": "<string>",\n "icon": {\n "id": {},\n "filename": "<string>"\n },\n "requiresHumanInput": true,\n "displayOnlyFinalOutput": true,\n "hidden": true,\n "formFields": [\n {\n "position": "<string>",\n "name": "<string>",\n "label": "<string>",\n "description": "<string>",\n "required": true,\n "options": [\n "<string>"\n ],\n "tooltip": "<string>"\n }\n ],\n "isStructuredOutput": true\n}'
};
fetch('https://app.agentcloud.dev/{resourceSlug}/forms/task/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentcloud.dev/{resourceSlug}/forms/task/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: task.json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.agentcloud.dev/{resourceSlug}/forms/task/add"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "task.json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.agentcloud.dev/{resourceSlug}/forms/task/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "task.json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentcloud.dev/{resourceSlug}/forms/task/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'task.json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"redirect": "<string>"
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}Tasks
Add A New Task
Add a new task.
POST
/
{resourceSlug}
/
forms
/
task
/
add
Add A New Task
curl --request POST \
--url https://app.agentcloud.dev/{resourceSlug}/forms/task/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: task.json' \
--data '{
"name": "<string>",
"description": "<string>",
"_id": "<string>",
"orgId": "<string>",
"teamId": "<string>",
"agentId": "<string>",
"expectedOutput": "<string>",
"toolIds": [
"<string>"
],
"asyncExecution": true,
"context": [
"<string>"
],
"outputJson": {},
"outputPydantic": {},
"outputFile": "<string>",
"icon": {
"id": {},
"filename": "<string>"
},
"requiresHumanInput": true,
"displayOnlyFinalOutput": true,
"hidden": true,
"formFields": [
{
"position": "<string>",
"name": "<string>",
"label": "<string>",
"description": "<string>",
"required": true,
"options": [
"<string>"
],
"tooltip": "<string>"
}
],
"isStructuredOutput": true
}'import requests
url = "https://app.agentcloud.dev/{resourceSlug}/forms/task/add"
payload = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "task.json"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'task.json'},
body: '{\n "name": "<string>",\n "description": "<string>",\n "_id": "<string>",\n "orgId": "<string>",\n "teamId": "<string>",\n "agentId": "<string>",\n "expectedOutput": "<string>",\n "toolIds": [\n "<string>"\n ],\n "asyncExecution": true,\n "context": [\n "<string>"\n ],\n "outputJson": {},\n "outputPydantic": {},\n "outputFile": "<string>",\n "icon": {\n "id": {},\n "filename": "<string>"\n },\n "requiresHumanInput": true,\n "displayOnlyFinalOutput": true,\n "hidden": true,\n "formFields": [\n {\n "position": "<string>",\n "name": "<string>",\n "label": "<string>",\n "description": "<string>",\n "required": true,\n "options": [\n "<string>"\n ],\n "tooltip": "<string>"\n }\n ],\n "isStructuredOutput": true\n}'
};
fetch('https://app.agentcloud.dev/{resourceSlug}/forms/task/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentcloud.dev/{resourceSlug}/forms/task/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: task.json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.agentcloud.dev/{resourceSlug}/forms/task/add"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "task.json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.agentcloud.dev/{resourceSlug}/forms/task/add")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "task.json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentcloud.dev/{resourceSlug}/forms/task/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'task.json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"_id\": \"<string>\",\n \"orgId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"agentId\": \"<string>\",\n \"expectedOutput\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"asyncExecution\": true,\n \"context\": [\n \"<string>\"\n ],\n \"outputJson\": {},\n \"outputPydantic\": {},\n \"outputFile\": \"<string>\",\n \"icon\": {\n \"id\": {},\n \"filename\": \"<string>\"\n },\n \"requiresHumanInput\": true,\n \"displayOnlyFinalOutput\": true,\n \"hidden\": true,\n \"formFields\": [\n {\n \"position\": \"<string>\",\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"required\": true,\n \"options\": [\n \"<string>\"\n ],\n \"tooltip\": \"<string>\"\n }\n ],\n \"isStructuredOutput\": true\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"redirect": "<string>"
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}Authorizations
Path Parameters
Body
task.json
Task object to be added with at minimum all required fields, _id must be ommited, this will be generated by the api and returned upon successful completion.
Represents a task within the system, including its configuration, expected output, and optional form fields.