Skip to main content
POST
Requires version 1.1.9 or later of the Archetype platform.

Overview

This endpoint cancels an agent run and returns the updated agent. You can only cancel agents whose status is either running or paused. If the agent has already reached one of the terminal states (completed, failed, or canceled), this returns HTTP status code 409.
Once an agent has been canceled, it cannot be resumed or restarted. If you want to temporarily stop an agent, pause it using the Pause Agent endpoint.
You must cancel agents which are running or paused before deleting them.

Request

string
required
TypeID-encoded agent identifier (starting with the prefix agt_).

Response

Returns the canceled agent.
string
required
TypeID-encoded agent identifier of the canceled agent.
string
required
Name of the agent (a run’s name is its bundle’s name).
string
required
Organization identifier the agent belongs to.
string
required
The bundle this agent was run from (provenance).
string
required
Human-readable pinned blueprint reference (its key), e.g. osm.
string
required
Immutable blueprint ID the bundle pinned.
string
required
Agent lifecycle status; canceled after a successful cancel.
string
required
Creation timestamp (date-time).
object
The I/O binding this run was started with; null when none is recorded.
string
External executor’s job ID for the current run (a JOS job_ ID). Present once the run has been dispatched.
string
When the run started; null before then.
string
When the run finished; null while unfinished.
string
Failure detail; null unless the run failed.