Add Agent Route to an Agent
client.Agents.Routes.Add(ctx, parentAgentUuid, childAgentUuid, body) (*AgentRouteAddResponse, error)
/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
parentAgentUuid string
childAgentUuid string
Returns
Add Agent Route to 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"),
)
response, err := client.Agents.Routes.Add(
context.TODO(),
`"123e4567-e89b-12d3-a456-426614174000"`,
`"123e4567-e89b-12d3-a456-426614174000"`,
gradient.AgentRouteAddParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ChildAgentUuid)
}
{
"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"
}