import Anthropic from '@anthropic-ai/sdk'
import { Inviolet } from '@inviolet/agent-sdk-core'
import { wrapAnthropic } from '@inviolet/agent-sdk-anthropic'
const inviolet = new Inviolet({
gatewayUrl: process.env.INVIOLET_GATEWAY_URL!,
apiKey: process.env.INVIOLET_API_KEY!,
agentId: 'support-copilot',
})
const anthropic = wrapAnthropic(new Anthropic(), {
inviolet,
intentId: 'intents:customer_support_lookup',
actor: 'alice@example.com',
audience: 'postgres-prod',
})
// Use the wrapped client exactly as you would the real one.
const message = await anthropic.messages.create({
model: 'claude-opus-4-8',
tools: [/* your tool defs */],
messages: [{ role: 'user', content: 'Look up Bob Smith' }],
})