Skip to main content

Deploy a squad

A squad is several agents behind one app. See Multi-agent routing for how the modes work.

Create the squad​

POST https://platform.custodianlabs.io/v1/agent-teams
FieldTypeRequiredDescription
agentsobject[]YesAt least one agent. See the table below.
routing_modestringNosingle (default), chain or workflow.
max_handoffsintegerNochain only. 1 to 20, default 4.
workflow_orderstring[]workflow onlyAgent names in run order.
name, descriptionstringNoMetadata.
input_schema, response_schemaobjectNoJSON Schema for the squad. response_schema shapes the final output.

Each agent:

FieldRequiredDescription
nameYesUnique within the squad.
system_promptYesThe agent's instructions.
modelNoDefaults to gpt-6-luna.
topicsNoKeywords used for routing.
can_handoff_toNoAgent names this agent may hand off to. chain only.
toolsNoweb_search, scrape_url, parse_document.
output_keyNoworkflow only. Where this agent's output is stored for later steps.
examplesNoFew-shot pairs.
privacy_enabledNoMask PII for this agent.
description, priority, input_schema, response_schemaNoOptional.
curl -X POST "https://platform.custodianlabs.io/v1/agent-teams" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"routing_mode": "single",
"agents": [
{"name": "billing", "system_prompt": "Answer billing questions.", "topics": ["billing", "refund"]},
{"name": "product", "system_prompt": "Answer product questions.", "topics": ["feature", "setup"]}
]
}'

The response includes team_id.

Attach files (optional)​

POST /agent-teams/{team_id}/agents/{agent_name}/data-sources/files

multipart/form-data with the file in file. The file is only searched by that agent.

Deploy​

POST /agent-teams/{team_id}/deploy

Optional JSON body: name, share_mode, share_password.

{
"team_app_id": "custodians_9b1e8f3a2c4d",
"team_id": "team_1a2b3c4d5e6f",
"name": "support-squad",
"routing_mode": "single",
"deployed_at": "2026-10-05T09:30:00Z",
"chat_url": "https://chat.custodianlabs.io/custodians_9b1e8f3a2c4d",
"share_mode": "public"
}

Chat with it at POST /team-apps/{team_app_id}/chat. See Chat.