Update Agent API Definition
The Update Agent API enables you to modify an existing AI agent's configuration, including tool assignments, behavioral instructions, model parameters, and operational metadata. This API supports agile agent development and operational management by allowing incremental updates without requiring complete agent recreation or disrupting existing agent sessions.
Organizations use this API to evolve agent capabilities over time, adding new tools as they become available, refining behavioral instructions based on user feedback, adjusting model parameters for optimal performance, and updating metadata for better organization and governance across their agent ecosystem.
Update Agent Request and Response
To update an agent, send a PATCH request to /v2/agents/{agent_key}
. You specify the agent identifier in the URL path and include only the fields you want to modify in the request body:
agent_key
(string, required): Unique agent identifier in the URL path following patternagt_[0-9a-zA-Z_-]+$
name
(string, optional): Updated human-readable agent namedescription
(string, optional): Updated description of agent purpose and capabilitiestools
(object, optional): Updated tool configuration objectavailable
(array, required if tools object provided): Complete list of available toolsid
(string, required): Tool identifier following patterntol_.*
argument_bindings
(object, optional): Fixed arguments for tool execution
mode
(string, optional): Tool interaction mode (native
orinstruction
)
model
(object, optional): Updated model configurationname
(string, required if model object provided): Model nameparameters
(object, optional): Model-specific parameters
first_step
(object, optional): Updated execution step configurationtype
(string, required if first_step provided): Step type (must beconversational
)instructions
(array, required if first_step provided): Updated list of instruction objectsoutput_parser
(object, required if first_step provided): Output parser configuration
metadata
(object, optional): Updated metadata (replaces existing metadata completely)enabled
(boolean, optional): Updated enabled status
The response includes the complete updated agent configuration with the new updated_at
timestamp reflecting when the changes were applied.
Example Request
1
Example Response
1