Skip to main content
PUT
Update an agent

Authorizations

Authorization
string
header
required

A workspace API key from Workspace settings > API keys, sent as Authorization: Bearer cl_api_.... A Read only key can call the GET endpoints; every other method needs a Full access key.

Path Parameters

agentId
string
required
Required string length: 1 - 128

Query Parameters

branch_id
string

The branch to publish to. Main by default.

Required string length: 1 - 128

Body

application/json
behavior
object
greeting
string
Required string length: 1 - 2000
instructions
string
Required string length: 20 - 100000
guardrails
string
Maximum string length: 20000
model
string
Required string length: 1 - 100
temperature
number
Required range: 0 <= x <= 1
defaultLanguage
string | null
Maximum string length: 40
Pattern: ^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$
name
string
Required string length: 1 - 80
branch_id
string

The branch to publish to, as in the query. Main by default.

Required string length: 1 - 128
revision
integer

The branch revision the change was made on. Left out, the change applies to the latest.

Required range: x >= 0
message
string
default:""
Maximum string length: 4000

Response

Success.

data
object
required

An agent that was never versioned answers with the agent record alone.