Skip to main content
PUT
Replace an AI agent

Authorizations

hookie_session
string
cookie
required

The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.

Path Parameters

project_id
string
required
agent_id
string
required

Body

application/json

Identical to the create body and validated by the same validateAgentSpec — FULL REPLACE, not a merge: an omitted field reverts to its default (omitting system_prompt blanks it, omitting tools empties it, omitting max_tokens resets it to 1024, omitting active re-activates). PATCH is accepted on this path and behaves identically.

name
string
required
Required string length: 1 - 120
active
boolean
default:true
model
string
default:@cf/meta/llama-3.3-70b-instruct-fp8-fast
system_prompt
string
Maximum string length: 8000
prompt
string
tools
any[]
memory_dataset
string | null
max_tokens
integer
default:1024

Response

Replaced.

ok
enum<boolean>
required
Available options:
true