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.

Servers

Path parameters

Name Type Required Description
uuid String Yes

Unique agent id

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
k Integer No

How many results should be considered from an attached knowledge base

project_id String No

The id of the DigitalOcean project this agent will belong to

provide_citations Boolean No
description String No

Agent description

temperature Number No

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.

uuid String No

Unique agent id

anthropic_key_uuid String No

Optional anthropic key uuid for use with anthropic models

top_p Number No

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.

open_ai_key_uuid String No

Optional OpenAI key uuid for use with OpenAI models

name String No

Agent name

retrieval_method String No
  • 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

Possible values:

  • "RETRIEVAL_METHOD_UNKNOWN"
  • "RETRIEVAL_METHOD_SUB_QUERIES"
  • "RETRIEVAL_METHOD_REWRITE"
  • "RETRIEVAL_METHOD_NONE"
  • "RETRIEVAL_METHOD_STEP_BACK"

Default value: "RETRIEVAL_METHOD_UNKNOWN"

tags[] Array No

A set of abitrary tags to organize your agent

max_tokens Integer No

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.

instruction String No

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

model_uuid String No

Identifier for the foundation model.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.