> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# stop

> Stop the AI agent session.

Stop the AI agent session.

## **Returns**

`dict` -- Server acknowledgment.

## **Example**

```python {18}
from signalwire.relay import RelayClient

client = RelayClient(
    project="your-project-id",
    token="your-api-token",
    contexts=["default"],
)

@client.on_call
async def handle_call(call):
    await call.answer()
    action = await call.ai(
        prompt={"text": "You are a helpful assistant."},
        ai_params={"temperature": 0.7},
    )

    # Stop the AI session
    await action.stop()

client.run()
```