curl --request PUT \
--url https://api.example.com/api/crew-templates/{template_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
}
},
"description": "",
"tags": [
"<string>"
],
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"is_shared": false
}
'import requests
url = "https://api.example.com/api/crew-templates/{template_id}"
payload = {
"name": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [123]
}
],
"id": "<string>",
"verbose": False,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": True,
"may_comment": False
}
},
"description": "",
"tags": ["<string>"],
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": True,
"default": "<unknown>",
"choices": ["<string>"],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": False,
"group": "<string>",
"show_if": {}
}
],
"is_shared": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
crew_config: {
agents: [
{
id: '<string>',
ref: {artifact_id: '<string>', version: '<string>'},
role: '',
goal: '',
backstory: ''
}
],
tasks: [{description: '<string>', agent_index: 0, expected_output: '', context: [123]}],
id: '<string>',
verbose: false,
process: 'sequential',
layout: {},
context_packs: [{artifact_id: '<string>', version: '<string>', token_budget: 101}],
repository: {
repos: [{artifact_id: '<string>', version: '<string>'}],
branch_prefix: 'nx1/',
max_files: 5,
max_lines: 200,
may_open_pr: true,
may_comment: false
}
},
description: '',
tags: ['<string>'],
variables: [
{
name: '<string>',
label: '<string>',
description: '',
type: 'string',
required: true,
default: '<unknown>',
choices: ['<string>'],
min_length: 123,
max_length: 123,
min_value: 123,
max_value: 123,
sensitive: false,
group: '<string>',
show_if: {}
}
],
is_shared: false
})
};
fetch('https://api.example.com/api/crew-templates/{template_id}', 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.example.com/api/crew-templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'crew_config' => [
'agents' => [
[
'id' => '<string>',
'ref' => [
'artifact_id' => '<string>',
'version' => '<string>'
],
'role' => '',
'goal' => '',
'backstory' => ''
]
],
'tasks' => [
[
'description' => '<string>',
'agent_index' => 0,
'expected_output' => '',
'context' => [
123
]
]
],
'id' => '<string>',
'verbose' => false,
'process' => 'sequential',
'layout' => [
],
'context_packs' => [
[
'artifact_id' => '<string>',
'version' => '<string>',
'token_budget' => 101
]
],
'repository' => [
'repos' => [
[
'artifact_id' => '<string>',
'version' => '<string>'
]
],
'branch_prefix' => 'nx1/',
'max_files' => 5,
'max_lines' => 200,
'may_open_pr' => true,
'may_comment' => false
]
],
'description' => '',
'tags' => [
'<string>'
],
'variables' => [
[
'name' => '<string>',
'label' => '<string>',
'description' => '',
'type' => 'string',
'required' => true,
'default' => '<unknown>',
'choices' => [
'<string>'
],
'min_length' => 123,
'max_length' => 123,
'min_value' => 123,
'max_value' => 123,
'sensitive' => false,
'group' => '<string>',
'show_if' => [
]
]
],
'is_shared' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.example.com/api/crew-templates/{template_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"id\": \"<string>\",\n \"ref\": {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"role\": \"\",\n \"goal\": \"\",\n \"backstory\": \"\"\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"context\": [\n 123\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\",\n \"layout\": {},\n \"context_packs\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\",\n \"token_budget\": 101\n }\n ],\n \"repository\": {\n \"repos\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"branch_prefix\": \"nx1/\",\n \"max_files\": 5,\n \"max_lines\": 200,\n \"may_open_pr\": true,\n \"may_comment\": false\n }\n },\n \"description\": \"\",\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"\",\n \"type\": \"string\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"choices\": [\n \"<string>\"\n ],\n \"min_length\": 123,\n \"max_length\": 123,\n \"min_value\": 123,\n \"max_value\": 123,\n \"sensitive\": false,\n \"group\": \"<string>\",\n \"show_if\": {}\n }\n ],\n \"is_shared\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.example.com/api/crew-templates/{template_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"id\": \"<string>\",\n \"ref\": {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"role\": \"\",\n \"goal\": \"\",\n \"backstory\": \"\"\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"context\": [\n 123\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\",\n \"layout\": {},\n \"context_packs\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\",\n \"token_budget\": 101\n }\n ],\n \"repository\": {\n \"repos\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"branch_prefix\": \"nx1/\",\n \"max_files\": 5,\n \"max_lines\": 200,\n \"may_open_pr\": true,\n \"may_comment\": false\n }\n },\n \"description\": \"\",\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"\",\n \"type\": \"string\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"choices\": [\n \"<string>\"\n ],\n \"min_length\": 123,\n \"max_length\": 123,\n \"min_value\": 123,\n \"max_value\": 123,\n \"sensitive\": false,\n \"group\": \"<string>\",\n \"show_if\": {}\n }\n ],\n \"is_shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/crew-templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"id\": \"<string>\",\n \"ref\": {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"role\": \"\",\n \"goal\": \"\",\n \"backstory\": \"\"\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"context\": [\n 123\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\",\n \"layout\": {},\n \"context_packs\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\",\n \"token_budget\": 101\n }\n ],\n \"repository\": {\n \"repos\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"branch_prefix\": \"nx1/\",\n \"max_files\": 5,\n \"max_lines\": 200,\n \"may_open_pr\": true,\n \"may_comment\": false\n }\n },\n \"description\": \"\",\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"\",\n \"type\": \"string\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"choices\": [\n \"<string>\"\n ],\n \"min_length\": 123,\n \"max_length\": 123,\n \"min_value\": 123,\n \"max_value\": 123,\n \"sensitive\": false,\n \"group\": \"<string>\",\n \"show_if\": {}\n }\n ],\n \"is_shared\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
}
},
"tags": [
"<string>"
],
"is_shared": true,
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"pins": [
{
"artifact_id": "<string>",
"kind": "<string>",
"name": "<string>",
"scope": "<string>",
"pinned_version": "<string>",
"agent_index": 123,
"status": "<string>",
"latest_approved_version": "<string>",
"update_available": false,
"blocked_reason": "<string>"
}
],
"lint_warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update template
Update a crew template. Only the owner can update.
curl --request PUT \
--url https://api.example.com/api/crew-templates/{template_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
}
},
"description": "",
"tags": [
"<string>"
],
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"is_shared": false
}
'import requests
url = "https://api.example.com/api/crew-templates/{template_id}"
payload = {
"name": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [123]
}
],
"id": "<string>",
"verbose": False,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": True,
"may_comment": False
}
},
"description": "",
"tags": ["<string>"],
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": True,
"default": "<unknown>",
"choices": ["<string>"],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": False,
"group": "<string>",
"show_if": {}
}
],
"is_shared": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
crew_config: {
agents: [
{
id: '<string>',
ref: {artifact_id: '<string>', version: '<string>'},
role: '',
goal: '',
backstory: ''
}
],
tasks: [{description: '<string>', agent_index: 0, expected_output: '', context: [123]}],
id: '<string>',
verbose: false,
process: 'sequential',
layout: {},
context_packs: [{artifact_id: '<string>', version: '<string>', token_budget: 101}],
repository: {
repos: [{artifact_id: '<string>', version: '<string>'}],
branch_prefix: 'nx1/',
max_files: 5,
max_lines: 200,
may_open_pr: true,
may_comment: false
}
},
description: '',
tags: ['<string>'],
variables: [
{
name: '<string>',
label: '<string>',
description: '',
type: 'string',
required: true,
default: '<unknown>',
choices: ['<string>'],
min_length: 123,
max_length: 123,
min_value: 123,
max_value: 123,
sensitive: false,
group: '<string>',
show_if: {}
}
],
is_shared: false
})
};
fetch('https://api.example.com/api/crew-templates/{template_id}', 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.example.com/api/crew-templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'crew_config' => [
'agents' => [
[
'id' => '<string>',
'ref' => [
'artifact_id' => '<string>',
'version' => '<string>'
],
'role' => '',
'goal' => '',
'backstory' => ''
]
],
'tasks' => [
[
'description' => '<string>',
'agent_index' => 0,
'expected_output' => '',
'context' => [
123
]
]
],
'id' => '<string>',
'verbose' => false,
'process' => 'sequential',
'layout' => [
],
'context_packs' => [
[
'artifact_id' => '<string>',
'version' => '<string>',
'token_budget' => 101
]
],
'repository' => [
'repos' => [
[
'artifact_id' => '<string>',
'version' => '<string>'
]
],
'branch_prefix' => 'nx1/',
'max_files' => 5,
'max_lines' => 200,
'may_open_pr' => true,
'may_comment' => false
]
],
'description' => '',
'tags' => [
'<string>'
],
'variables' => [
[
'name' => '<string>',
'label' => '<string>',
'description' => '',
'type' => 'string',
'required' => true,
'default' => '<unknown>',
'choices' => [
'<string>'
],
'min_length' => 123,
'max_length' => 123,
'min_value' => 123,
'max_value' => 123,
'sensitive' => false,
'group' => '<string>',
'show_if' => [
]
]
],
'is_shared' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.example.com/api/crew-templates/{template_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"id\": \"<string>\",\n \"ref\": {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"role\": \"\",\n \"goal\": \"\",\n \"backstory\": \"\"\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"context\": [\n 123\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\",\n \"layout\": {},\n \"context_packs\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\",\n \"token_budget\": 101\n }\n ],\n \"repository\": {\n \"repos\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"branch_prefix\": \"nx1/\",\n \"max_files\": 5,\n \"max_lines\": 200,\n \"may_open_pr\": true,\n \"may_comment\": false\n }\n },\n \"description\": \"\",\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"\",\n \"type\": \"string\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"choices\": [\n \"<string>\"\n ],\n \"min_length\": 123,\n \"max_length\": 123,\n \"min_value\": 123,\n \"max_value\": 123,\n \"sensitive\": false,\n \"group\": \"<string>\",\n \"show_if\": {}\n }\n ],\n \"is_shared\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.example.com/api/crew-templates/{template_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"id\": \"<string>\",\n \"ref\": {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"role\": \"\",\n \"goal\": \"\",\n \"backstory\": \"\"\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"context\": [\n 123\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\",\n \"layout\": {},\n \"context_packs\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\",\n \"token_budget\": 101\n }\n ],\n \"repository\": {\n \"repos\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"branch_prefix\": \"nx1/\",\n \"max_files\": 5,\n \"max_lines\": 200,\n \"may_open_pr\": true,\n \"may_comment\": false\n }\n },\n \"description\": \"\",\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"\",\n \"type\": \"string\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"choices\": [\n \"<string>\"\n ],\n \"min_length\": 123,\n \"max_length\": 123,\n \"min_value\": 123,\n \"max_value\": 123,\n \"sensitive\": false,\n \"group\": \"<string>\",\n \"show_if\": {}\n }\n ],\n \"is_shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/crew-templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"id\": \"<string>\",\n \"ref\": {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"role\": \"\",\n \"goal\": \"\",\n \"backstory\": \"\"\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"context\": [\n 123\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\",\n \"layout\": {},\n \"context_packs\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\",\n \"token_budget\": 101\n }\n ],\n \"repository\": {\n \"repos\": [\n {\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"branch_prefix\": \"nx1/\",\n \"max_files\": 5,\n \"max_lines\": 200,\n \"may_open_pr\": true,\n \"may_comment\": false\n }\n },\n \"description\": \"\",\n \"tags\": [\n \"<string>\"\n ],\n \"variables\": [\n {\n \"name\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"\",\n \"type\": \"string\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"choices\": [\n \"<string>\"\n ],\n \"min_length\": 123,\n \"max_length\": 123,\n \"min_value\": 123,\n \"max_value\": 123,\n \"sensitive\": false,\n \"group\": \"<string>\",\n \"show_if\": {}\n }\n ],\n \"is_shared\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
}
},
"tags": [
"<string>"
],
"is_shared": true,
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"pins": [
{
"artifact_id": "<string>",
"kind": "<string>",
"name": "<string>",
"scope": "<string>",
"pinned_version": "<string>",
"agent_index": 123,
"status": "<string>",
"latest_approved_version": "<string>",
"update_available": false,
"blocked_reason": "<string>"
}
],
"lint_warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
ID of the crew template.
Body
Request model for creating or updating a crew template.
Human-readable template name.
The full crew configuration to save.
Show child attributes
Show child attributes
Optional description.
Tags for categorization.
Declared inputs the template's tasks expect. Empty list preserves the legacy free-form task_input behavior.
Show child attributes
Show child attributes
Whether this template is visible to all users.
Response
Successful Response
Response model for a crew template returned from the API.
Unique ID for the template.
Human-readable name for the template.
What the template does.
The crew configuration saved in this template.
Show child attributes
Show child attributes
Tags for categorizing the template.
True if every user can see this template, false if only its creator can.
Keycloak username of whoever created the template.
Keycloak username of whoever last updated the template.
Creation time of the template. Represented as an ISO 8601 timestamp.
Last update time of the template. Represented as an ISO 8601 timestamp.
Declared inputs the template's tasks reference as {placeholders}. Empty for a free-form template.
Show child attributes
Show child attributes
The registry versions this template pins, with whether a newer approved version is available and anything that stops it running.
Show child attributes
Show child attributes
Authoring-time warnings about drift between the declared variables and the {placeholders} referenced by tasks. Surfaced on create or update. Usually empty on read.
Was this page helpful?

