Skip to main content
POST
Save an agent version

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Path Parameters

id
string
required
Pattern: ^agent_[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$

Body

application/json
name
string
required
Required string length: 1 - 120
model
string
required
Required string length: 1 - 180
instructions
string
required
Maximum string length: 24000
expectedVersion
string
required

The latest version the caller edited.

Pattern: ^[1-9][0-9]{0,8}$
description
string
Maximum string length: 1000
tools
object[]
Maximum array length: 4
inheritWorkspaceTools
boolean

Use the workspace General Agent prompt and tools when true, within the session caller’s access. Requires tools to be empty or omitted. Defaults to false.

maxSteps
integer
Required range: 1 <= x <= 50
maxOutputTokens
integer
Required range: 1 <= x <= 128000

Response

The new agent version.

name
string
required
Required string length: 1 - 120
model
string
required
Required string length: 1 - 180
instructions
string
required
Maximum string length: 24000
id
string
required
Pattern: ^agent_[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$
projectId
string | null
required
Required string length: 1 - 200
version
string
required
Pattern: ^[1-9][0-9]{0,8}$
createdAt
string<date-time>
required
description
string
Maximum string length: 1000
tools
object[]
Maximum array length: 4
inheritWorkspaceTools
boolean

Use the workspace General Agent prompt and tools when true, within the session caller’s access. Requires tools to be empty or omitted. Defaults to false.

maxSteps
integer
Required range: 1 <= x <= 50
maxOutputTokens
integer
Required range: 1 <= x <= 128000