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
enum<string>
default:@cf/meta/llama-3.3-70b-instruct-fp8-fast

As for create: a model off the list is refused.

Available options:
@cf/meta/llama-3.3-70b-instruct-fp8-fast,
@cf/meta/llama-3.1-8b-instruct,
@cf/meta/llama-3.1-8b-instruct-fast,
@cf/meta/llama-3.2-3b-instruct,
@cf/meta/llama-4-scout-17b-16e-instruct,
@cf/mistralai/mistral-small-3.1-24b-instruct,
@cf/google/gemma-3-12b-it
system_prompt
string
Maximum string length: 8000
prompt
string
tools
any[]

As for create: not supported; only an empty list is accepted.

memory_dataset
string | null
max_tokens
integer
default:1024

Response

Replaced.

ok
enum<boolean>
required
Available options:
true