---
title: "Stop an agent run"
method: POST
path: "/agent_runners/{agent_runner_id}/stop"
tags: ["agentRunner"]
---

# Stop an agent run

`POST /agent_runners/{agent_runner_id}/stop`

## Request

- Base URL: `https://api.netlify.com/api/v1`
- URL: `https://api.netlify.com/api/v1/agent_runners/{agent_runner_id}/stop`
- Auth: OAuth 2
  - Implicit: `https://app.netlify.com/authorize`

Stops the run's active session. Stopping happens in the background.

## Response `202`

Accepted. The response has no body. The run's active sessions are set to `cancelled` before this returns, and the sandbox shuts down in the background. To confirm, poll `getAgentRunnerSession` (`GET /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}`) and check that `state` is `cancelled`.

## Other responses

- `default`: error

## Changes

- **2026-10-19** `4ee761b12c37`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/netlify/apis/netlify-s-api-documentation/changes/agent_runners/:agent_runner_id/stop/post.md)

---

[API](https://skmtc.dev/netlify/apis/netlify-s-api-documentation.md) - [All operations](https://skmtc.dev/netlify/apis/netlify-s-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/netlify/apis/netlify-s-api-documentation/revisions/6546d2e27b7a?raw)
