Update an agent

SDK platic.agents.update()

Change an agent’s name, photo, status or owners. Send at least one of those fields; changes apply immediately, without creating a version or publishing.

To change its instructions or other configuration settings, use the draft.

Example

await platic.agents.update("agent_123", { status: "inactive" });

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent id✓

Request body

Omitted fields keep their current value.

FieldTypeDescriptionRequired
namestringAgent name, 1 to 100 characters-
imageUrlstringURL or path of the agent's photo, up to 2048 characters-
statusstringactive or inactive-
ownersarray of stringsEmails of workspace members. Replaces the whole list; [] leaves the agent with no owners-
{
  "name": "Acme Sales",
  "status": "inactive",
  "owners": ["ana@acme.com", "luis@acme.com"]
}

Response

The updated agent, with the fields from Get an agent:

{
  "status": "success",
  "data": {
    "id": "Xq8mTe2LwP4kZ1aB9cDf",
    "name": "Acme Sales",
    "imageUrl": "/images/agents/avatars/p12.jpg",
    "status": "inactive",
    "owners": ["ana@acme.com", "luis@acme.com"],
    "draft": { "versionId": "v4", "number": 4 },
    "publication": { "versionId": "v3", "number": 3 },
    "hasUnpublishedChanges": true,
    "createdAt": "2026-10-28T12:00:00.000Z"
  }
}

Errors

Statusdetails.codeWhen
400INVALID_REQUESTThe body is empty, name is over 100 characters, an email in owners isn't a workspace member's, or the body doesn't have the expected shape
403FORBIDDENThe credential can't edit this agent
404AGENT_NOT_FOUNDThe agent doesn't exist in the workspace or was deleted
409COPY_INCOMPLETEYou want to activate a copy whose files didn't finish connecting. See Copy an agent
{
  "code": 400,
  "error": "Bad Request - The request has validation errors",
  "details": {
    "code": "INVALID_REQUEST",
    "message": "The following owner emails do not match any users in this workspace: luis@other.com"
  }
}

Notes

  • It doesn't move the draft or the publication. The new name and photo show right away, whichever version is published.
  • To change the instructions or any other part of the configuration, edit the draft and publish it.
  • To assign it a channel, use Update a channel.