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
curl -X DELETE https://api.platic.ai/v1/agents/$AGENT_ID/draft/subagents/$CHILD_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.subagents.unlink("agent_123", "agent_456"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Parent agent id | ✓ |
childId | string | Subagent 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
| Status | details.code | When |
|---|---|---|
403 | FORBIDDEN | The credential can't edit the parent agent |
404 | AGENT_NOT_FOUND | The parent agent doesn't exist in the workspace or was deleted |
409 | CONFLICT | Someone 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: falsewithout 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.