Deploy an agent
One call
POST https://platform.custodianlabs.io/v1/apps/deploy
Creates and deploys an agent in one request.
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The system prompt. |
model | string | No | Defaults to gpt-6-luna. |
examples | object[] | No | Few-shot pairs: [{"user": "...", "assistant": "..."}]. |
name | string | No | Display name. |
privacy_enabled | boolean | No | Mask PII with Guardian Layer. Defaults to false. |
share_mode | string | No | public (default), password or private. |
share_password | string | No | Required when share_mode is password. |
curl -X POST "https://platform.custodianlabs.io/v1/apps/deploy" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6-luna", "prompt": "You are a helpful support agent.", "name": "support-bot"}'
{
"app_id": "custodian_4f2a91c3e5b7",
"assistant_id": "asst_9c1d2e3f4a5b",
"name": "support-bot",
"model": "gpt-6-luna",
"deployed_at": "2026-10-05T09:30:00Z",
"chat_url": "https://chat.custodianlabs.io/custodian_4f2a91c3e5b7",
"share_mode": "public"
}
Chat with it using app_id. See Chat.
Step by step
Use these when the agent needs files, tools or a response schema. The SDKs run these
same steps inside deploy().
Create the agent
POST /assistants with model, system_prompt, and optionally name, description,
tools, input_schema, response_schema and privacy_enabled. Keep the
assistant_id it returns.
ASSISTANT_ID=$(curl -s -X POST "https://platform.custodianlabs.io/v1/assistants" \
-H "X-API-Key: $CUSTODIAN_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "gpt-6-luna", "system_prompt": "Answer from the handbook.", "tools": ["web_search"]}' \
| jq -r .assistant_id)
Add examples (optional)
POST /assistants/{assistant_id}/examples
curl -X POST "https://platform.custodianlabs.io/v1/assistants/$ASSISTANT_ID/examples" \
-H "X-API-Key: $CUSTODIAN_API_KEY" -H "Content-Type: application/json" \
-d '{"examples": [{"user": "Can I work from home?", "assistant": "Yes, up to 2 days a week."}]}'
Add files (optional)
POST /assistants/{assistant_id}/data-sources/files as multipart/form-data, with the
file in file. Repeat for each file.
curl -X POST "https://platform.custodianlabs.io/v1/assistants/$ASSISTANT_ID/data-sources/files" \
-H "X-API-Key: $CUSTODIAN_API_KEY" -F "file=@handbook.pdf"
Deploy
POST /assistants/{assistant_id}/deploy, optionally with name, share_mode and
share_password. It returns the same app object as the one-call deploy.
curl -X POST "https://platform.custodianlabs.io/v1/assistants/$ASSISTANT_ID/deploy" \
-H "X-API-Key: $CUSTODIAN_API_KEY" -H "Content-Type: application/json" -d '{}'