Skip to main content
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

Authorization
string
header
required

Your LITELLM_MASTER_KEY. Default for local Docker Compose: sk-local

Path Parameters

agent_id
string
required

Body

application/json
name
string
required
Example:

"my-agent"

owner_id
string
required
Example:

"local-user"

runtime
string

Built-in runtime ID or registered runtime harness alias. Stored in agent config.

Example:

"cursor"

model
string
Example:

"claude-opus-4-5"

system
string
Example:

"You are a helpful assistant."

description
string
prompt
string

Fallback system prompt when system is omitted.

config
object
tools
object

Response

Updated agent

id
string
name
string
Example:

"my-agent"

model
string
Example:

"claude-opus-4-5"

system
string
tools
object
config
object

Runtime-specific config. For runtime-backed agents this usually includes runtime.

owner_id
string | null
status
string
Example:

"paused"

description
string | null
harness
string
Example:

"claude-code"

created_at
integer<int64>