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

await platic.agents.create({ name: "Sales", instructions: "Answer in under 80 words." });

Request body

FieldTypeDescriptionRequired
namestringAgent name, 1 to 100 characters✓
imageUrlstringURL 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, followUpdepends on the sectionThe configuration sections you want to define, directly in the body. They are applied over the default configuration. See partial changes-
notestringNote 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

Statusdetails.codeWhen
400INVALID_REQUESTThe body doesn't have the expected shape, for example name is missing
422INVALID_CONFIGThe 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
422INVALID_SUBAGENT_LINKsubagents links an agent that doesn't exist in the workspace
422UNSUPPORTED_REASONING_EFFORTmodel or a model in fallbackModels asks for a reasoning level it doesn't accept. details.supportedEfforts lists the supported values. Nothing is created
422MODEL_FALLBACKS_REQUIRE_OWN_KEYfallbackModels includes fallback models, but the workspace has no connected provider key of its own. Nothing is created. See fallback models
422INVALID_ESCALATIONAn 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
503SUPPORT_SERVICE_UNAVAILABLEThe 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 assistance with enabled: true and the escalations it 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.