Skip to main content
POST
Update an agent

Path Parameters

agent_id
string
required

Agent ID

Minimum string length: 1

Body

application/json
version
integer

Apply the update only if the agent is still at this version

Required range: 1 <= x <= 9007199254740991
name
string

Updated agent name

Required string length: 1 - 256
harness
enum<string>

Agent harness for the new version

Available options:
pi,
deepseek,
opencode,
custom,
codex,
claude-code,
antigravity,
grok-build
model

Updated model ID string or an object with an ID and optional provider credential

Minimum string length: 1
system
string | null

Updated system prompt text

Maximum string length: 100000
description
string | null

Updated agent description

Maximum string length: 2048
metadata
object | null

Set or update keys. A null value removes a key and a null map clears all keys. The resulting map may contain up to 16 pairs.

mcp_servers
object[]

Replacement list of the agent's MCP servers

Maximum array length: 20
tools
object[]

Replacement list of the agent's tool declarations

Maximum array length: 104

Response

Success

id
string
required
Minimum string length: 1
type
enum<string>
required
Available options:
agent
version
integer
required
Required range: 1 <= x <= 9007199254740991
name
string
required
Required string length: 1 - 256
harness
string
required
Minimum string length: 1
model
object
required
system
string | null
required
Maximum string length: 100000
description
string | null
required
Maximum string length: 2048
mcp_servers
object[]
required
Maximum array length: 20
tools
object[]
required
Maximum array length: 104
created_at
string
required
updated_at
string
required
archived_at
string | null
required
metadata
object