> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# end

> End a conversation and trigger its post-processing.

[ref-aichatclient]: /docs/server-sdks/reference/python/agents/ai-chat-client

[delete]: /docs/server-sdks/reference/python/agents/ai-chat-client/delete

[post-prompt-webhook]: /docs/apis/rest/webhooks/ai-post-prompt-callback

End the conversation and start post-processing: the summary, and a request to your `post_prompt_url`
when your SWML sets one. The webhook is not instant, so expect seconds.

To remove a conversation without any of that, use [`delete()`][delete].

## **Parameters**

**`conversation_id`** `str` — required

The conversation to end.

---

## **Returns**

`bool` — `True` when the service reported the conversation ended, `False` when no conversation had
that id.

## **Example**

```python {12}
import asyncio

from signalwire.ai_chat import AIChatClient

CONFIG_URL = "https://bayview-taxi.example.com/swml"


async def main():
    async with AIChatClient(space="your-space") as client:
        await client.create_conversation("chat-8f21", config_url=CONFIG_URL)
        await client.chat("chat-8f21", "Book the van, please.")
        await client.end("chat-8f21")


asyncio.run(main())
```

The [AI post-prompt callback][post-prompt-webhook] documents what your `post_prompt_url` receives.