Skip to main content
POST
Create a sub-agent

Authorizations

X-Api-Key
string
header
required

Headers

X-Api-Key
string
required

Api key to pass as a X-Api-Key request header.

Body

Sub-agent configuration to save

name
string
required

Technical name, in snake_case. The agent delegates to it under the tool name subagent_{name}, so it must not already start with subagent_.

Required string length: 2 - 64
Pattern: ^[a-z][a-z0-9_]*$
displayName
string
required

Human-readable name

Maximum string length: 128
description
string
required

Tells the agent when to delegate to this sub-agent

Maximum string length: 1000
systemPrompt
string
required

Instructions the sub-agent follows

Maximum string length: 50000
avatar
string | null

Avatar identifier (av_XXXX)

Maximum string length: 32
model
string | null

Model the sub-agent runs on. Left empty, the platform default applies.

Maximum string length: 64
toolIds
string[] | null

Tools the sub-agent can call itself, 20 at most. Each must belong to the same company as the API key.

Maximum array length: 20
params
object | null

Values injected into the system prompt

timeout
integer<int32>

Call timeout in seconds (1-600, default 60)

Required range: 1 <= x <= 600
maxDurationS
integer<int32>

Maximum processing time per message in seconds (0-600, default 30). 0 means unlimited.

Required range: 0 <= x <= 600
inactivityExpirationMin
integer<int32> | null

Minutes of inactivity after which the delegated conversation expires

Required range: 1 <= x <= 10080
hardDeadlineUtc
string<date-time> | null

Absolute end of the delegated conversation, UTC

tags
string[] | null

Free labels

Response

Created

Full configuration of a sub-agent. Workspace files, code execution and the per-message command are managed from the Starleads interface and are not exposed here.

id
string | null

Sub-agent identifier

name
string | null

Technical name, in snake_case. The agent delegates to it under the tool name subagent_{name}.

displayName
string | null

Human-readable name

description
string | null

Tells the agent when to delegate to this sub-agent

avatar
string | null

Avatar identifier (av_XXXX)

systemPrompt
string | null

Instructions the sub-agent follows

model
string | null

Model the sub-agent runs on

toolIds
string[] | null

Tools the sub-agent can call itself

params
object | null

Values injected into the system prompt

timeout
integer<int32>

Call timeout in seconds

maxDurationS
integer<int32>

Maximum processing time per message in seconds; past it the sub-agent answers with what it has. 0 means unlimited.

inactivityExpirationMin
integer<int32> | null

Minutes of inactivity after which the delegated conversation expires

hardDeadlineUtc
string<date-time> | null

Absolute end of the delegated conversation, UTC

tags
string[] | null

Free labels

createdAt
string<date-time>
updatedAt
string<date-time>