# Amazon Bedrock (/en/ai/models/llm/amazon)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI.
> Documentation version: Main.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-guides-v1.txt).


Amazon Bedrock provides access to a variety of foundation models (FMs) from leading AI providers through a fully managed AWS service.

### Sample configuration

The following example shows how to configure Amazon Bedrock LLM when starting a conversational AI agent.

**Python SDK**

```python
from agora_agent import Agent, AmazonBedrock

# client is your configured Agora client
agent = (
    Agent(client)
    .with_stt(...)  # configure your STT vendor
    .with_llm(AmazonBedrock(
        access_key='your-aws-access-key-id',
        secret_key='your-aws-secret-access-key',
        region='us-east-1',
        model='us.anthropic.claude-sonnet-4-20250514-v1:0',
        system_messages=[{'role': 'system', 'content': 'You are a helpful chatbot.'}],
    ))
    .with_tts(...)  # configure your TTS vendor
)
```

**TypeScript SDK**

```typescript
import { Agent, AmazonBedrock } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(/* configure your STT vendor */)
  .withLlm(new AmazonBedrock({
    accessKey: 'your-aws-access-key-id',
    secretKey: 'your-aws-secret-access-key',
    region: 'us-east-1',
    model: 'us.anthropic.claude-sonnet-4-20250514-v1:0',
    systemMessages: [{ role: 'system', content: 'You are a helpful chatbot.' }],
  }))
  .withTts(/* configure your TTS vendor */);
```

**Go SDK**

```go
import (
    "github.com/AgoraIO/agora-agents-go/v2/agentkit"
    "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"
)

// client is your configured Agora client
agent := agentkit.NewAgent(client).WithStt(/* configure your STT vendor */).
  WithLlm(
    vendors.NewAmazonBedrock(vendors.AmazonBedrockOptions{
        AccessKey: "your-aws-access-key-id",
        SecretKey: "your-aws-secret-access-key",
        Region:    "us-east-1",
        Model:     "us.anthropic.claude-sonnet-4-20250514-v1:0",
        SystemMessages: []map[string]interface{}{
            {"role": "system", "content": "You are a helpful chatbot."},
        },
    }),
).WithTts(/* configure your TTS vendor */)
```

**REST API**

Use the following `llm` configuration in your request:

```json
"llm": {
    "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-4-20250514-v1:0/converse-stream",
    "api_key": "<your_bedrock_api_key>",
    "access_key": "<your_aws_access_key_id>",
    "secret_key": "<your_aws_secret_access_key>",
    "region": "us-east-1",
    "model": "us.anthropic.claude-sonnet-4-20250514-v1:0",
    "system_messages": [
        {
            "role": "system",
            "content": "You are a helpful chatbot."
        }
    ],
    "style": "bedrock"
}
```

### Key parameters

**llm required**

**`url` (string) required**

The Amazon Bedrock runtime endpoint for the target region and model. See [Amazon Bedrock endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bedrock_region) for the correct endpoint format.

**`api_key` (string) optional**

Your Bedrock API key for authentication. Use either `api_key` alone, or both `access_key` and `secret_key` together for authentication.

**`access_key` (string) optional**

Your AWS Access Key ID for authenticating Bedrock API calls. Required if not using `api_key`. Must be used together with `secret_key`. Get your access key from the [AWS IAM Console](https://console.aws.amazon.com/iam/).

**`secret_key` (string) optional**

Your AWS Secret Access Key for authenticating Bedrock API calls. Required if not using `api_key`. Must be used together with `access_key`. Get your secret key from the [AWS IAM Console](https://console.aws.amazon.com/iam/).

**`region` (string) required**

The AWS region hosting the Bedrock model, for example, `us-east-1` or `us-west-2`. See [Supported Regions and models](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html) for available regions.

**`style` (string) required**

The API style to use. Set to `bedrock` for Amazon Bedrock models.

For advanced configuration options, model capabilities, and detailed parameter descriptions, see the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html).
