> 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.

# close

> Complete the client's lifecycle.

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

Complete the client's lifecycle. The client holds no pooled connection of its
own, so there is nothing to tear down and calling it more than once is safe. It
exists so code can treat `AIChatClient` like any other disposable resource.

The client also implements `Symbol.asyncDispose`, so `await using client = new
AIChatClient(...)` calls `close()` for you when the scope exits.

## **Parameters**

None.

## **Returns**

`Promise<void>`

## **Example**

Outside an `await using` block, close it yourself:

```typescript {9}
import { AIChatClient } from '@signalwire/sdk';

const client = new AIChatClient({ space: 'your-space' });
try {
  const reply = await client.chat('chat-8f21', 'Where is my van?');
  console.log('Ada:', reply.text);
} finally {
  await client.close();
}
```