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

# close

> Close the HTTP session the client created.

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

Close the session. A client constructed with your own `session=` leaves that session alone, since it
did not create it.

Using the client as an async context manager calls this for you on exit, which is the usual way to
reach it.

## **Parameters**

None.

## **Returns**

`None`.

## **Example**

Outside a context manager, close it yourself:

```python {12}
import asyncio

from signalwire.ai_chat import AIChatClient


async def main():
    client = AIChatClient(space="your-space")
    try:
        reply = await client.chat("chat-8f21", "Where is my van?")
        print("Ada:", reply.text)
    finally:
        await client.close()


asyncio.run(main())
```