> ## Documentation Index
> Fetch the complete documentation index at: https://notte-experiment-visibility-md-links.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# stop

> Stop the session and clean up resources

This method sends a close request to the API and verifies that the session
was properly closed. It logs the session closure and raises an error if
the session fails to close.

**Example:**

```python theme={null}
from notte_sdk import NotteClient

client = NotteClient()
session = client.Session()
session.start()
session.stop()
```

> Note that we strongly recommend using the `with` statement to start and stop the session to avoid any issues with session cleanup.

**Example:**

```python theme={null}
from notte_sdk import NotteClient

client = NotteClient()
with client.Session() as session:
    session.execute(type="goto", url="https://www.notte.cc")
```

## Returns

`None`

## Raises

* `ValueError`: If the session hasn't been started (no session\_id available).
* `RuntimeError`: If the session fails to close properly.
