Unlink a subagent

SDK platic.agents.subagents.unlink()

Remove a subagent from the parent’s draft by specifying its childId in the URL. Publish the parent to stop using it. The subagent is preserved and stays linked to its other parents.

Example

await platic.agents.subagents.unlink("agent_123", "agent_456");

Path parameters

ParameterTypeDescriptionRequired
agentIdstringParent agent id✓
childIdstringSubagent id✓

Response

200 OK. The fields are those from Update the draft:

{
  "status": "success",
  "data": {
    "changed": true,
    "draft": { "versionId": "v7", "number": 7 },
    "version": {
      "versionId": "v7",
      "number": 7,
      "basedOnVersionId": "v6",
      "restoredFromVersionId": null,
      "copiedFrom": null,
      "createdAt": "2026-10-28T12:14:00.000Z",
      "createdBy": { "kind": "api_key", "keyId": "k3yId" },
      "source": "api",
      "via": null,
      "note": ""
    }
  }
}

Errors

Statusdetails.codeWhen
403FORBIDDENThe credential can't edit the parent agent
404AGENT_NOT_FOUNDThe parent agent doesn't exist in the workspace or was deleted
409CONFLICTSomeone else changed this at the same time. Try again

Notes

  • Removing the link creates a version of the parent and doesn't publish: the published parent keeps using the subagent until you publish that version.
  • If the subagent wasn't linked, it answers changed: false without creating a version.
  • This operation takes no body, so the new version ends up with an empty note.
  • To turn a link off without removing it, use Link a subagent with "enabled": false.