Create an agent
curl --request POST \
--url https://api.statisfy.com/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructions": "<string>",
"name": "<string>",
"context": "global",
"description": "<string>",
"knowledge_bases": [
"<string>"
],
"max_tool_calls": 60,
"reasoning": "auto",
"skills": [
"<string>"
],
"status": "active",
"tools": [
{
"toolkit": "<string>",
"excluded": [
"<string>"
],
"guidance": "<string>",
"tools": "all"
}
]
}
'import requests
url = "https://api.statisfy.com/v1/agents"
payload = {
"instructions": "<string>",
"name": "<string>",
"context": "global",
"description": "<string>",
"knowledge_bases": ["<string>"],
"max_tool_calls": 60,
"reasoning": "auto",
"skills": ["<string>"],
"status": "active",
"tools": [
{
"toolkit": "<string>",
"excluded": ["<string>"],
"guidance": "<string>",
"tools": "all"
}
]
}
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({
instructions: '<string>',
name: '<string>',
context: 'global',
description: '<string>',
knowledge_bases: ['<string>'],
max_tool_calls: 60,
reasoning: 'auto',
skills: ['<string>'],
status: 'active',
tools: [
{
toolkit: '<string>',
excluded: ['<string>'],
guidance: '<string>',
tools: 'all'
}
]
})
};
fetch('https://api.statisfy.com/v1/agents', 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.statisfy.com/v1/agents",
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([
'instructions' => '<string>',
'name' => '<string>',
'context' => 'global',
'description' => '<string>',
'knowledge_bases' => [
'<string>'
],
'max_tool_calls' => 60,
'reasoning' => 'auto',
'skills' => [
'<string>'
],
'status' => 'active',
'tools' => [
[
'toolkit' => '<string>',
'excluded' => [
'<string>'
],
'guidance' => '<string>',
'tools' => 'all'
]
]
]),
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.statisfy.com/v1/agents"
payload := strings.NewReader("{\n \"instructions\": \"<string>\",\n \"name\": \"<string>\",\n \"context\": \"global\",\n \"description\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 60,\n \"reasoning\": \"auto\",\n \"skills\": [\n \"<string>\"\n ],\n \"status\": \"active\",\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\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.statisfy.com/v1/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructions\": \"<string>\",\n \"name\": \"<string>\",\n \"context\": \"global\",\n \"description\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 60,\n \"reasoning\": \"auto\",\n \"skills\": [\n \"<string>\"\n ],\n \"status\": \"active\",\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/agents")
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 \"instructions\": \"<string>\",\n \"name\": \"<string>\",\n \"context\": \"global\",\n \"description\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 60,\n \"reasoning\": \"auto\",\n \"skills\": [\n \"<string>\"\n ],\n \"status\": \"active\",\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"context": "global",
"created_at": "<string>",
"created_by": "<string>",
"customized": true,
"description": "<string>",
"id": "<string>",
"instructions": "<string>",
"knowledge_bases": [
"<string>"
],
"max_tool_calls": 123,
"name": "<string>",
"reasoning": "auto",
"skills": [
"<string>"
],
"source": "statisfy",
"status": "draft",
"tools": [
{
"excluded": [
"<string>"
],
"guidance": "<string>",
"toolkit": "<string>",
"tools": "all"
}
],
"updated_at": "<string>"
}agents
Create an agent
Creates a workspace agent from its name and instructions, with the toolkits, skills and knowledge bases it may use. It is active unless status=draft. Needs agent_studio:write; a digital worker’s own key can’t. Answers with the agent as GET /v1/agents/ shows it. Skills, toolkits, tools and knowledge bases are checked: one the workspace can’t use is a 422. An agent is a custom agent from Agent Studio’s Agents tab: instructions it follows, and the toolkits, skills and knowledge bases it may use. source says whether Statisfy ships it or the workspace built it.
POST
/
v1
/
agents
Create an agent
curl --request POST \
--url https://api.statisfy.com/v1/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructions": "<string>",
"name": "<string>",
"context": "global",
"description": "<string>",
"knowledge_bases": [
"<string>"
],
"max_tool_calls": 60,
"reasoning": "auto",
"skills": [
"<string>"
],
"status": "active",
"tools": [
{
"toolkit": "<string>",
"excluded": [
"<string>"
],
"guidance": "<string>",
"tools": "all"
}
]
}
'import requests
url = "https://api.statisfy.com/v1/agents"
payload = {
"instructions": "<string>",
"name": "<string>",
"context": "global",
"description": "<string>",
"knowledge_bases": ["<string>"],
"max_tool_calls": 60,
"reasoning": "auto",
"skills": ["<string>"],
"status": "active",
"tools": [
{
"toolkit": "<string>",
"excluded": ["<string>"],
"guidance": "<string>",
"tools": "all"
}
]
}
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({
instructions: '<string>',
name: '<string>',
context: 'global',
description: '<string>',
knowledge_bases: ['<string>'],
max_tool_calls: 60,
reasoning: 'auto',
skills: ['<string>'],
status: 'active',
tools: [
{
toolkit: '<string>',
excluded: ['<string>'],
guidance: '<string>',
tools: 'all'
}
]
})
};
fetch('https://api.statisfy.com/v1/agents', 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.statisfy.com/v1/agents",
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([
'instructions' => '<string>',
'name' => '<string>',
'context' => 'global',
'description' => '<string>',
'knowledge_bases' => [
'<string>'
],
'max_tool_calls' => 60,
'reasoning' => 'auto',
'skills' => [
'<string>'
],
'status' => 'active',
'tools' => [
[
'toolkit' => '<string>',
'excluded' => [
'<string>'
],
'guidance' => '<string>',
'tools' => 'all'
]
]
]),
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.statisfy.com/v1/agents"
payload := strings.NewReader("{\n \"instructions\": \"<string>\",\n \"name\": \"<string>\",\n \"context\": \"global\",\n \"description\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 60,\n \"reasoning\": \"auto\",\n \"skills\": [\n \"<string>\"\n ],\n \"status\": \"active\",\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\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.statisfy.com/v1/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructions\": \"<string>\",\n \"name\": \"<string>\",\n \"context\": \"global\",\n \"description\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 60,\n \"reasoning\": \"auto\",\n \"skills\": [\n \"<string>\"\n ],\n \"status\": \"active\",\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/agents")
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 \"instructions\": \"<string>\",\n \"name\": \"<string>\",\n \"context\": \"global\",\n \"description\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 60,\n \"reasoning\": \"auto\",\n \"skills\": [\n \"<string>\"\n ],\n \"status\": \"active\",\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"context": "global",
"created_at": "<string>",
"created_by": "<string>",
"customized": true,
"description": "<string>",
"id": "<string>",
"instructions": "<string>",
"knowledge_bases": [
"<string>"
],
"max_tool_calls": 123,
"name": "<string>",
"reasoning": "auto",
"skills": [
"<string>"
],
"source": "statisfy",
"status": "draft",
"tools": [
{
"excluded": [
"<string>"
],
"guidance": "<string>",
"toolkit": "<string>",
"tools": "all"
}
],
"updated_at": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
application/json
Response
201 - application/json
Successful Response
Was this page helpful?