---
title: "Cancel an agent run"
method: POST
path: "/v1/agent-runs/{id}/cancel"
tags: ["agent-runs"]
---

# Cancel an agent run

`POST /v1/agent-runs/{id}/cancel`

Requests cancellation of a running agent run. Cancellation is
asynchronous — poll GET /v1/agent-runs/{id} to observe the
terminal "cancelled" phase.

## Path parameters

- `id` string, required

## Response `200`

OK

- CancelAgentRunSuccessResponse
  - `code` integer
  - `data` CancelAgentRunData
    - `ok` boolean
  - `message` string
  - `requestId` string

---

[API](https://skmtc.dev/b3os/apis/b3os-workflow-api.md) · [All operations](https://skmtc.dev/b3os/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/b3os/b3os-workflow-api/revisions/a8c7af3c66a1/schema)
