Skip to content

agent-provider-anthropic / Exports / IAnthropicProviderOptions

Interface: IAnthropicProviderOptions

Anthropic provider options

Note: Anthropic API doesn't support response format configuration. JSON output can be requested through prompt instructions.

Indexable

▪ [key: string]: TAnthropicProviderOptionValue

Additional provider-specific options

Table of contents

Properties

Properties

apiKey

Optional apiKey: string

Anthropic API key (required when client is not provided)

Defined in

agent-provider-anthropic/src/types.ts:34


timeout

Optional timeout: number

API request timeout (milliseconds)

Defined in

agent-provider-anthropic/src/types.ts:39


baseURL

Optional baseURL: string

API base URL

Defined in

agent-provider-anthropic/src/types.ts:44


client

Optional client: Anthropic

Anthropic client instance (optional: will be created from apiKey if not provided)

Defined in

agent-provider-anthropic/src/types.ts:49


executor

Optional executor: IExecutor

Optional executor for handling AI requests

When provided, the provider will delegate all chat operations to this executor instead of making direct API calls. This enables remote execution capabilities.

Example

typescript
import { LocalExecutor, RemoteExecutor } from '@robota-sdk/agent-core';

// Local execution (registers this provider)
const localExecutor = new LocalExecutor();
localExecutor.registerProvider('anthropic', new AnthropicProvider({ apiKey: 'sk-ant-...' }));

// Remote execution
const remoteExecutor = new RemoteExecutor({
  serverUrl: 'https://api.robota.io',
  userApiKey: 'user-token-123'
});

const provider = new AnthropicProvider({
  executor: remoteExecutor // No direct API key needed
});

Defined in

agent-provider-anthropic/src/types.ts:76

Released under the MIT License.