Saltar para o conteúdo principal
POST
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
/
sub-agents
Link a sub-agent (no PATCH afterwards — to change, unlink + re-link)
curl --request POST \
  --url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/sub-agents \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "subAgentPublicId": "9c3a4d22-1a8d-4b3f-9b1e-7a0f0c4f3e21",
  "aiModelPublicId": "1b2c3d4e-5f60-4a7b-8c9d-0e1f2a3b4c5d",
  "description": "Handles billing-related questions and refunds.",
  "sortOrder": 10
}
'
{
  "aiModelName": "<string>",
  "aiModelPublicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "sortOrder": 123,
  "subAgentName": "<string>",
  "subAgentPublicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for linking an existing agent as a sub-agent of another agent.

subAgentPublicId
string<uuid>
obrigatório

Public ID of the agent to be linked as a sub-agent.

Exemplo:

"9c3a4d22-1a8d-4b3f-9b1e-7a0f0c4f3e21"

aiModelPublicId
string<uuid>

Optional AI model override for this sub-agent invocation.

Exemplo:

"1b2c3d4e-5f60-4a7b-8c9d-0e1f2a3b4c5d"

description
string

Description of when and how the parent should delegate to this sub-agent.

Required string length: 1 - 500
Exemplo:

"Handles billing-related questions and refunds."

sortOrder
integer<int32>

Sort order of this sub-agent in the parent's sub-agent list.

Exemplo:

10

Resposta

Sub-agent linked

Sub-agent linked to a parent agent.

aiModelName
string
aiModelPublicId
string<uuid>
description
string
sortOrder
integer<int32>
subAgentName
string
subAgentPublicId
string<uuid>