anthropic(modelId, config?) from @agentium/core for Claude’s Messages API.
Setup
Factory
claude-agent.ts and run with npx tsx claude-agent.ts.
Supported models
These examples useclaude-sonnet-5-5; claude-opus-5-5 is an explicit choice for heavier work. Consult Example models and the Anthropic catalog for the October 4, 2026 baseline. Model availability and pricing are provider-owned.
Config
PassapiKey to override ANTHROPIC_API_KEY. For AWS-hosted Claude, use the separate Bedrock Claude adapter and an inference profile/model identifier available in your region.
Reasoning / extended thinking
For Claude 5 and supported newer Claude families, v4 sends adaptive thinking with summarized display when reasoning is enabled.effort maps to output_config.effort; an older budgetTokens value does not impose a fixed thinking budget on that path. Unsupported sampling fields are omitted for detected reasoning-only model families.
Older models use the enabled-thinking token-budget path, with output capacity adjusted when needed. Keep historical examples tied to their original model rather than applying their budget settings to adaptive thinking.
The adapter preserves signed thinking and tool-use content for continuation. Do not discard providerExtras when persisting a tool conversation, or replay another provider’s continuation through Claude. See reasoning.
Prompt caching
Use the Agent’sproviderOptions.promptCache for the adapter’s ephemeral system-prompt cache control. Cache access, pricing, and retention are governed by the provider. Provider options also cover context management; confirm model support before enabling provider-specific edits.
Multi-modal support
Supply images and supported documents through multimodal content. Native audio input is not supplied by this text provider; pair an Agent with a speech pipeline for voice applications.Full example
Passanthropic(process.env.ANTHROPIC_MODEL ?? "claude-sonnet-5-5") to the runResearch(model) function in the harness recipe, after installing the Anthropic SDK. Start a fresh session when switching providers.