Anthropic
Installation
Make sure the Anthropic SDK is installed:
npm install @anthropic-ai/sdkpnpm add @anthropic-ai/sdkbun add @anthropic-ai/sdkyarn add @anthropic-ai/sdkMake sure the Voker Typescript SDK is installed.
Note: the SDK does not currently support Audio, Video or Image modalities.
Messages
import { Anthropic } from '@anthropic-ai/sdk';
import { Anthropic } from '@voker/voker/ai/provider-anthropic';
const client = new Anthropic();
await client.messages.create({
vokerAgent: 'customer-support-agent', // required
vokerSession: 'user-session-1', // required
model: 'claude-4-sonnet-20250514',
max_tokens: 100,
messages: [
{
role: 'user',
content: 'Hello, world!',
},
],
});Beta Messages
import { Anthropic } from '@anthropic-ai/sdk';
import { Anthropic } from '@voker/voker/ai/provider-anthropic';
const client = new Anthropic();
await client.beta.messages.create({
vokerAgent: 'customer-support-agent', // required
vokerSession: 'user-session-1', // required
model: 'claude-4-sonnet-20250514',
max_tokens: 100,
messages: [
{
role: 'user',
content: 'Hello, world!',
},
],
});