> ## Documentation Index
> Fetch the complete documentation index at: https://docs.averta.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Decision client

> Create a low-level Averta client for custom provider adapters.

Use `AvertaDecisionClient` when you need to call Averta directly instead of using a provider wrapper.

```typescript theme={null}
import { AvertaDecisionClient } from "@averta-security/sdk-core";

const averta = new AvertaDecisionClient({
  avertaApiKey: process.env.AVERTA_API_KEY!,
  clientMetadata: {
    name: "my-custom-adapter",
    version: "0.1.0",
  },
});
```

## Options

| Option              | Required | Description                                                      |
| ------------------- | -------- | ---------------------------------------------------------------- |
| `avertaApiKey`      | Yes      | Runtime Averta API key.                                          |
| `avertaBaseUrl`     | No       | Defaults to `https://api.averta.io`.                             |
| `decisionTimeoutMs` | No       | Defaults to `30000`. Set `0` to disable the SDK-managed timeout. |
| `fetch`             | No       | Custom `fetch` implementation.                                   |
| `clientMetadata`    | Yes      | Adapter name and version sent as client metadata.                |

## Methods

| Method                 | Checkpoint                 |
| ---------------------- | -------------------------- |
| `preflight(...)`       | Request and tool exposure  |
| `checkToolCall(...)`   | Model-requested tool calls |
| `checkToolResult(...)` | Returned tool content      |
| `checkOutput(...)`     | Final model output         |

If your provider has a first-class wrapper, use the wrapper instead. Hand-rolling the lifecycle is more code and easier to get wrong.
