v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_GradientAI Platform

Update an Agent

To update an agent, send a PUT request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.

put/v2/gen-ai/agents/{uuid}

Path parameters

uuidstring required

Unique agent id

Request body

agent_log_insights_enabledboolean
anthropic_key_uuidstring

Optional anthropic key uuid for use with anthropic models

conversation_logs_enabledboolean

Optional update of conversation logs enabled

descriptionstring

Agent description

instructionstring

Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.

kinteger

How many results should be considered from an attached knowledge base

max_tokensinteger

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_uuidstring

Identifier for the foundation model.

namestring

Agent name

open_ai_key_uuidstring

Optional OpenAI key uuid for use with OpenAI models

project_idstring

The id of the DigitalOcean project this agent will belong to

provide_citationsboolean
retrieval_method'RETRIEVAL_METHOD_UNKNOWN' | 'RETRIEVAL_METHOD_REWRITE' | 'RETRIEVAL_METHOD_STEP_BACK' | 'RETRIEVAL_METHOD_SUB_QUERIES' | 'RETRIEVAL_METHOD_NONE'
  • 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
tagsstring[]

A set of abitrary tags to organize your agent

temperaturenumber 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_pnumber 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.

uuidstring

Unique agent id

Example request

{
  "agent_log_insights_enabled": true,
  "anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "conversation_logs_enabled": true,
  "description": "\"My Agent Description\"",
  "instruction": "\"You are an agent who thinks deeply about the world\"",
  "k": 5,
  "max_tokens": 100,
  "model_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "name": "\"My New Agent Name\"",
  "open_ai_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "project_id": "\"12345678-1234-1234-1234-123456789012\"",
  "provide_citations": true,
  "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
  "tags": [
    "example string"
  ],
  "temperature": 0.7,
  "top_p": 0.9,
  "uuid": "\"12345678-1234-1234-1234-123456789012\""
}

Response

A successful response.