Skip to main content
POST
Create an agent

Authorizations

Authorization
string
header
required

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

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
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
projectId
string
Required string length: 1 - 200

Response

The saved agent and its first 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