curl --request POST \
--url https://api.example.com/api/crew-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"crew_config": {
"agents": [
{
"role": "<string>",
"goal": "<string>",
"backstory": "<string>",
"id": "<string>",
"verbose": false,
"allow_delegation": false,
"tools": [
"<string>"
],
"tool_categories": [
"<string>"
],
"use_default_mcps": true
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"tools": [
"<string>"
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential"
},
"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"
payload = {
"name": "<string>",
"crew_config": {
"agents": [
{
"role": "<string>",
"goal": "<string>",
"backstory": "<string>",
"id": "<string>",
"verbose": False,
"allow_delegation": False,
"tools": ["<string>"],
"tool_categories": ["<string>"],
"use_default_mcps": True
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"tools": ["<string>"]
}
],
"id": "<string>",
"verbose": False,
"process": "sequential"
},
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
crew_config: {
agents: [
{
role: '<string>',
goal: '<string>',
backstory: '<string>',
id: '<string>',
verbose: false,
allow_delegation: false,
tools: ['<string>'],
tool_categories: ['<string>'],
use_default_mcps: true
}
],
tasks: [
{
description: '<string>',
agent_index: 0,
expected_output: '',
tools: ['<string>']
}
],
id: '<string>',
verbose: false,
process: 'sequential'
},
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', 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",
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>',
'crew_config' => [
'agents' => [
[
'role' => '<string>',
'goal' => '<string>',
'backstory' => '<string>',
'id' => '<string>',
'verbose' => false,
'allow_delegation' => false,
'tools' => [
'<string>'
],
'tool_categories' => [
'<string>'
],
'use_default_mcps' => true
]
],
'tasks' => [
[
'description' => '<string>',
'agent_index' => 0,
'expected_output' => '',
'tools' => [
'<string>'
]
]
],
'id' => '<string>',
'verbose' => false,
'process' => 'sequential'
],
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"role\": \"<string>\",\n \"goal\": \"<string>\",\n \"backstory\": \"<string>\",\n \"id\": \"<string>\",\n \"verbose\": false,\n \"allow_delegation\": false,\n \"tools\": [\n \"<string>\"\n ],\n \"tool_categories\": [\n \"<string>\"\n ],\n \"use_default_mcps\": true\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\"\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("POST", 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.post("https://api.example.com/api/crew-templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"role\": \"<string>\",\n \"goal\": \"<string>\",\n \"backstory\": \"<string>\",\n \"id\": \"<string>\",\n \"verbose\": false,\n \"allow_delegation\": false,\n \"tools\": [\n \"<string>\"\n ],\n \"tool_categories\": [\n \"<string>\"\n ],\n \"use_default_mcps\": true\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\"\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")
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"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"role\": \"<string>\",\n \"goal\": \"<string>\",\n \"backstory\": \"<string>\",\n \"id\": \"<string>\",\n \"verbose\": false,\n \"allow_delegation\": false,\n \"tools\": [\n \"<string>\"\n ],\n \"tool_categories\": [\n \"<string>\"\n ],\n \"use_default_mcps\": true\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\"\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": [
{
"role": "<string>",
"goal": "<string>",
"backstory": "<string>",
"id": "<string>",
"verbose": false,
"allow_delegation": false,
"tools": [
"<string>"
],
"tool_categories": [
"<string>"
],
"use_default_mcps": true
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"tools": [
"<string>"
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential"
},
"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": {}
}
],
"lint_warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create template
Create a new crew template.
curl --request POST \
--url https://api.example.com/api/crew-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"crew_config": {
"agents": [
{
"role": "<string>",
"goal": "<string>",
"backstory": "<string>",
"id": "<string>",
"verbose": false,
"allow_delegation": false,
"tools": [
"<string>"
],
"tool_categories": [
"<string>"
],
"use_default_mcps": true
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"tools": [
"<string>"
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential"
},
"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"
payload = {
"name": "<string>",
"crew_config": {
"agents": [
{
"role": "<string>",
"goal": "<string>",
"backstory": "<string>",
"id": "<string>",
"verbose": False,
"allow_delegation": False,
"tools": ["<string>"],
"tool_categories": ["<string>"],
"use_default_mcps": True
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"tools": ["<string>"]
}
],
"id": "<string>",
"verbose": False,
"process": "sequential"
},
"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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
crew_config: {
agents: [
{
role: '<string>',
goal: '<string>',
backstory: '<string>',
id: '<string>',
verbose: false,
allow_delegation: false,
tools: ['<string>'],
tool_categories: ['<string>'],
use_default_mcps: true
}
],
tasks: [
{
description: '<string>',
agent_index: 0,
expected_output: '',
tools: ['<string>']
}
],
id: '<string>',
verbose: false,
process: 'sequential'
},
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', 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",
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>',
'crew_config' => [
'agents' => [
[
'role' => '<string>',
'goal' => '<string>',
'backstory' => '<string>',
'id' => '<string>',
'verbose' => false,
'allow_delegation' => false,
'tools' => [
'<string>'
],
'tool_categories' => [
'<string>'
],
'use_default_mcps' => true
]
],
'tasks' => [
[
'description' => '<string>',
'agent_index' => 0,
'expected_output' => '',
'tools' => [
'<string>'
]
]
],
'id' => '<string>',
'verbose' => false,
'process' => 'sequential'
],
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"role\": \"<string>\",\n \"goal\": \"<string>\",\n \"backstory\": \"<string>\",\n \"id\": \"<string>\",\n \"verbose\": false,\n \"allow_delegation\": false,\n \"tools\": [\n \"<string>\"\n ],\n \"tool_categories\": [\n \"<string>\"\n ],\n \"use_default_mcps\": true\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\"\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("POST", 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.post("https://api.example.com/api/crew-templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"role\": \"<string>\",\n \"goal\": \"<string>\",\n \"backstory\": \"<string>\",\n \"id\": \"<string>\",\n \"verbose\": false,\n \"allow_delegation\": false,\n \"tools\": [\n \"<string>\"\n ],\n \"tool_categories\": [\n \"<string>\"\n ],\n \"use_default_mcps\": true\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\"\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")
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"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"crew_config\": {\n \"agents\": [\n {\n \"role\": \"<string>\",\n \"goal\": \"<string>\",\n \"backstory\": \"<string>\",\n \"id\": \"<string>\",\n \"verbose\": false,\n \"allow_delegation\": false,\n \"tools\": [\n \"<string>\"\n ],\n \"tool_categories\": [\n \"<string>\"\n ],\n \"use_default_mcps\": true\n }\n ],\n \"tasks\": [\n {\n \"description\": \"<string>\",\n \"agent_index\": 0,\n \"expected_output\": \"\",\n \"tools\": [\n \"<string>\"\n ]\n }\n ],\n \"id\": \"<string>\",\n \"verbose\": false,\n \"process\": \"sequential\"\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": [
{
"role": "<string>",
"goal": "<string>",
"backstory": "<string>",
"id": "<string>",
"verbose": false,
"allow_delegation": false,
"tools": [
"<string>"
],
"tool_categories": [
"<string>"
],
"use_default_mcps": true
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"tools": [
"<string>"
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential"
},
"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": {}
}
],
"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.
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.
Configuration model for a CrewAI crew with agents and tasks.
Show child attributes
Show child attributes
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?

