Skip to main content
@averta-security/sdk-anthropic wraps an existing Anthropic client and keeps the Anthropic SDK shape intact.
import Anthropic from "@anthropic-ai/sdk";
import { wrapAnthropic } from "@averta-security/sdk-anthropic";

let client = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY!,
});

client = wrapAnthropic(client);

Supported Surface

The current Anthropic wrapper guards:
  • client.messages.create(...)
Streaming is not supported yet. The wrapper fails closed for messages.create({ stream: true }) and messages.stream(...).

What Averta Checks

For Anthropic Messages calls, Averta can:
  • evaluate message input before Anthropic sees it
  • filter tools when policy returns restrict_tools
  • evaluate model-requested tool_use blocks before your app executes them
  • evaluate tool_result content before it goes back to the model
  • evaluate non-streaming final output and request a rewrite when policy allows it

Reading Path

Quickstart

Wrap an Anthropic client and send a guarded Messages request.

Messages API

See how the wrapper guards messages.create(...).

Tools

Understand Anthropic tool exposure and tool-call checks.

Current limits

Review unsupported inputs and streaming limits.