Collections
A collection is a flat label that groups related deployments in My AIs — for example one per client, product area, or team. Collections don't nest, and a deployment belongs to at most one collection. Deployments without a collection appear under Unassigned.
Set it when you deploy
Pass collection= to any deploy() call. Omit it to leave the deployment
Unassigned.
from custodian_labs import Custodian
app = Custodian(
model="gpt-6-luna",
system_prompt="You are a helpful support assistant.",
).deploy(collection="Support")
Squads take the same option:
app = squad.deploy(collection="Clients")
The deployment is filed under that collection in your account; share links, chat
and delete behave exactly as before. (The API's deployment response includes the
collection field.)
Set it over the API
Send collection in the deploy body:
curl -X POST "https://platform.custodianlabs.io/v1/agent-teams/$TEAM_ID/deploy" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "support-squad", "share_mode": "public", "collection": "Support"}'
The deployment response includes collection (the group name, or null when
Unassigned).
Manage collections
Use the Dashboard (My AIs → My collection) or the API:
| Endpoint | Does |
|---|---|
GET /collections | List your collections with deployment counts. |
POST /collections { "name": "Support" } | Create an empty collection. |
PATCH /collections/{name} { "name": "Clients" } | Rename it; deployments follow automatically. |
DELETE /collections/{name} | Delete it; its deployments move to Unassigned (they are not deleted). |
PUT /team-apps/{team_app_id}/collection { "collection": "Support" } | Move a deployment into a collection. Send null for Unassigned. |
# List collections
curl "https://platform.custodianlabs.io/v1/collections" \
-H "X-API-Key: $CUSTODIAN_API_KEY"
# Move a deployment into "Support"
curl -X PUT "https://platform.custodianlabs.io/v1/team-apps/$TEAM_APP_ID/collection" \
-H "X-API-Key: $CUSTODIAN_API_KEY" -H "Content-Type: application/json" \
-d '{"collection": "Support"}'
In the Dashboard
In My AIs → My collection you can:
- Add a collection and move deployments into it (or back to Unassigned).
- Rename or delete a collection.
- Search and collapse/expand collections — handy once you have many.
- When you publish a new AI, a popup asks whether to save it into a collection (or publish without one).
Collections only affect organisation in My AIs. They don't change a deployment's chat link, share settings, API key, or usage.
Collection names are per-account and can be up to 120 characters. Creating a
duplicate name returns 409 Conflict.