{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","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.","properties":{"path":{"type":"object","properties":{"uuid":{"type":"string","examples":["\"123e4567-e89b-12d3-a456-426614174000\""],"description":"Unique agent id"}},"required":["uuid"],"additionalProperties":false},"body":{"$ref":"#/definitions/apiUpdateAgentInputPublic"}},"required":["path"],"additionalProperties":false,"definitions":{"apiUpdateAgentInputPublic":{"description":"Data to modify an existing Agent","properties":{"agent_log_insights_enabled":{"type":"boolean","examples":[true]},"allowed_domains":{"description":"Optional list of allowed domains for the chatbot - Must use fully qualified domain name (FQDN) such as https://example.com","items":{"type":"string","examples":["example string"]},"type":"array","examples":[["example string"]]},"anthropic_key_uuid":{"description":"Optional anthropic key uuid for use with anthropic models","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"clear_mcp_servers":{"description":"When true, removes all MCP servers from the agent. Use this instead of sending an empty mcp_servers array.","type":"boolean","examples":[true]},"conversation_logs_enabled":{"description":"Optional update of conversation logs enabled","type":"boolean","examples":[true]},"description":{"description":"Agent description","type":"string","examples":["\"My Agent Description\""]},"instruction":{"description":"Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions) for best practices.","type":"string","examples":["\"You are an agent who thinks deeply about the world\""]},"k":{"description":"How many results should be considered from an attached knowledge base","type":"integer","examples":[5]},"max_tokens":{"description":"Specifies 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.","type":"integer","examples":[100]},"mcp_servers":{"description":"MCP (Model Context Protocol) servers to attach to the agent","items":{"$ref":"#/definitions/apiMcpServer"},"type":"array"},"model_provider_key_uuid":{"description":"Optional Model Provider uuid for use with provider models","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"model_router_uuid":{"type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"model_uuid":{"description":"Identifier for the foundation model.","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"name":{"description":"Agent name","type":"string","examples":["\"My New Agent Name\""]},"open_ai_key_uuid":{"description":"Optional OpenAI key uuid for use with OpenAI models","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"project_id":{"description":"The id of the DigitalOcean project this agent will belong to","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"provide_citations":{"type":"boolean","examples":[true]},"reasoning_effort":{"type":"string","examples":["\"low\""]},"retrieval_method":{"$ref":"#/definitions/apiRetrievalMethod"},"router_preset_slug":{"type":"string","examples":["\"general\""]},"tags":{"description":"A set of abitrary tags to organize your agent","items":{"type":"string","examples":["example string"]},"type":"array","examples":[["example string"]]},"temperature":{"description":"Controls 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.","type":"number","examples":[0.7]},"thinking_token_budget":{"type":"integer","examples":[123]},"top_p":{"description":"Defines 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.","type":"number","examples":[0.9]},"uuid":{"description":"Unique agent id","type":"string","examples":["\"12345678-1234-1234-1234-123456789012\""]},"web_fetch_enabled":{"description":"Optional. Set to true to let the agent use the built-in web_fetch tool to retrieve content from public web pages, or false to disable it.","type":"boolean","examples":[true]},"web_search_enabled":{"description":"Optional. Set to true to let the agent use the built-in web_search tool to search the public web for current information, or false to disable it.","type":"boolean","examples":[true]}},"type":"object"},"apiMcpServer":{"description":"McpServer defines a remote MCP server configuration for an agent.","properties":{"allowed_tools":{"description":"Optional list of allowed tool names to expose from this server","items":{"type":"string","examples":["example string"]},"type":"array","examples":[["example string"]]},"authorization":{"description":"Optional authorization header value for the MCP server","type":"string","examples":["example string"]},"headers":{"additionalProperties":{"type":"string","examples":["example string"]},"description":"Optional additional headers to send to the MCP server","type":"object"},"server_label":{"description":"A label identifying this MCP server","type":"string","examples":["example string"]},"server_url":{"description":"The URL of the MCP server","type":"string","examples":["example string"]}},"type":"object"},"apiRetrievalMethod":{"default":"RETRIEVAL_METHOD_UNKNOWN","description":"- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown\n - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite\n - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back\n - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries\n - RETRIEVAL_METHOD_NONE: The retrieval method is none","enum":["RETRIEVAL_METHOD_UNKNOWN","RETRIEVAL_METHOD_REWRITE","RETRIEVAL_METHOD_STEP_BACK","RETRIEVAL_METHOD_SUB_QUERIES","RETRIEVAL_METHOD_NONE"],"type":"string","examples":["RETRIEVAL_METHOD_UNKNOWN"]}}},"name":"Update an Agent","id":"digitalocean.genai_update_agent","example":{"path":{"uuid":"\"123e4567-e89b-12d3-a456-426614174000\""}},"maxRequests":1,"summary":false}}