curl --request POST \
--url http://localhost:3000/api/v1/tasks/automations/add \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent": "<string>",
"checkpoint": "<string>",
"detached": true,
"disabled": true,
"filter": "<string>",
"freshCheckpoint": true,
"freshReportEvents": true,
"freshReportTo": true,
"freshWorktree": true,
"input": [
"<string>"
],
"instructions": "<string>",
"on": "<string>",
"priority": "<string>",
"profile": "<string>",
"reportEvents": "<string>",
"reportTo": "<string>",
"session": "<string>",
"title": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/tasks/automations/add"
payload = {
"name": "<string>",
"agent": "<string>",
"checkpoint": "<string>",
"detached": True,
"disabled": True,
"filter": "<string>",
"freshCheckpoint": True,
"freshReportEvents": True,
"freshReportTo": True,
"freshWorktree": True,
"input": ["<string>"],
"instructions": "<string>",
"on": "<string>",
"priority": "<string>",
"profile": "<string>",
"reportEvents": "<string>",
"reportTo": "<string>",
"session": "<string>",
"title": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
agent: '<string>',
checkpoint: '<string>',
detached: true,
disabled: true,
filter: '<string>',
freshCheckpoint: true,
freshReportEvents: true,
freshReportTo: true,
freshWorktree: true,
input: ['<string>'],
instructions: '<string>',
on: '<string>',
priority: '<string>',
profile: '<string>',
reportEvents: '<string>',
reportTo: '<string>',
session: '<string>',
title: '<string>'
})
};
fetch('http://localhost:3000/api/v1/tasks/automations/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/tasks/automations/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 => json_encode([
'name' => '<string>',
'agent' => '<string>',
'checkpoint' => '<string>',
'detached' => true,
'disabled' => true,
'filter' => '<string>',
'freshCheckpoint' => true,
'freshReportEvents' => true,
'freshReportTo' => true,
'freshWorktree' => true,
'input' => [
'<string>'
],
'instructions' => '<string>',
'on' => '<string>',
'priority' => '<string>',
'profile' => '<string>',
'reportEvents' => '<string>',
'reportTo' => '<string>',
'session' => '<string>',
'title' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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 := "http://localhost:3000/api/v1/tasks/automations/add"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agent\": \"<string>\",\n \"checkpoint\": \"<string>\",\n \"detached\": true,\n \"disabled\": true,\n \"filter\": \"<string>\",\n \"freshCheckpoint\": true,\n \"freshReportEvents\": true,\n \"freshReportTo\": true,\n \"freshWorktree\": true,\n \"input\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"on\": \"<string>\",\n \"priority\": \"<string>\",\n \"profile\": \"<string>\",\n \"reportEvents\": \"<string>\",\n \"reportTo\": \"<string>\",\n \"session\": \"<string>\",\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/tasks/automations/add")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agent\": \"<string>\",\n \"checkpoint\": \"<string>\",\n \"detached\": true,\n \"disabled\": true,\n \"filter\": \"<string>\",\n \"freshCheckpoint\": true,\n \"freshReportEvents\": true,\n \"freshReportTo\": true,\n \"freshWorktree\": true,\n \"input\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"on\": \"<string>\",\n \"priority\": \"<string>\",\n \"profile\": \"<string>\",\n \"reportEvents\": \"<string>\",\n \"reportTo\": \"<string>\",\n \"session\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/tasks/automations/add")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"agent\": \"<string>\",\n \"checkpoint\": \"<string>\",\n \"detached\": true,\n \"disabled\": true,\n \"filter\": \"<string>\",\n \"freshCheckpoint\": true,\n \"freshReportEvents\": true,\n \"freshReportTo\": true,\n \"freshWorktree\": true,\n \"input\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"on\": \"<string>\",\n \"priority\": \"<string>\",\n \"profile\": \"<string>\",\n \"reportEvents\": \"<string>\",\n \"reportTo\": \"<string>\",\n \"session\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Create a new task automation
curl --request POST \
--url http://localhost:3000/api/v1/tasks/automations/add \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent": "<string>",
"checkpoint": "<string>",
"detached": true,
"disabled": true,
"filter": "<string>",
"freshCheckpoint": true,
"freshReportEvents": true,
"freshReportTo": true,
"freshWorktree": true,
"input": [
"<string>"
],
"instructions": "<string>",
"on": "<string>",
"priority": "<string>",
"profile": "<string>",
"reportEvents": "<string>",
"reportTo": "<string>",
"session": "<string>",
"title": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/tasks/automations/add"
payload = {
"name": "<string>",
"agent": "<string>",
"checkpoint": "<string>",
"detached": True,
"disabled": True,
"filter": "<string>",
"freshCheckpoint": True,
"freshReportEvents": True,
"freshReportTo": True,
"freshWorktree": True,
"input": ["<string>"],
"instructions": "<string>",
"on": "<string>",
"priority": "<string>",
"profile": "<string>",
"reportEvents": "<string>",
"reportTo": "<string>",
"session": "<string>",
"title": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
agent: '<string>',
checkpoint: '<string>',
detached: true,
disabled: true,
filter: '<string>',
freshCheckpoint: true,
freshReportEvents: true,
freshReportTo: true,
freshWorktree: true,
input: ['<string>'],
instructions: '<string>',
on: '<string>',
priority: '<string>',
profile: '<string>',
reportEvents: '<string>',
reportTo: '<string>',
session: '<string>',
title: '<string>'
})
};
fetch('http://localhost:3000/api/v1/tasks/automations/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/tasks/automations/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 => json_encode([
'name' => '<string>',
'agent' => '<string>',
'checkpoint' => '<string>',
'detached' => true,
'disabled' => true,
'filter' => '<string>',
'freshCheckpoint' => true,
'freshReportEvents' => true,
'freshReportTo' => true,
'freshWorktree' => true,
'input' => [
'<string>'
],
'instructions' => '<string>',
'on' => '<string>',
'priority' => '<string>',
'profile' => '<string>',
'reportEvents' => '<string>',
'reportTo' => '<string>',
'session' => '<string>',
'title' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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 := "http://localhost:3000/api/v1/tasks/automations/add"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agent\": \"<string>\",\n \"checkpoint\": \"<string>\",\n \"detached\": true,\n \"disabled\": true,\n \"filter\": \"<string>\",\n \"freshCheckpoint\": true,\n \"freshReportEvents\": true,\n \"freshReportTo\": true,\n \"freshWorktree\": true,\n \"input\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"on\": \"<string>\",\n \"priority\": \"<string>\",\n \"profile\": \"<string>\",\n \"reportEvents\": \"<string>\",\n \"reportTo\": \"<string>\",\n \"session\": \"<string>\",\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/tasks/automations/add")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agent\": \"<string>\",\n \"checkpoint\": \"<string>\",\n \"detached\": true,\n \"disabled\": true,\n \"filter\": \"<string>\",\n \"freshCheckpoint\": true,\n \"freshReportEvents\": true,\n \"freshReportTo\": true,\n \"freshWorktree\": true,\n \"input\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"on\": \"<string>\",\n \"priority\": \"<string>\",\n \"profile\": \"<string>\",\n \"reportEvents\": \"<string>\",\n \"reportTo\": \"<string>\",\n \"session\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/tasks/automations/add")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"agent\": \"<string>\",\n \"checkpoint\": \"<string>\",\n \"detached\": true,\n \"disabled\": true,\n \"filter\": \"<string>\",\n \"freshCheckpoint\": true,\n \"freshReportEvents\": true,\n \"freshReportTo\": true,\n \"freshWorktree\": true,\n \"input\": [\n \"<string>\"\n ],\n \"instructions\": \"<string>\",\n \"on\": \"<string>\",\n \"priority\": \"<string>\",\n \"profile\": \"<string>\",\n \"reportEvents\": \"<string>\",\n \"reportTo\": \"<string>\",\n \"session\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Body
Task automation name
Auto-dispatch follow-up tasks to this agent
Override follow-up checkpoint interval
Do not link the follow-up task as a child of the trigger task
Create the automation disabled
Optional filter expression on task event data
Do not inherit the trigger task checkpoint
Do not inherit the trigger task report events
Do not inherit the trigger task report target
Do not inherit the trigger task worktree
Profile input templates for the follow-up task
Follow-up task instructions template
Comma-separated events: task.blocked,task.done,task.failed,task.child.blocked,task.child.done,task.child.failed
low|normal|high|urgent (default: inherit trigger task)
Follow-up task profile (default: inherit trigger task profile)
Comma-separated report events: blocked,done,failed
Override follow-up report target session
Optional session name template for auto-dispatch
Follow-up task title template
Response
Success — no @Returns schema declared; payload shape is loose.
The response is of type object.