curl --request POST \
--url https://api.recursion.labelbox.com/managed-agents/v1/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
}
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/automations"
payload = {
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"triggers": [
{
"enabled": True,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": ["<string>"]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agentVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
displayName: '<string>',
environmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
initialPrompt: {text: '<string>', type: 'literal'},
triggers: [
{
enabled: true,
schedule: {
cron: '<string>',
timezone: '<string>',
catchupWindowSeconds: 900,
endAt: '2023-11-07T05:31:56Z',
jitterSeconds: 10,
overlapPolicy: 'skip',
startAt: '2023-11-07T05:31:56Z'
},
triggerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'schedule'
}
],
metadata: {},
runDefaults: {
credentialRefs: [{credentialId: '<string>', vaultId: '<string>'}],
metadata: {},
resources: [{fileId: '<string>', mountPath: '<string>'}],
vaultIds: ['<string>']
}
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/automations', 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://api.recursion.labelbox.com/managed-agents/v1/automations",
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([
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agentVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'displayName' => '<string>',
'environmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'initialPrompt' => [
'text' => '<string>',
'type' => 'literal'
],
'triggers' => [
[
'enabled' => true,
'schedule' => [
'cron' => '<string>',
'timezone' => '<string>',
'catchupWindowSeconds' => 900,
'endAt' => '2023-11-07T05:31:56Z',
'jitterSeconds' => 10,
'overlapPolicy' => 'skip',
'startAt' => '2023-11-07T05:31:56Z'
],
'triggerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'type' => 'schedule'
]
],
'metadata' => [
],
'runDefaults' => [
'credentialRefs' => [
[
'credentialId' => '<string>',
'vaultId' => '<string>'
]
],
'metadata' => [
],
'resources' => [
[
'fileId' => '<string>',
'mountPath' => '<string>'
]
],
'vaultIds' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.recursion.labelbox.com/managed-agents/v1/automations"
payload := strings.NewReader("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {},\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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("https://api.recursion.labelbox.com/managed-agents/v1/automations")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {},\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {},\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"revision": 4503599627370496,
"runDefaults": {
"metadata": {},
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
},
"status": "paused",
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {}
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_trigger_id_in_use",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_event_source_invalid",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automations_unconfigured",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Create a paused canonical automation
Creates a complete automation aggregate in the paused state after validating the pinned agent version, environment, and every trigger source.
curl --request POST \
--url https://api.recursion.labelbox.com/managed-agents/v1/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
}
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/automations"
payload = {
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"triggers": [
{
"enabled": True,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"metadata": {},
"runDefaults": {
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"metadata": {},
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": ["<string>"]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agentVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
displayName: '<string>',
environmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
initialPrompt: {text: '<string>', type: 'literal'},
triggers: [
{
enabled: true,
schedule: {
cron: '<string>',
timezone: '<string>',
catchupWindowSeconds: 900,
endAt: '2023-11-07T05:31:56Z',
jitterSeconds: 10,
overlapPolicy: 'skip',
startAt: '2023-11-07T05:31:56Z'
},
triggerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
type: 'schedule'
}
],
metadata: {},
runDefaults: {
credentialRefs: [{credentialId: '<string>', vaultId: '<string>'}],
metadata: {},
resources: [{fileId: '<string>', mountPath: '<string>'}],
vaultIds: ['<string>']
}
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/automations', 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://api.recursion.labelbox.com/managed-agents/v1/automations",
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([
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agentVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'displayName' => '<string>',
'environmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'initialPrompt' => [
'text' => '<string>',
'type' => 'literal'
],
'triggers' => [
[
'enabled' => true,
'schedule' => [
'cron' => '<string>',
'timezone' => '<string>',
'catchupWindowSeconds' => 900,
'endAt' => '2023-11-07T05:31:56Z',
'jitterSeconds' => 10,
'overlapPolicy' => 'skip',
'startAt' => '2023-11-07T05:31:56Z'
],
'triggerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'type' => 'schedule'
]
],
'metadata' => [
],
'runDefaults' => [
'credentialRefs' => [
[
'credentialId' => '<string>',
'vaultId' => '<string>'
]
],
'metadata' => [
],
'resources' => [
[
'fileId' => '<string>',
'mountPath' => '<string>'
]
],
'vaultIds' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.recursion.labelbox.com/managed-agents/v1/automations"
payload := strings.NewReader("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {},\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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("https://api.recursion.labelbox.com/managed-agents/v1/automations")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {},\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agentVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"displayName\": \"<string>\",\n \"environmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"initialPrompt\": {\n \"text\": \"<string>\",\n \"type\": \"literal\"\n },\n \"triggers\": [\n {\n \"enabled\": true,\n \"schedule\": {\n \"cron\": \"<string>\",\n \"timezone\": \"<string>\",\n \"catchupWindowSeconds\": 900,\n \"endAt\": \"2023-11-07T05:31:56Z\",\n \"jitterSeconds\": 10,\n \"overlapPolicy\": \"skip\",\n \"startAt\": \"2023-11-07T05:31:56Z\"\n },\n \"triggerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"type\": \"schedule\"\n }\n ],\n \"metadata\": {},\n \"runDefaults\": {\n \"credentialRefs\": [\n {\n \"credentialId\": \"<string>\",\n \"vaultId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"resources\": [\n {\n \"fileId\": \"<string>\",\n \"mountPath\": \"<string>\"\n }\n ],\n \"vaultIds\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"automationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"initialPrompt": {
"text": "<string>",
"type": "literal"
},
"revision": 4503599627370496,
"runDefaults": {
"metadata": {},
"credentialRefs": [
{
"credentialId": "<string>",
"vaultId": "<string>"
}
],
"resources": [
{
"fileId": "<string>",
"mountPath": "<string>"
}
],
"vaultIds": [
"<string>"
]
},
"status": "paused",
"triggers": [
{
"enabled": true,
"schedule": {
"cron": "<string>",
"timezone": "<string>",
"catchupWindowSeconds": 900,
"endAt": "2023-11-07T05:31:56Z",
"jitterSeconds": 10,
"overlapPolicy": "skip",
"startAt": "2023-11-07T05:31:56Z"
},
"triggerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schedule"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"metadata": {}
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_trigger_id_in_use",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automation_event_source_invalid",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "automations_unconfigured",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Authorizations
A Recursion API key, created in the console under API keys.
Headers
Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. For the legacy automation-run route only, the historical fingerprint ignores top-level JSON formatting and object-key order and removes the retired top-level idempotency_key field. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry.
1 - 256^[!-~]+$Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.
1Body
Writable shape for creating a canonical automation.
Managed agent selected by this automation.
Immutable agent version pinned for all admitted runs.
Human-readable automation name.
1 - 256Execution environment selected for admitted sessions.
Prompt definition frozen onto admitted runs.
Show child attributes
Show child attributes
Complete trigger set for this automation aggregate.
20Closed schedule-trigger configuration.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Caller-owned string labels stored with the automation and returned on reads, such as a marker naming the system that manages it. Never copied to runs or sessions. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters without control characters. Omit for none.
Show child attributes
Show child attributes
Run defaults frozen onto admitted runs.
Show child attributes
Show child attributes
Response
Full round-trippable canonical automation aggregate.
Full round-trippable canonical automation aggregate.
Managed agent selected by this automation.
Immutable agent version pinned for all admitted runs.
Stable canonical automation identifier.
Time the automation was created.
Human-readable automation name.
Execution environment selected for admitted sessions.
Prompt definition frozen onto admitted runs.
Show child attributes
Show child attributes
Monotonic aggregate revision represented by the response ETag.
1 <= x <= 9007199254740991Run defaults frozen onto admitted runs.
Show child attributes
Show child attributes
Lifecycle state. New automations start paused.
paused, active Complete ordered trigger set.
Closed schedule-trigger configuration.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Time the aggregate was last changed.
Caller-owned string labels stored with the automation. Absent when none were set.
Show child attributes
Show child attributes