Add
Add Agent Route to an Agent
client.agents.routes.add(stringchildAgentUuid, RouteAddParams { body_parent_agent_uuid, child_agent_uuid, if_case, route_name } params, RequestOptionsoptions?): RouteAddResponse { child_agent_uuid, parent_agent_uuid }
/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
To add an agent route to an agent, send a POST request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
.
Parameters
childAgentUuid: string
Returns
Add Agent Route to an Agent
import Gradient from '@digitalocean/gradient';
const client = new Gradient();
const response = await client.agents.routes.add('"123e4567-e89b-12d3-a456-426614174000"', {
path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"',
});
console.log(response.child_agent_uuid);
{
"child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000"
}
Returns Examples
{
"child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000"
}