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

Body

application/json
name
string
required

Trimmed before validation.

Required string length: 1 - 120
active
boolean
default:true

Only the literal false deactivates. An inactive agent makes an agent_call workflow step fail.

model
string
default:@cf/meta/llama-3.3-70b-instruct-fp8-fast

Workers AI model id. SILENTLY replaced by the default unless it starts with '@'.

system_prompt
string
default:""

prompt is accepted as an alias.

Maximum string length: 8000
prompt
string

Alias for system_prompt.

tools
any[]

Stored verbatim; reserved for tool-calling and not used at run time.

memory_dataset
string | null

When set, each run's output is written there as a record for longer-term recall.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,62}$
max_tokens
integer
default:1024

Clamped to 1..1024; a non-integer becomes 1024.

Response

Created.

id
string
required
ok
enum<boolean>
required
Available options:
true