dots.v2.genAi.agents.post()
Generated on 13 Nov 2026
from DoTs version
v1.24.0
Usage
client.v2.genAi.agents.post(body: ApiCreateAgentInputPublic, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | ApiCreateAgentOutput>Description
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.
Parameters
anthropicKeyUuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Optional Anthropic API key ID to use with Anthropic models
descriptionstring optionalExample:
"My Agent Description"A text description of the agent, not used in inference
instructionstring optionalExample:
"You are an agent who thinks deeply about the world"Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
knowledgeBaseUuidarray of strings optionalExample:
["example string"]Ids of the knowledge base(s) to attach to the agent
mcpServersarray of objects optionalMCP (Model Context Protocol) servers to attach to the agent
Show child properties
allowedToolsarray of strings optionalExample:
["example string"]Optional list of allowed tool names to expose from this server
authorizationstring optionalExample:
example stringOptional authorization header value for the MCP server
headersobject optionalOptional additional headers to send to the MCP server
serverLabelstring optionalExample:
example stringA label identifying this MCP server
serverUrlstring optionalExample:
example stringThe URL of the MCP server
modelProviderKeyUuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"modelRouterUuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"modelUuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Identifier for the foundation model.
namestring optionalExample:
"My Agent"Agent name
openAiKeyUuidstring optionalExample:
"12345678-1234-1234-1234-123456789012"Optional OpenAI API key ID to use with OpenAI models
projectIdstring optionalExample:
"12345678-1234-1234-1234-123456789012"The id of the DigitalOcean project this agent will belong to
reasoningEffortstring optionalExample:
"low"regionstring optionalExample:
"tor1"The DigitalOcean region to deploy your agent in
routerPresetSlugstring optionalExample:
"general"tagsarray of strings optionalExample:
["example string"]Agent tag to organize related resources
thinkingTokenBudgetinteger optionalExample:
123webFetchEnabledboolean optionalExample:
trueWhether the agent can use the built-in web_fetch tool to retrieve content from public web pages.
webSearchEnabledboolean optionalExample:
trueWhether the agent can use the built-in web_search tool to search the public web for current information.
workspaceUuidstring optionalExample:
123e4567-e89b-12d3-a456-426614174000Identifier for the workspace
Request Sample
Response Example
More Information
See /v2/gen-ai/agents in the API reference for additional detail on responses, headers, parameters, and more.