## Update `agents.update(strpath_uuid, AgentUpdateParams**kwargs) -> AgentUpdateResponse` **put** `/v2/gen-ai/agents/{uuid}` 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 - **uuid:** `str` - **anthropic\_key\_uuid:** `str` Optional anthropic key uuid for use with anthropic models - **conversation\_logs\_enabled:** `bool` Optional update of conversation logs enabled - **description:** `str` Agent description - **instruction:** `str` 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. - **k:** `int` How many results should be considered from an attached knowledge base - **max\_tokens:** `int` 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. - **model\_uuid:** `str` Identifier for the foundation model. - **name:** `str` Agent name - **openai\_key\_uuid:** `str` Optional OpenAI key uuid for use with OpenAI models - **project\_id:** `str` The id of the DigitalOcean project this agent will belong to - **provide\_citations:** `bool` - **retrieval\_method:** `APIRetrievalMethod` - 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 none - **tags:** `List[str]` A set of abitrary tags to organize your agent - **temperature:** `float` 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. - **top\_p:** `float` 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. - **uuid:** `str` ### Returns - `class AgentUpdateResponse` Information about an updated agent - **agent:** `Optional[APIAgent]` An Agent ### Example ```python from do_gradientai import GradientAI client = GradientAI() agent = client.agents.update( path_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", ) print(agent.agent) ```