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
The unique identifier (UUID) of the agent to update.
Request Body
All fields are optional. Only include fields you want to update.Agent name (2-100 characters). Updates metadata only, does not create new version.
Agent description. Updates metadata only.
System prompt for the agent. Creates new version if changed.
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
Whether this agent should be the default for new threads. Setting to
true automatically unsets other default agents.Icon identifier from icon library.
Icon color in hex format (e.g., “#6366F1”).
Icon background color in hex format.
Array of configured MCP integrations. Creates new version if changed.
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.Tool enable/disable configuration. Creates new version if changed.Core tools (bash, read, write, edit, glob, grep) are always enabled and cannot be disabled.
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.
Unique identifier for the agent
Updated agent name
Current system prompt (from active version)
Current AI model (from active version)
UUID of the new version if configuration changed, otherwise unchanged
Total number of versions (incremented if new version created)
Complete configuration of the active version
ISO 8601 timestamp of this update
Examples
Response Example (New Version Created)
Error Responses
Agent does not exist or user does not have access
Attempting to modify restricted fields on system agents (e.g., Suna)
Invalid request data
Missing or invalid authentication token
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