v8

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

Create an Agent

To create a new agent, send a POST request to /v2/gen-ai/agents. The response body contains a JSON object with the newly created agent object.

post/v2/gen-ai/agents

Request body

anthropic_key_uuidstring

Optional Anthropic API key ID to use with Anthropic models

descriptionstring

A text description of the agent, not used in inference

instructionstring

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

knowledge_base_uuidstring[]

Ids of the knowledge base(s) to attach to the agent

model_uuidstring

Identifier for the foundation model.

namestring

Agent name

open_ai_key_uuidstring

Optional OpenAI API key ID to use with OpenAI models

project_idstring

The id of the DigitalOcean project this agent will belong to

regionstring

The DigitalOcean region to deploy your agent in

tagsstring[]

Agent tag to organize related resources

Example request

{
  "anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "description": "\"My Agent Description\"",
  "instruction": "\"You are an agent who thinks deeply about the world\"",
  "knowledge_base_uuid": [
    "example string"
  ],
  "model_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "name": "\"My Agent\"",
  "open_ai_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "project_id": "\"12345678-1234-1234-1234-123456789012\"",
  "region": "\"tor1\"",
  "tags": [
    "example string"
  ]
}

Response

A successful response.