Create an agent
SDK platic.agents.create()
Create an agent by sending name and any settings you want to change from the default configuration. It is published as v1, which is also its initial draft.
To receive messages from a channel, assign that channel with Update a channel. Human assistance is off when you create it.
Example
curl https://api.platic.ai/v1/agents \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Sales", "instructions": "Answer in under 80 words." }' await platic.agents.create({ name: "Sales", instructions: "Answer in under 80 words." }); Request body
| Field | Type | Description | Required |
|---|---|---|---|
name | string | Agent name, 1 to 100 characters | ✓ |
imageUrl | string | URL or path of the agent's photo, up to 2048 characters. Without it, Platica assigns one | - |
description, instructions, model, modelPriority, fallbackModels, memory, fileAttachments, scheduledTasks, multilingual, workingMessage, subagents, assistance, schedule, guardrails, followUp | depends on the section | The configuration sections you want to define, directly in the body. They are applied over the default configuration. See partial changes | - |
note | string | Note for version v1, up to 500 characters | - |
name is required; instructions is a string. The name and photo go in name and imageUrl. You can later change them with Update an agent; they are not part of the versions.
{
"name": "Sales",
"instructions": "You are the sales assistant for Acme Store.",
"guardrails": { "message": "I can only help with store topics." },
"note": "First version"
} Response
201 Created with the agent:
{
"status": "success",
"data": {
"id": "Xq8mTe2LwP4kZ1aB9cDf",
"name": "Sales",
"imageUrl": "/images/agents/avatars/p46.jpg",
"status": "active",
"owners": [],
"draft": { "versionId": "v1", "number": 1 },
"publication": { "versionId": "v1", "number": 1 },
"hasUnpublishedChanges": false,
"createdAt": "2026-10-28T12:00:00.000Z"
}
} See each response field in Get an agent.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | The body doesn't have the expected shape, for example name is missing |
422 | INVALID_CONFIG | The resulting configuration isn't valid, for example it includes a name from the earlier shape such as runtime, or model isn't a model Platica knows. details.issues lists the field path for each problem. Nothing is created |
422 | INVALID_SUBAGENT_LINK | subagents links an agent that doesn't exist in the workspace |
422 | UNSUPPORTED_REASONING_EFFORT | model or a model in fallbackModels asks for a reasoning level it doesn't accept. details.supportedEfforts lists the supported values. Nothing is created |
422 | MODEL_FALLBACKS_REQUIRE_OWN_KEY | fallbackModels includes fallback models, but the workspace has no connected provider key of its own. Nothing is created. See fallback models |
422 | INVALID_ESCALATION | An escalation in assistance.escalations doesn't exist in the workspace or is archived. details.escalations lists each one with escalationId and reason: not_found or archived. Nothing is created |
503 | SUPPORT_SERVICE_UNAVAILABLE | The escalations in assistance.escalations couldn't be checked. Nothing is created; try again |
The format of details.issues is in Validation.
Notes
- To enable human assistance, send
assistancewithenabled: trueand theescalationsit can use: see Leave an agent escalating. The wait message goes in each escalation that pauses the agent (agent.waitMessage). - If you create it with an OAuth token, the person who owns the token becomes the agent's owner. With an API key, it has no owners.
- To keep editing it, edit the draft and publish the new version.