DELETE
Delete an agent session
Request · Response · Guide: Minto
If a run is live it is stopped first rather than refused — deleting is a clear intent, and refusing would leave a session whose run is wedged permanently undeletable. The response reports stopped_run so you know it happened.Stopping mid-run loses nothing: the agent still ends the run properly, and its job lives outside the session, so the partial answer and the real cost stay readable at GET /v1/jobs/ and any callback still fires. The turns themselves are retained and simply become unreachable.

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

Idempotency-Key
string

Optional opaque key (max 255 chars, UUIDv4 recommended) making this request idempotent for 24h: a retry with the same key and body replays the original response with Idempotent-Replayed: true.

Path Parameters

session_id
string
required

The session to delete.

Response

The session was deleted.

session_id
string
required
Example:

"665f1c2e8a1b4c0012ab34cd"

deleted
enum<boolean>
required
Available options:
true
Example:

true

stopped_run
boolean
required

Whether a live run was stopped as part of the delete.

False when the session had nothing running. True means the agent was asked to stop and will end the run shortly — the job stays pollable, so the partial answer and the real cost are still readable afterwards.

Example:

false

job_id
string | null

Job handle of the run that was stopped, still pollable after the session is gone. Null when nothing was running, or when the turn was asked in the app.

Example:

"sajob_9f2c1a4b7e8d4c1fa0b3"