Update an existing agent
Update an existing agent. JSON or multipart (multipart for an image). 200 {success, id, message, image, key (when first published), workflow_id (workflow agents)}. A workflow agent may send workflow_graph to write its next graph version in the same transaction (or create its workflow); confirm_sponsor covers the agent's and the graph's resources. Publishing a draft without a graph validates the stored one.
Personal access token scope: agents:write.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
agent_id*stringapplication/json- body
agent_type?stringType of the agent (classic, react, workflow). Defaults to 'classic' for backwards compatibility.
allow_system_prompt_override?booleanAllow API callers to override the system prompt via the v1 endpoint
chunks?integerChunks count
default_model_id?stringDefault model ID for this agent
description*stringNew description of the agent
folder_id?stringFolder ID to organize the agent
image?Image file upload
json_schema?JSON schema for enforcing structured output format
limited_request_mode?booleanWhether the agent is in limited request mode
limited_token_mode?booleanWhether the agent is in limited token mode
models?array<string>List of available model IDs for this agent
name*stringNew name of the agent
prompt_id?stringPrompt id, or a preset: default, creative or strict
request_limit?integerRequest limit for the agent in limited mode
retriever?stringRetriever ID
source?stringSource ID (legacy single source)
sources?array<string>List of source identifiers for multiple sources
starters?array<string>Up to 4 questions a new chat with the agent offers, each at most 200 characters; trimmed, blanks and case-insensitive duplicates dropped. Multipart sends a JSON string
status*stringStatus of the agent (draft or published)
token_limit?integerToken limit for the agent in limited mode
tools?array<string>List of tool identifiers
workflow?stringWorkflow ID for workflow-type agents
workflow_graph?Workflow agents only, instead of workflow: the graph saved with the agent in the same transaction, {nodes, edges, retry_defaults?} (a JSON string in a multipart form). A draft only its builder runs is checked for shape only; a published agent, one a key, webhook, schedule or public link runs, or one sharing its workflow with such an agent gets the full validation. Needs workflows:write for a token.
Success
curl -X PUT 'http://localhost:7091/api/update_agent/string' \ -H 'Content-Type: application/json' \ -d '{ "description": "string", "name": "string", "status": "string"}'