Skip to main content
POST
/
api
/
agents
Create an agent
curl --request POST \
  --url https://litellm-rust.onrender.com/api/agents \
  --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": [
    {}
  ]
}
'
{
  "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

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

Agent created

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>