Change an agent
curl --request PATCH \
--url https://api.statisfy.com/v1/agents/{agent_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"instructions": "<string>",
"knowledge_bases": [
"<string>"
],
"max_tool_calls": 100,
"name": "<string>",
"skills": [
"<string>"
],
"tools": [
{
"toolkit": "<string>",
"excluded": [
"<string>"
],
"guidance": "<string>",
"tools": "all"
}
]
}
'import requests
url = "https://api.statisfy.com/v1/agents/{agent_id}"
payload = {
"description": "<string>",
"instructions": "<string>",
"knowledge_bases": ["<string>"],
"max_tool_calls": 100,
"name": "<string>",
"skills": ["<string>"],
"tools": [
{
"toolkit": "<string>",
"excluded": ["<string>"],
"guidance": "<string>",
"tools": "all"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
instructions: '<string>',
knowledge_bases: ['<string>'],
max_tool_calls: 100,
name: '<string>',
skills: ['<string>'],
tools: [
{
toolkit: '<string>',
excluded: ['<string>'],
guidance: '<string>',
tools: 'all'
}
]
})
};
fetch('https://api.statisfy.com/v1/agents/{agent_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.statisfy.com/v1/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'instructions' => '<string>',
'knowledge_bases' => [
'<string>'
],
'max_tool_calls' => 100,
'name' => '<string>',
'skills' => [
'<string>'
],
'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/{agent_id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 100,\n \"name\": \"<string>\",\n \"skills\": [\n \"<string>\"\n ],\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 100,\n \"name\": \"<string>\",\n \"skills\": [\n \"<string>\"\n ],\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/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 100,\n \"name\": \"<string>\",\n \"skills\": [\n \"<string>\"\n ],\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
Change an agent
Changes what is sent and keeps what is left out; tools, skills and knowledge_bases each replace the whole list. A Statisfy agent can be changed too (POST /v1/agents//reset puts it back). Only skills being added are checked, so an agent keeps one that has since gone bad until it is taken off. 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.
PATCH
/
v1
/
agents
/
{agent_id}
Change an agent
curl --request PATCH \
--url https://api.statisfy.com/v1/agents/{agent_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"instructions": "<string>",
"knowledge_bases": [
"<string>"
],
"max_tool_calls": 100,
"name": "<string>",
"skills": [
"<string>"
],
"tools": [
{
"toolkit": "<string>",
"excluded": [
"<string>"
],
"guidance": "<string>",
"tools": "all"
}
]
}
'import requests
url = "https://api.statisfy.com/v1/agents/{agent_id}"
payload = {
"description": "<string>",
"instructions": "<string>",
"knowledge_bases": ["<string>"],
"max_tool_calls": 100,
"name": "<string>",
"skills": ["<string>"],
"tools": [
{
"toolkit": "<string>",
"excluded": ["<string>"],
"guidance": "<string>",
"tools": "all"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
instructions: '<string>',
knowledge_bases: ['<string>'],
max_tool_calls: 100,
name: '<string>',
skills: ['<string>'],
tools: [
{
toolkit: '<string>',
excluded: ['<string>'],
guidance: '<string>',
tools: 'all'
}
]
})
};
fetch('https://api.statisfy.com/v1/agents/{agent_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.statisfy.com/v1/agents/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'instructions' => '<string>',
'knowledge_bases' => [
'<string>'
],
'max_tool_calls' => 100,
'name' => '<string>',
'skills' => [
'<string>'
],
'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/{agent_id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 100,\n \"name\": \"<string>\",\n \"skills\": [\n \"<string>\"\n ],\n \"tools\": [\n {\n \"toolkit\": \"<string>\",\n \"excluded\": [\n \"<string>\"\n ],\n \"guidance\": \"<string>\",\n \"tools\": \"all\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/agents/{agent_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 100,\n \"name\": \"<string>\",\n \"skills\": [\n \"<string>\"\n ],\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/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"knowledge_bases\": [\n \"<string>\"\n ],\n \"max_tool_calls\": 100,\n \"name\": \"<string>\",\n \"skills\": [\n \"<string>\"\n ],\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
200 - application/json
Successful Response
Was this page helpful?