curl --request PATCH \
--url https://api.example.com/api/settings \
--header 'Content-Type: application/json' \
--header 'X-Session-API-Key: <api-key>' \
--data '
{
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"agent_settings_diff": {
"mcp_config": {}
},
"conversation_settings_diff": {},
"misc_settings_diff": {}
}
'import requests
url = "https://api.example.com/api/settings"
payload = {
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"agent_settings_diff": { "mcp_config": {} },
"conversation_settings_diff": {},
"misc_settings_diff": {}
}
headers = {
"X-Session-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Session-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active_agent_profile_id: '<string>',
active_meta_profile: '<string>',
active_profile: '<string>',
agent_settings_diff: {mcp_config: {}},
conversation_settings_diff: {},
misc_settings_diff: {}
})
};
fetch('https://api.example.com/api/settings', 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/settings",
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([
'active_agent_profile_id' => '<string>',
'active_meta_profile' => '<string>',
'active_profile' => '<string>',
'agent_settings_diff' => [
'mcp_config' => [
]
],
'conversation_settings_diff' => [
],
'misc_settings_diff' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Session-API-Key: <api-key>"
],
]);
$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/settings"
payload := strings.NewReader("{\n \"active_agent_profile_id\": \"<string>\",\n \"active_meta_profile\": \"<string>\",\n \"active_profile\": \"<string>\",\n \"agent_settings_diff\": {\n \"mcp_config\": {}\n },\n \"conversation_settings_diff\": {},\n \"misc_settings_diff\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Session-API-Key", "<api-key>")
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.example.com/api/settings")
.header("X-Session-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active_agent_profile_id\": \"<string>\",\n \"active_meta_profile\": \"<string>\",\n \"active_profile\": \"<string>\",\n \"agent_settings_diff\": {\n \"mcp_config\": {}\n },\n \"conversation_settings_diff\": {},\n \"misc_settings_diff\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Session-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active_agent_profile_id\": \"<string>\",\n \"active_meta_profile\": \"<string>\",\n \"active_profile\": \"<string>\",\n \"agent_settings_diff\": {\n \"mcp_config\": {}\n },\n \"conversation_settings_diff\": {},\n \"misc_settings_diff\": {}\n}"
response = http.request(request)
puts response.read_body{
"agent_settings": {
"mcp_config": {},
"agent_kind": "openhands",
"schema_version": 2
},
"conversation_settings": {},
"llm_api_key_is_set": true,
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"misc_settings": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Update Settings
curl --request PATCH \
--url https://api.example.com/api/settings \
--header 'Content-Type: application/json' \
--header 'X-Session-API-Key: <api-key>' \
--data '
{
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"agent_settings_diff": {
"mcp_config": {}
},
"conversation_settings_diff": {},
"misc_settings_diff": {}
}
'import requests
url = "https://api.example.com/api/settings"
payload = {
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"agent_settings_diff": { "mcp_config": {} },
"conversation_settings_diff": {},
"misc_settings_diff": {}
}
headers = {
"X-Session-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Session-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active_agent_profile_id: '<string>',
active_meta_profile: '<string>',
active_profile: '<string>',
agent_settings_diff: {mcp_config: {}},
conversation_settings_diff: {},
misc_settings_diff: {}
})
};
fetch('https://api.example.com/api/settings', 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/settings",
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([
'active_agent_profile_id' => '<string>',
'active_meta_profile' => '<string>',
'active_profile' => '<string>',
'agent_settings_diff' => [
'mcp_config' => [
]
],
'conversation_settings_diff' => [
],
'misc_settings_diff' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Session-API-Key: <api-key>"
],
]);
$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/settings"
payload := strings.NewReader("{\n \"active_agent_profile_id\": \"<string>\",\n \"active_meta_profile\": \"<string>\",\n \"active_profile\": \"<string>\",\n \"agent_settings_diff\": {\n \"mcp_config\": {}\n },\n \"conversation_settings_diff\": {},\n \"misc_settings_diff\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Session-API-Key", "<api-key>")
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.example.com/api/settings")
.header("X-Session-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"active_agent_profile_id\": \"<string>\",\n \"active_meta_profile\": \"<string>\",\n \"active_profile\": \"<string>\",\n \"agent_settings_diff\": {\n \"mcp_config\": {}\n },\n \"conversation_settings_diff\": {},\n \"misc_settings_diff\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Session-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active_agent_profile_id\": \"<string>\",\n \"active_meta_profile\": \"<string>\",\n \"active_profile\": \"<string>\",\n \"agent_settings_diff\": {\n \"mcp_config\": {}\n },\n \"conversation_settings_diff\": {},\n \"misc_settings_diff\": {}\n}"
response = http.request(request)
puts response.read_body{
"agent_settings": {
"mcp_config": {},
"agent_kind": "openhands",
"schema_version": 2
},
"conversation_settings": {},
"llm_api_key_is_set": true,
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"misc_settings": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Body
Request model for PATCH /api/settings.
Supports partial updates via diff objects that are deep-merged with
existing settings. misc_settings_diff is deep-merged into the
persisted misc_settings block with the same semantics as
agent_settings_diff and conversation_settings_diff: nested dicts
merge recursively, and lists are replaced wholesale rather than merged.
Because misc_settings is opaque to the agent-server, callers are
responsible for the shape of what they store there.
Stable id of the active AgentProfile to persist; null clears it.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Name of the active meta-profile to persist; null clears it.
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$Name of the active LLM profile to persist; null clears it.
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$Show child attributes
Show child attributes
Response
Successful Response
Response model for GET /api/settings.
Contains the full settings payload including agent configuration, conversation settings, active LLM profile, miscellaneous frontend-owned settings, and a flag indicating whether an LLM API key is set.
The agent_settings and conversation_settings fields are raw dicts
because the server controls secret serialization via context. Use the
typed accessor methods for validation:
Example::
response = SettingsResponse.model_validate(api_response.json())
agent = response.get_agent_settings() # Returns AgentSettingsConfig
conv = response.get_conversation_settings() # Returns ConversationSettings
misc_settings is an opaque container for frontend-owned data that the
agent-server persists but does not interpret — see the docstring of
:class:PersistedSettings.misc_settings.
Show child attributes
Show child attributes
Stable id of the currently active AgentProfile, if one is set.
Name of the currently active meta-profile, if one is selected.
Name of the currently active LLM profile, if one is selected.
Was this page helpful?

