Skip to content
  • Auto
  • Light
  • Dark

Add

Add Agent Route to an Agent
agents.routes.add(strpath_child_agent_uuid, RouteAddParams**kwargs) -> RouteAddResponse
post/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}.

ParametersExpand Collapse
parent_agent_uuid: str
child_agent_uuid: str
child_agent_uuid: str
if_case: Optional[str]
parent_agent_uuid: str
route_name: Optional[str]

Name of route

ReturnsExpand Collapse
class RouteAddResponse:

Information about a newly linked agent

child_agent_uuid: Optional[str]

Routed agent id

parent_agent_uuid: Optional[str]

A unique identifier for the parent agent.

from gradient import Gradient

client = Gradient()
response = client.agents.routes.add(
    path_child_agent_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
    path_parent_agent_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
)
print(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"
}