Skip to main content
PATCH
TypeScript SDK

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string<uuid>
required

Body

application/json
expectedUpdatedAt
string<date-time>

Value of updatedAt from the last retrieved agent. A concurrent change causes a conflict instead of overwriting newer changes.

name
string

Rename the agent.

Required string length: 1 - 200
key
string | null

Change the agent lookup key, or null to clear it.

Required string length: 1 - 200
instructions
object

Replace the agent instruction document, or null to clear it.

Example:
mcpServers
string[]

Replace the MCP server or connection IDs. An empty array clears the selection.

Maximum array length: 100
Required string length: 1 - 200
agent
string | null

Change the coding agent and model key. Null clears the override.

Required string length: 1 - 200
agentOptions
object

Change agent-specific runtime options, such as reasoning effort.

userState
object

Replace the user-managed persistent agent state.

sandboxSize
enum<string> · null · null

Change the workspace VM size. Null clears the override.

Available options:
nano,
micro,
small,
medium,
large,
xl,
xxl,
ultra,
null,
null
projectId

Change the project environment for runs. Null clears the override.

templateId
string | null

Change the associated agent template identifier, or null to clear it.

Maximum string length: 200
script
string | null

Replace the agent script, or null to clear it.

Maximum string length: 100000
artifactType
enum<string> · null · null

Change the artifact type produced by the agent, or null to clear it.

Available options:
PullRequest,
ToolCall,
Plan,
Response,
File,
Service,
Source,
null,
null
repositoryIds
string<uuid>[]

Replace repository associations. An empty array removes all associations.

Maximum array length: 250
enabled
boolean

Enable or pause the agent and its schedules and triggers. Archived agents remain paused until restored.

archived
boolean

Archive with true or restore with false. Archiving disables schedules and triggers; restoring follows the agent enabled state.

Response

Update an agent

id
string<uuid>
required
name
string
required
key
string | null
required
sandboxSize
enum<string> | null
required
Available options:
nano,
micro,
small,
medium,
large,
xl,
xxl,
ultra,
null
projectId
string | null
required
templateId
string | null
required
contentVersion
integer
default:1
required
script
string | null
required
artifactType
enum<string> | null
required
Available options:
PullRequest,
ToolCall,
Plan,
Response,
File,
Service,
Source,
null
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
archivedAt
string<date-time> | null
required
enabledAt
string<date-time> | null
required
organizationId
string | null
required
Required string length: 1 - 255
organizationName
string | null
required
createdBy
string | null
required
instructions
object
required

Instructions for the agent as a rich-text document. Mentions can reference integrations used by the agent.

Example:
agent
string | null
required

Runtime and model selection key; not the ID of an agent resource.

agentOptions
object
required

Execution settings for the selected agent runtime, including provider-specific options.

mcpServers
string[]
required

Selected MCP server identifiers, including built-in server keys.

Maximum array length: 100
Required string length: 1 - 200
userState
object | null
required

User-defined state keyed by name. Values may be any JSON value, including nested objects and arrays. No application-specific keys are required.

codeRepositories
object[]
required
Maximum array length: 250
lastRun
object | null
required
runCount
integer
required
Required range: x >= 0
scheduleCount
integer
required
Required range: x >= 0
triggerCount
integer
required
Required range: x >= 0
hasPausedSchedule
boolean
required
hasPausedTrigger
boolean
required
integrationIds
string<uuid>[]
required
integrationTypes
string[]
required