curl --request PATCH \
--url http://localhost:3000/api/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Agent",
"description": "An AI agent that helps customers with their inquiries",
"instructions": "You are a helpful customer support agent...",
"policy": "Refunds are only allowed within 30 days of purchase.",
"modelConfig": {
"model": "openai/gpt-4o",
"modelSettings": {
"temperature": 0.7
}
},
"voiceConfig": {
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI"
},
"memoryConfig": {
"enabled": true,
"lastMessages": 20
},
"metadata": {
"category": "support"
},
"knowledgeBaseConfig": {
"knowledgeBaseId": "550e8400-e29b-41d4-a716-446655440000",
"topK": 5,
"similarityThreshold": 0.7
},
"resolutionCriteria": [
{
"label": "Payment confirmed",
"description": "Customer confirms the payment date and amount"
}
]
}
'import requests
url = "http://localhost:3000/api/agents/{id}"
payload = {
"name": "Customer Support Agent",
"description": "An AI agent that helps customers with their inquiries",
"instructions": "You are a helpful customer support agent...",
"policy": "Refunds are only allowed within 30 days of purchase.",
"modelConfig": {
"model": "openai/gpt-4o",
"modelSettings": { "temperature": 0.7 }
},
"voiceConfig": {
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI"
},
"memoryConfig": {
"enabled": True,
"lastMessages": 20
},
"metadata": { "category": "support" },
"knowledgeBaseConfig": {
"knowledgeBaseId": "550e8400-e29b-41d4-a716-446655440000",
"topK": 5,
"similarityThreshold": 0.7
},
"resolutionCriteria": [
{
"label": "Payment confirmed",
"description": "Customer confirms the payment date and amount"
}
]
}
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({
name: 'Customer Support Agent',
description: 'An AI agent that helps customers with their inquiries',
instructions: 'You are a helpful customer support agent...',
policy: 'Refunds are only allowed within 30 days of purchase.',
modelConfig: {model: 'openai/gpt-4o', modelSettings: {temperature: 0.7}},
voiceConfig: {pipelineMode: 'batch', voiceId: 'EXAVITQdyfvLewQXW32eyLI'},
memoryConfig: {enabled: true, lastMessages: 20},
metadata: {category: 'support'},
knowledgeBaseConfig: {
knowledgeBaseId: '550e8400-e29b-41d4-a716-446655440000',
topK: 5,
similarityThreshold: 0.7
},
resolutionCriteria: [
{
label: 'Payment confirmed',
description: 'Customer confirms the payment date and amount'
}
]
})
};
fetch('http://localhost:3000/api/agents/{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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/agents/{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([
'name' => 'Customer Support Agent',
'description' => 'An AI agent that helps customers with their inquiries',
'instructions' => 'You are a helpful customer support agent...',
'policy' => 'Refunds are only allowed within 30 days of purchase.',
'modelConfig' => [
'model' => 'openai/gpt-4o',
'modelSettings' => [
'temperature' => 0.7
]
],
'voiceConfig' => [
'pipelineMode' => 'batch',
'voiceId' => 'EXAVITQdyfvLewQXW32eyLI'
],
'memoryConfig' => [
'enabled' => true,
'lastMessages' => 20
],
'metadata' => [
'category' => 'support'
],
'knowledgeBaseConfig' => [
'knowledgeBaseId' => '550e8400-e29b-41d4-a716-446655440000',
'topK' => 5,
'similarityThreshold' => 0.7
],
'resolutionCriteria' => [
[
'label' => 'Payment confirmed',
'description' => 'Customer confirms the payment date and amount'
]
]
]),
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 := "http://localhost:3000/api/agents/{id}"
payload := strings.NewReader("{\n \"name\": \"Customer Support Agent\",\n \"description\": \"An AI agent that helps customers with their inquiries\",\n \"instructions\": \"You are a helpful customer support agent...\",\n \"policy\": \"Refunds are only allowed within 30 days of purchase.\",\n \"modelConfig\": {\n \"model\": \"openai/gpt-4o\",\n \"modelSettings\": {\n \"temperature\": 0.7\n }\n },\n \"voiceConfig\": {\n \"pipelineMode\": \"batch\",\n \"voiceId\": \"EXAVITQdyfvLewQXW32eyLI\"\n },\n \"memoryConfig\": {\n \"enabled\": true,\n \"lastMessages\": 20\n },\n \"metadata\": {\n \"category\": \"support\"\n },\n \"knowledgeBaseConfig\": {\n \"knowledgeBaseId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"topK\": 5,\n \"similarityThreshold\": 0.7\n },\n \"resolutionCriteria\": [\n {\n \"label\": \"Payment confirmed\",\n \"description\": \"Customer confirms the payment date and amount\"\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("http://localhost:3000/api/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Agent\",\n \"description\": \"An AI agent that helps customers with their inquiries\",\n \"instructions\": \"You are a helpful customer support agent...\",\n \"policy\": \"Refunds are only allowed within 30 days of purchase.\",\n \"modelConfig\": {\n \"model\": \"openai/gpt-4o\",\n \"modelSettings\": {\n \"temperature\": 0.7\n }\n },\n \"voiceConfig\": {\n \"pipelineMode\": \"batch\",\n \"voiceId\": \"EXAVITQdyfvLewQXW32eyLI\"\n },\n \"memoryConfig\": {\n \"enabled\": true,\n \"lastMessages\": 20\n },\n \"metadata\": {\n \"category\": \"support\"\n },\n \"knowledgeBaseConfig\": {\n \"knowledgeBaseId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"topK\": 5,\n \"similarityThreshold\": 0.7\n },\n \"resolutionCriteria\": [\n {\n \"label\": \"Payment confirmed\",\n \"description\": \"Customer confirms the payment date and amount\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Agent\",\n \"description\": \"An AI agent that helps customers with their inquiries\",\n \"instructions\": \"You are a helpful customer support agent...\",\n \"policy\": \"Refunds are only allowed within 30 days of purchase.\",\n \"modelConfig\": {\n \"model\": \"openai/gpt-4o\",\n \"modelSettings\": {\n \"temperature\": 0.7\n }\n },\n \"voiceConfig\": {\n \"pipelineMode\": \"batch\",\n \"voiceId\": \"EXAVITQdyfvLewQXW32eyLI\"\n },\n \"memoryConfig\": {\n \"enabled\": true,\n \"lastMessages\": 20\n },\n \"metadata\": {\n \"category\": \"support\"\n },\n \"knowledgeBaseConfig\": {\n \"knowledgeBaseId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"topK\": 5,\n \"similarityThreshold\": 0.7\n },\n \"resolutionCriteria\": [\n {\n \"label\": \"Payment confirmed\",\n \"description\": \"Customer confirms the payment date and amount\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"name": "Customer Support Agent",
"instructions": "<string>",
"version": 123,
"modelConfig": {
"model": "openai/gpt-4o",
"modelSettings": {},
"providerOptions": {}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"policy": "<string>",
"voiceConfig": {
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI",
"stsProvider": "openai"
},
"memoryConfig": {
"enabled": true,
"lastMessages": 20,
"semanticRecall": false
},
"metadata": {},
"knowledgeBaseConfig": {},
"createdBy": "<string>"
}Update agent
curl --request PATCH \
--url http://localhost:3000/api/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Agent",
"description": "An AI agent that helps customers with their inquiries",
"instructions": "You are a helpful customer support agent...",
"policy": "Refunds are only allowed within 30 days of purchase.",
"modelConfig": {
"model": "openai/gpt-4o",
"modelSettings": {
"temperature": 0.7
}
},
"voiceConfig": {
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI"
},
"memoryConfig": {
"enabled": true,
"lastMessages": 20
},
"metadata": {
"category": "support"
},
"knowledgeBaseConfig": {
"knowledgeBaseId": "550e8400-e29b-41d4-a716-446655440000",
"topK": 5,
"similarityThreshold": 0.7
},
"resolutionCriteria": [
{
"label": "Payment confirmed",
"description": "Customer confirms the payment date and amount"
}
]
}
'import requests
url = "http://localhost:3000/api/agents/{id}"
payload = {
"name": "Customer Support Agent",
"description": "An AI agent that helps customers with their inquiries",
"instructions": "You are a helpful customer support agent...",
"policy": "Refunds are only allowed within 30 days of purchase.",
"modelConfig": {
"model": "openai/gpt-4o",
"modelSettings": { "temperature": 0.7 }
},
"voiceConfig": {
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI"
},
"memoryConfig": {
"enabled": True,
"lastMessages": 20
},
"metadata": { "category": "support" },
"knowledgeBaseConfig": {
"knowledgeBaseId": "550e8400-e29b-41d4-a716-446655440000",
"topK": 5,
"similarityThreshold": 0.7
},
"resolutionCriteria": [
{
"label": "Payment confirmed",
"description": "Customer confirms the payment date and amount"
}
]
}
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({
name: 'Customer Support Agent',
description: 'An AI agent that helps customers with their inquiries',
instructions: 'You are a helpful customer support agent...',
policy: 'Refunds are only allowed within 30 days of purchase.',
modelConfig: {model: 'openai/gpt-4o', modelSettings: {temperature: 0.7}},
voiceConfig: {pipelineMode: 'batch', voiceId: 'EXAVITQdyfvLewQXW32eyLI'},
memoryConfig: {enabled: true, lastMessages: 20},
metadata: {category: 'support'},
knowledgeBaseConfig: {
knowledgeBaseId: '550e8400-e29b-41d4-a716-446655440000',
topK: 5,
similarityThreshold: 0.7
},
resolutionCriteria: [
{
label: 'Payment confirmed',
description: 'Customer confirms the payment date and amount'
}
]
})
};
fetch('http://localhost:3000/api/agents/{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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/agents/{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([
'name' => 'Customer Support Agent',
'description' => 'An AI agent that helps customers with their inquiries',
'instructions' => 'You are a helpful customer support agent...',
'policy' => 'Refunds are only allowed within 30 days of purchase.',
'modelConfig' => [
'model' => 'openai/gpt-4o',
'modelSettings' => [
'temperature' => 0.7
]
],
'voiceConfig' => [
'pipelineMode' => 'batch',
'voiceId' => 'EXAVITQdyfvLewQXW32eyLI'
],
'memoryConfig' => [
'enabled' => true,
'lastMessages' => 20
],
'metadata' => [
'category' => 'support'
],
'knowledgeBaseConfig' => [
'knowledgeBaseId' => '550e8400-e29b-41d4-a716-446655440000',
'topK' => 5,
'similarityThreshold' => 0.7
],
'resolutionCriteria' => [
[
'label' => 'Payment confirmed',
'description' => 'Customer confirms the payment date and amount'
]
]
]),
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 := "http://localhost:3000/api/agents/{id}"
payload := strings.NewReader("{\n \"name\": \"Customer Support Agent\",\n \"description\": \"An AI agent that helps customers with their inquiries\",\n \"instructions\": \"You are a helpful customer support agent...\",\n \"policy\": \"Refunds are only allowed within 30 days of purchase.\",\n \"modelConfig\": {\n \"model\": \"openai/gpt-4o\",\n \"modelSettings\": {\n \"temperature\": 0.7\n }\n },\n \"voiceConfig\": {\n \"pipelineMode\": \"batch\",\n \"voiceId\": \"EXAVITQdyfvLewQXW32eyLI\"\n },\n \"memoryConfig\": {\n \"enabled\": true,\n \"lastMessages\": 20\n },\n \"metadata\": {\n \"category\": \"support\"\n },\n \"knowledgeBaseConfig\": {\n \"knowledgeBaseId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"topK\": 5,\n \"similarityThreshold\": 0.7\n },\n \"resolutionCriteria\": [\n {\n \"label\": \"Payment confirmed\",\n \"description\": \"Customer confirms the payment date and amount\"\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("http://localhost:3000/api/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Agent\",\n \"description\": \"An AI agent that helps customers with their inquiries\",\n \"instructions\": \"You are a helpful customer support agent...\",\n \"policy\": \"Refunds are only allowed within 30 days of purchase.\",\n \"modelConfig\": {\n \"model\": \"openai/gpt-4o\",\n \"modelSettings\": {\n \"temperature\": 0.7\n }\n },\n \"voiceConfig\": {\n \"pipelineMode\": \"batch\",\n \"voiceId\": \"EXAVITQdyfvLewQXW32eyLI\"\n },\n \"memoryConfig\": {\n \"enabled\": true,\n \"lastMessages\": 20\n },\n \"metadata\": {\n \"category\": \"support\"\n },\n \"knowledgeBaseConfig\": {\n \"knowledgeBaseId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"topK\": 5,\n \"similarityThreshold\": 0.7\n },\n \"resolutionCriteria\": [\n {\n \"label\": \"Payment confirmed\",\n \"description\": \"Customer confirms the payment date and amount\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Agent\",\n \"description\": \"An AI agent that helps customers with their inquiries\",\n \"instructions\": \"You are a helpful customer support agent...\",\n \"policy\": \"Refunds are only allowed within 30 days of purchase.\",\n \"modelConfig\": {\n \"model\": \"openai/gpt-4o\",\n \"modelSettings\": {\n \"temperature\": 0.7\n }\n },\n \"voiceConfig\": {\n \"pipelineMode\": \"batch\",\n \"voiceId\": \"EXAVITQdyfvLewQXW32eyLI\"\n },\n \"memoryConfig\": {\n \"enabled\": true,\n \"lastMessages\": 20\n },\n \"metadata\": {\n \"category\": \"support\"\n },\n \"knowledgeBaseConfig\": {\n \"knowledgeBaseId\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"topK\": 5,\n \"similarityThreshold\": 0.7\n },\n \"resolutionCriteria\": [\n {\n \"label\": \"Payment confirmed\",\n \"description\": \"Customer confirms the payment date and amount\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"name": "Customer Support Agent",
"instructions": "<string>",
"version": 123,
"modelConfig": {
"model": "openai/gpt-4o",
"modelSettings": {},
"providerOptions": {}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"policy": "<string>",
"voiceConfig": {
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI",
"stsProvider": "openai"
},
"memoryConfig": {
"enabled": true,
"lastMessages": 20,
"semanticRecall": false
},
"metadata": {},
"knowledgeBaseConfig": {},
"createdBy": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agent ID
Body
Agent name
1 - 128"Customer Support Agent"
Agent description
2000"An AI agent that helps customers with their inquiries"
Agent instructions (system prompt)
10000"You are a helpful customer support agent..."
Agent policy — business rules auto-injected into the prompt (set to null to clear)
10000"Refunds are only allowed within 30 days of purchase."
Model configuration
{
"model": "openai/gpt-4o",
"modelSettings": { "temperature": 0.7 }
}
Voice pipeline configuration
{
"pipelineMode": "batch",
"voiceId": "EXAVITQdyfvLewQXW32eyLI"
}
Memory configuration
{ "enabled": true, "lastMessages": 20 }
Additional metadata
{ "category": "support" }
Knowledge base configuration for RAG (set to null to detach)
{
"knowledgeBaseId": "550e8400-e29b-41d4-a716-446655440000",
"topK": 5,
"similarityThreshold": 0.7
}
Resolution criteria for evaluating conversation outcomes (max 5). Replaces all existing criteria when provided. Set to [] to clear.
Show child attributes
Show child attributes
[
{
"label": "Payment confirmed",
"description": "Customer confirms the payment date and amount"
}
]
Response
Agent updated successfully
Agent ID
Organization ID
Agent name
"Customer Support Agent"
Agent instructions
Agent status
draft, active, archived Agent version
Model configuration
Show child attributes
Show child attributes
Created at timestamp
Updated at timestamp
Agent description
Agent policy (business rules)
Voice configuration
Show child attributes
Show child attributes
Memory configuration
Show child attributes
Show child attributes
Additional metadata
Knowledge base configuration for RAG
Created by user ID