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

# Function: shutdown()

> Generated from the public TypeScript API.

```ts theme={null}
function shutdown(): Promise<void>;
```

Close all canonical and dedicated clients owned by the facade.

Injected clients are borrowed and are never closed. Concurrent calls share
one shutdown operation; a later facade operation may create a fresh
canonical client.

## Returns

`Promise`\<`void`>

A promise that settles after every owned client has been handled.

## Throws

When teardown fails; multiple failures are combined in an `AggregateError`.

## Example

```ts theme={null}
import { shutdown } from "cognitio-agent-sdk"

await shutdown()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.