JavaScript
Agent Variations
Delete a variation
Remove one variation and its assignments. Mind the last one on a published agent.
DELETE
JavaScript
Permanently remove one variation from an agent.
Its assignments go with it, cleanly
Deleting a variation removes its assignments too, the tool sets, sub-agents, and memory layers wired to it. This cascade is clean: a memory layer that was assigned to the deleted variation becomes deletable right away, with no orphaned assignment left holding it. The tool sets, sub-agents, and memory layers themselves are untouched. Deleting a variation unwires them from this one variation; it does not delete the shared resources.Objectives already running are safe
An objective froze its variation into aconfigSnapshot when it started, so deleting the variation does not disturb a run in flight. This is why an objective survives the deletion of the variation that served it, the snapshot is the source of truth for that run, not the live record.
Pass the agentvar_... id or the external_id: form. A missing ID is a 404.
Related
List variations
What remains after a delete, and each one’s score.
Add an assignment
The wiring that a delete unwinds.
Unpublish an agent
Take an agent offline if a delete left it without a variation.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace ID.
Example:
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
Agent ID. Accepts the canonical agent_… form or the external_id:<value> form.
Example:
"agent_01HXKD2E5NQM3T9AYWCFMGWT9Y"
Variation ID. Accepts the canonical agentvar_… form or the external_id:<value> form.
Example:
"agentvar_01HXKD2E5NQM3T9AYWCF32BSPP"