---
title: "Cancel Agent Run"
method: POST
path: "/agents/{agent_id}/runs/{run_id}/cancel"
tags: ["Agents"]
---

# Cancel Agent Run

`POST /agents/{agent_id}/runs/{run_id}/cancel`

Cancel a currently executing agent run. This will attempt to stop the agent's execution gracefully.

**Note:** Cancellation may not be immediate for all operations.

## Path parameters

- `agent_id` string, required
- `run_id` string, required

## Query parameters

- `session_id` string, nullable — Session ID the run belongs to. Required for non-admin JWT users.

## Response `200`

Successful Response

- unknown

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Agent not found
- `422` — Validation Error
- `500` — Failed to cancel run

---

[API](https://skmtc.net/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.net/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agno/agno-api-reference/revisions/5f6149d395d0/schema)
