Update Agent Route for an Agent
client.Agents.Routes.Update(ctx, parentAgentUuid, childAgentUuid, body) (*AgentRouteUpdateResponse, error)
/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}.
Parameters
parentAgentUuid string
childAgentUuid string
Returns
Update Agent Route for an Agent
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/-go"
"github.com/stainless-sdks/-go/option"
)
func main() {
client := gradient.NewClient(
option.WithAccessToken("My Access Token"),
)
route, err := client.Agents.Routes.Update(
context.TODO(),
`"123e4567-e89b-12d3-a456-426614174000"`,
`"123e4567-e89b-12d3-a456-426614174000"`,
gradient.AgentRouteUpdateParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", route.ChildAgentUuid)
}
{
"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"
}