workflows

Cancel Agent Session

Cancel an in-flight agent run. Use when the user wants to stop a running agent before it finishes, or abandon a run that has gone sideways. Cascades to any sub-agents spawned from this run via agents.delegate — every live descendant is cancelled atomically. The runner bails at the next iteration boundary after observing the status change. Already-completed runs cannot be canceled. Pass a reason to record WHY the run was aborted in the audit trail.

post/api/platform/v1/agents/{session_id}/cancel

Request

  • Base URL: https://docs.amdahl.ai
  • URL: https://docs.amdahl.ai/api/platform/v1/agents/{session_id}/cancel
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

session_idstring uuid required

Request body

reasonstring

Optional operator note describing why the run was canceled.

Response

OK

dataunknown

Changes

No recorded changes to this operation across all 1 revision of this API.