# Delete an agent session
Source: https://docs.file.ai/api-reference/endpoint/delete-an-agent-session

> Deletes the session. Afterwards every route on it returns 404,

delete /prod/v2/agent/sessions/{session_id}

Deletes the session. Afterwards every route on it returns 404,
including DELETE.

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 /v2/jobs/{job_id} and any callback still
fires. The turns themselves are retained and simply become unreachable.
