> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop Scope • AI Agent SDK

> StopScope: How much of a session's work a stop owns.

# StopScope

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

How much of a session's work a stop owns.

`TURN` cancels only the running turn (today's behaviour; default for
backward compatibility). `SESSION` cancels the running turn *and* drains
the session's queued-but-unstarted ingress so no backlogged message is
executed after the stop.

## Methods

> **[coerce()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/StopScope-coerce.md)**
>
> Best-effort parse of an external `scope` value.

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L8034)**
>
> `praisonaiagents/gateway/protocols.py` at line 8034


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.