Agents
Update an agent
PATCH
/
api
/
agents
/
{agent_id}
Update an agent
curl --request PATCH \
--url https://litellm-rust.onrender.com/api/agents/{agent_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-agent",
"owner_id": "local-user",
"runtime": "cursor",
"model": "claude-opus-4-5",
"system": "You are a helpful assistant.",
"description": "<string>",
"prompt": "<string>",
"config": {},
"tools": [
{}
]
}
'import requests
url = "https://litellm-rust.onrender.com/api/agents/{agent_id}"
payload = {
"name": "my-agent",
"owner_id": "local-user",
"runtime": "cursor",
"model": "claude-opus-4-5",
"system": "You are a helpful assistant.",
"description": "<string>",
"prompt": "<string>",
"config": {},
"tools": [{}]
}
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: 'my-agent',
owner_id: 'local-user',
runtime: 'cursor',
model: 'claude-opus-4-5',
system: 'You are a helpful assistant.',
description: '<string>',
prompt: '<string>',
config: {},
tools: [{}]
})
};
fetch('https://litellm-rust.onrender.com/api/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "my-agent",
"model": "claude-opus-4-5",
"system": "<string>",
"tools": {},
"config": {},
"owner_id": "<string>",
"status": "paused",
"description": "<string>",
"harness": "claude-code",
"created_at": 123
}Authorizations
Your LITELLM_MASTER_KEY. Default for local Docker Compose: sk-local
Path Parameters
Body
application/json
Example:
"my-agent"
Example:
"local-user"
Built-in runtime ID or registered runtime harness alias. Stored in agent config.
Example:
"cursor"
Example:
"claude-opus-4-5"
Example:
"You are a helpful assistant."
Fallback system prompt when system is omitted.
- object[]
- object
Response
Updated agent
Example:
"my-agent"
Example:
"claude-opus-4-5"
Runtime-specific config. For runtime-backed agents this usually includes runtime.
Example:
"paused"
Example:
"claude-code"
⌘I
Update an agent
curl --request PATCH \
--url https://litellm-rust.onrender.com/api/agents/{agent_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-agent",
"owner_id": "local-user",
"runtime": "cursor",
"model": "claude-opus-4-5",
"system": "You are a helpful assistant.",
"description": "<string>",
"prompt": "<string>",
"config": {},
"tools": [
{}
]
}
'import requests
url = "https://litellm-rust.onrender.com/api/agents/{agent_id}"
payload = {
"name": "my-agent",
"owner_id": "local-user",
"runtime": "cursor",
"model": "claude-opus-4-5",
"system": "You are a helpful assistant.",
"description": "<string>",
"prompt": "<string>",
"config": {},
"tools": [{}]
}
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: 'my-agent',
owner_id: 'local-user',
runtime: 'cursor',
model: 'claude-opus-4-5',
system: 'You are a helpful assistant.',
description: '<string>',
prompt: '<string>',
config: {},
tools: [{}]
})
};
fetch('https://litellm-rust.onrender.com/api/agents/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "my-agent",
"model": "claude-opus-4-5",
"system": "<string>",
"tools": {},
"config": {},
"owner_id": "<string>",
"status": "paused",
"description": "<string>",
"harness": "claude-code",
"created_at": 123
}