Skip to main content
POST
Create Sub-Agent

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
sub_agent_name
string
required

Display name used for the sub-agent in the flow. The API derives the stored key from this value.

Minimum string length: 1
agent_type
enum<string>
default:assistant

Sub-agent type. Assistants reason and respond; proxies execute tools without conversational reasoning. The alias proxy is accepted for user_proxy.

Available options:
assistant,
user_proxy
tenant
string | null

Owning tenant ID. Defaults to the authenticated user's tenant when omitted.

Minimum string length: 1
description
string | null

Description that explains the sub-agent's intent and improves selection.

system_prompt
string | null

Prompt template ID used as the sub-agent system prompt.

system_prompt_template
SystemPromptCreateRequest · object | null

System prompt template to create when system_prompt ID is not provided.

llm_model
integer | null

LLM model ID for assistant sub-agents. If omitted, provide llm_model_name to resolve the model by name.

llm_model_name
string | null

LLM model name to resolve when llm_model ID is not provided.

model_config
SubAgentModelConfigRequest · object

Assistant-only LLM settings for this sub-agent.

config
SubAgentConfigRequest · object

Sub-agent behavior, visibility, memory, and structured output settings.

tools
SubAgentToolCreateRequest · object[]

Initial tools to attach to the sub-agent.

Response

Successful Response

success
boolean
required

Whether the request was successful.

data
SubAgentMutationData · object
required

Sub-agent mutation results.

error_type
string | null

Type of error if the request failed.

error_message
string | null

Error message or informational message.