Skip to content
  • Auto
  • Light
  • Dark

Update

Update Agent Route for an Agent
agents.routes.update(strpath_child_agent_uuid, RouteUpdateParams**kwargs) -> RouteUpdateResponse
put/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}

To update an agent route for an agent, send a PUT 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]

Describes the case in which the child agent should be used

parent_agent_uuid: str
route_name: Optional[str]

Route name

uuid: Optional[str]

Unique id of linkage

ReturnsExpand Collapse
class RouteUpdateResponse:

Information about an updated linkage

child_agent_uuid: Optional[str]

Routed agent id

parent_agent_uuid: Optional[str]

A unique identifier for the parent agent.

rollback: Optional[bool]
uuid: Optional[str]

Unique id of linkage

from gradient import Gradient

client = Gradient()
route = client.agents.routes.update(
    path_child_agent_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
    path_parent_agent_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
)
print(route.child_agent_uuid)
{
  "child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "rollback": true,
  "uuid": "123e4567-e89b-12d3-a456-426614174000"
}
Returns Examples
{
  "child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "rollback": true,
  "uuid": "123e4567-e89b-12d3-a456-426614174000"
}