v8

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

Add Function Route to an Agent

To create a function route for an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/functions.

post/v2/gen-ai/agents/{agent_uuid}/functions

Path parameters

agent_uuidstring required

Agent id

Request body

agent_uuidstring

Agent id

descriptionstring

Function description

faas_namestring

The name of the function in the DigitalOcean functions platform

faas_namespacestring

The namespace of the function in the DigitalOcean functions platform

function_namestring

Function name

input_schemaobject

Describe the input schema for the function so the agent may call it

output_schemaobject

Describe the output schema for the function so the agent handle its response

Example request

{
  "agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
  "description": "\"My Function Description\"",
  "faas_name": "\"my-function\"",
  "faas_namespace": "\"default\"",
  "function_name": "\"My Function\""
}

Response

A successful response.