Escape the limitations of no-code builders and the complexity of starting from scratch.
VoltAgent is an open-source TypeScript framework for creating and managing AI agents. It provides modular components to build, customize, and scale agents with ease. From connecting to APIs and memory management to supporting multiple LLMs, VoltAgent simplifies the process of creating sophisticated AI systems. It enables fast development, maintains clean code, and offers flexibility to switch between models and tools without vendor lock-in.
npm create voltagent-app@latest -- --example with-amazon-bedrock- Node.js (v20 or newer)
- npm, yarn, or pnpm
- AWS Account with Amazon Bedrock access
- AWS credentials configured
- Create a new VoltAgent app with Amazon Bedrock example:
npm create voltagent-app@latest -- --example with-amazon-bedrock- Navigate to the project directory:
cd with-amazon-bedrock- Configure AWS credentials:
cp .env.example .envEdit .env with your AWS credentials:
AWS_REGION=us-east-1
# Option 1: AWS Access Keys
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
# Option 2: AWS Profile (recommended)
AWS_PROFILE=your-profile-name- Go to AWS Console
- Navigate to Amazon Bedrock → Model access
- Request access to models (e.g., Claude, Llama, Titan)
- Wait for approval (usually instant)
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm devThis example demonstrates:
- Amazon Bedrock Integration - Access to Claude, Llama, Mistral, and Titan models
- AWS Credential Chain - Automatic credential detection (env vars, profiles, IAM roles)
- Model Router - Use
amazon-bedrock/<model>strings with VoltAgent - Custom Tools - Weather tool example for function calling
- Server Mode - REST API server on port 4000
The example uses Claude 3.5 Sonnet by default. You can change it in src/index.ts:
// Claude models
model: "amazon-bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0";
model: "amazon-bedrock/anthropic.claude-3-opus-20240229-v1:0";
// Llama models
model: "amazon-bedrock/meta.llama3-2-3b-instruct-v1:0";
model: "amazon-bedrock/meta.llama3-1-70b-instruct-v1:0";
// Mistral models
model: "amazon-bedrock/mistral.mistral-large-2407-v1:0";
// Titan models
model: "amazon-bedrock/amazon.titan-text-premier-v1:0";See Bedrock documentation for all available models.
VoltAgent reads Amazon Bedrock credentials from the standard AWS environment variables:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGIONAWS_SESSION_TOKEN(optional, for temporary credentials)
If you already have AWS profiles or IAM roles configured locally, they are picked up automatically by the provider.
.
├── src/
│ └── index.ts # Main application with Bedrock agent
├── .env.example # AWS configuration template
├── .voltagent/ # Auto-generated folder for agent memory
├── package.json
├── tsconfig.json
└── README.md
- Ensure model access is enabled in Bedrock console
- Verify IAM permissions include Bedrock access
- Check AWS_REGION matches where Bedrock and your models are available
- Be aware of Bedrock quotas for your account
- Consider implementing retry logic for production
MIT