AvertaDecisionClient when you need to call Averta directly instead of using a provider wrapper.
Options
Methods
If your provider has a first-class wrapper, use the wrapper instead. Hand-rolling the lifecycle is more code and easier to get wrong.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a low-level Averta client for custom provider adapters.
AvertaDecisionClient when you need to call Averta directly instead of using a provider wrapper.
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",
},
});
| 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. |
| Method | Checkpoint |
|---|---|
preflight(...) | Request and tool exposure |
checkToolCall(...) | Model-requested tool calls |
checkToolResult(...) | Returned tool content |
checkOutput(...) | Final model output |