pydo.genai.update_agent()
Generated on 9 Jun 2026
from pydo version
v0.36.0
Usage
client.genai.update_agent(
uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
body={
"agent_log_insights_enabled": True,
"allowed_domains": [...],
"anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
...,
},
)Description
To update an agent, send a PUT request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.
Parameters
uuidstring requiredUnique agent id
agent_log_insights_enabledboolean optionalExample:
Trueallowed_domainsarray of strings optionalExample:
['example string']Optional list of allowed domains for the chatbot - Must use fully qualified domain name (FQDN) such as https://example.com
anthropic_key_uuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Optional anthropic key uuid for use with anthropic models
clear_mcp_serversboolean optionalExample:
TrueWhen true, removes all MCP servers from the agent. Use this instead of sending an empty mcp_servers array.
conversation_logs_enabledboolean optionalExample:
TrueOptional update of conversation logs enabled
descriptionstring optionalExample:
"My Agent Description"Agent description
instructionstring optionalExample:
"You are an agent who thinks deeply about the world"Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
kinteger optionalExample:
5How many results should be considered from an attached knowledge base
max_tokensinteger optionalExample:
100Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response.
mcp_serversarray of objects optionalMCP (Model Context Protocol) servers to attach to the agent
Show child properties
allowed_toolsarray of strings optionalExample:
['example string']Optional list of allowed tool names to expose from this server
authorizationstring optionalExample:
example stringOptional authorization header value for the MCP server
headersobject optionalOptional additional headers to send to the MCP server
server_labelstring optionalExample:
example stringA label identifying this MCP server
server_urlstring optionalExample:
example stringThe URL of the MCP server
model_provider_key_uuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Optional Model Provider uuid for use with provider models
model_router_uuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"model_uuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Identifier for the foundation model.
namestring optionalExample:
"My New Agent Name"Agent name
open_ai_key_uuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Optional OpenAI key uuid for use with OpenAI models
project_idstring optionalExample:
"12345678-1234-1234-1234-123456789012"The id of the DigitalOcean project this agent will belong to
provide_citationsboolean optionalExample:
Truereasoning_effortstring optionalExample:
"low"retrieval_methodstring optional- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is nonerouter_preset_slugstring optionalExample:
"general"tagsarray of strings optionalExample:
['example string']A set of abitrary tags to organize your agent
temperaturenumber optionalExample:
0.7Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation.
thinking_token_budgetinteger optionalExample:
123top_pnumber optionalExample:
0.9Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses.
uuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Unique agent id
Request Sample
Response Example
More Information
See /v2/gen-ai/agents/{uuid} in the API reference for additional detail on responses, headers, parameters, and more.