Endpoint
Authentication
Requires JWT authentication viaAuthorization: Bearer <token> header.
Description
Updates an agent’s configuration. Changes tosystem_prompt, model, configured_mcps, custom_mcps, or agentpress_tools automatically create a new version. Changes to name, icon, or is_default update the agent metadata without creating a new version.
Versioning Behavior:
- Configuration changes (prompt, model, tools, MCPs) → Creates new version (v2, v3, etc.)
- Metadata changes (name, icon, is_default) → Updates agent record directly
Path Parameters
string
required
The unique identifier (UUID) of the agent to update.
Request Body
All fields are optional. Only include fields you want to update.string
Agent name (2-100 characters). Updates metadata only, does not create new version.
string
Agent description. Updates metadata only.
string
System prompt for the agent. Creates new version if changed.
string
AI model identifier (e.g., “kortix/basic”, “openai/gpt-4”). Creates new version if changed.Available based on tier:
- Free:
kortix/minimax - Pro:
kortix/basic,openai/gpt-5-nano,anthropic/claude-3.5-sonnet - Enterprise: All models
boolean
Whether this agent should be the default for new threads. Setting to
true automatically unsets other default agents.string
Icon identifier from icon library.
string
Icon color in hex format (e.g., “#6366F1”).
string
Icon background color in hex format.
array
Array of configured MCP integrations. Creates new version if changed.
array
Array of custom MCP server configurations. Creates new version if changed.By default, new custom MCPs are merged with existing ones. Set
replace_mcps: true to replace entirely.object
Tool enable/disable configuration. Creates new version if changed.Core tools (bash, read, write, edit, glob, grep) are always enabled and cannot be disabled.
boolean
default:false
If
true, replaces all MCPs (both configured and custom) instead of merging.false(default): New MCPs are merged with existing onestrue: Provided MCPs completely replace existing configuration
Response
Returns the updated agent with full configuration. If a new version was created,version_count is incremented and current_version_id points to the new version.
string
Unique identifier for the agent
string
Updated agent name
string
Current system prompt (from active version)
string
Current AI model (from active version)
string
UUID of the new version if configuration changed, otherwise unchanged
integer
Total number of versions (incremented if new version created)
object
Complete configuration of the active version
string
ISO 8601 timestamp of this update
Examples
Response Example (New Version Created)
Error Responses
error
Agent does not exist or user does not have access
error
Attempting to modify restricted fields on system agents (e.g., Suna)
error
Invalid request data
error
Missing or invalid authentication token
error
Server error during update
Versioning Details
What Creates a New Version?
Changes to these fields trigger automatic version creation:system_promptmodelconfigured_mcpscustom_mcpsagentpress_tools
What Doesn’t Create a Version?
These fields update the agent record directly:namedescriptionis_defaulticon_name,icon_color,icon_background
Version Naming
Versions are automatically named sequentially:v1, v2, v3, etc.
MCP Merging vs. Replacement
By default, MCPs are merged:Restrictions on System Agents
The default “Suna” agent has restrictions managed viametadata.restrictions:
403 Forbidden.
Notes
- Atomic Updates: All changes are applied atomically
- Cache Invalidation: Updates invalidate the agent config cache
- Default Agent: Setting
is_default: trueclears the default flag from other agents - Core Tools: Cannot be disabled even if explicitly set to
enabled: false
Related Endpoints
- Get Agent - Retrieve current configuration
- Create Agent - Create a new agent
- Delete Agent - Remove an agent
- List Versions - View version history