agentskit.js
Providers

bedrock

AWS Bedrock — enterprise path for Claude on Anthropic's hosted-on-AWS surface.

import { bedrock } from '@agentskit/adapters'

const adapter = bedrock({
  model: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
  region: 'us-east-1',
})

@aws-sdk/client-bedrock-runtime is an optional peer dependency — the adapter loads it lazily so installs without AWS infra keep working.

npm install @aws-sdk/client-bedrock-runtime

Auth uses the AWS SDK's default credential chain — env vars, shared config, IAM role, SSO. No credentials are read or stored by the adapter itself.

#Options

OptionTypeDefault
modelstringrequired (must start with anthropic.)
regionstringSDK default (env / shared config)
maxTokensnumber4096
clientBedrockRuntimeClientLikeconstructed from region

#Capabilities

{ streaming: true, tools: true, multiModal: true, usage: true, reasoning: model.includes('sonnet' | 'opus') }.

Streams via InvokeModelWithResponseStreamCommand. Tool calls follow the Anthropic-on-Bedrock event shape (content_block_start / content_block_delta / content_block_stop).

#Caveats

  • Optional peer dep. If @aws-sdk/client-bedrock-runtime is not installed, the adapter throws a friendly install hint on the first request.
  • v1 only routes Anthropic models. Titan and other foundation models on Bedrock are tracked as a follow-up.
  • Guardrails are not wired in v1. Plan to add in Phase 2.
  • Knowledge Bases belong in @agentskit/rag.

#Env

VarPurpose
AWS_REGIONDefault region for the SDK
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEYStatic credentials (or use IAM role / SSO)

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page