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
| Field | Type | Required | Description |
|---|---|---|---|
agents | object[] | Yes | At least one agent. See the table below. |
routing_mode | string | No | single (default), chain or workflow. |
max_handoffs | integer | No | chain only. 1 to 20, default 4. |
workflow_order | string[] | workflow only | Agent names in run order. |
name, description | string | No | Metadata. |
input_schema, response_schema | object | No | JSON Schema for the squad. response_schema shapes the final output. |
Each agent:
| Field | Required | Description |
|---|---|---|
name | Yes | Unique within the squad. |
system_prompt | Yes | The agent's instructions. |
model | No | Defaults to gpt-6-luna. |
topics | No | Keywords used for routing. |
can_handoff_to | No | Agent names this agent may hand off to. chain only. |
tools | No | web_search, scrape_url, parse_document. |
output_key | No | workflow only. Where this agent's output is stored for later steps. |
examples | No | Few-shot pairs. |
privacy_enabled | No | Mask PII for this agent. |
description, priority, input_schema, response_schema | No | Optional. |
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.