---
title: AmazonBedrockAgent
description: Documentation for the AmazonBedrockAgent in the Multi-Agent Orchestrator
---

The `AmazonBedrockAgent` is a specialized agent class in the Multi-Agent Orchestrator that integrates directly with [Amazon Bedrock agents](https://aws.amazon.com/bedrock/agents/?nc1=h_ls).

## Creating an AmazonBedrockAgent

To create a new `AmazonBedrockAgent` with only the required parameters, use the following code:

import { Tabs, TabItem } from '@astrojs/starlight/components';

<Tabs syncKey="runtime">
  <TabItem label="TypeScript" icon="seti:typescript" color="blue">
    ```typescript
    import { AmazonBedrockAgent } from 'multi-agent-orchestrator';

    const agent = new AmazonBedrockAgent({
      name: 'My Bank Agent',
      description: 'You are a helpful and friendly agent that answers questions about loan-related inquiries',
      agentId: 'your-agent-id',
      agentAliasId: 'your-agent-alias-id'
    });
    ```
  </TabItem>
  <TabItem label="Python" icon="seti:python">
    ```python
    from multi_agent_orchestrator.agents import AmazonBedrockAgent, AmazonBedrockAgentOptions

    agent = AmazonBedrockAgent(AmazonBedrockAgentOptions(
        name='My Bank Agent',
        description='You are a helpful and friendly agent that answers questions about loan-related inquiries',
        agent_id='your-agent-id',
        agent_alias_id='your-agent-alias-id'
    ))
    ```
  </TabItem>
</Tabs>

In this basic example, we provide the four required parameters: `name`, `description`, `agent_id`, and `agent_alias_id`.

### Parameter Explanations

- `name`: (Required) Identifies the agent within your system.
- `description`: (Required) Describes the agent's purpose or capabilities.
- `agent_id`: (Required) The ID of the Amazon Bedrock agent you want to use.
- `agent_alias_id`: (Required) The alias ID of the Amazon Bedrock agent.

## Adding the Agent to the Orchestrator

To integrate the AmazonBedrockAgent into your Multi-Agent Orchestrator, follow these steps:

1. First, ensure you have created an instance of the orchestrator:

<Tabs syncKey="runtime">
  <TabItem label="TypeScript" icon="seti:typescript" color="blue">
    ```typescript
    import { MultiAgentOrchestrator } from "multi-agent-orchestrator";

    const orchestrator = new MultiAgentOrchestrator();
    ```
  </TabItem>
  <TabItem label="Python" icon="seti:python">
    ```python
    from multi_agent_orchestrator.orchestrator import MultiAgentOrchestrator

    orchestrator = MultiAgentOrchestrator()
    ```
  </TabItem>
</Tabs>

2. Then, add the agent to the orchestrator:

<Tabs syncKey="runtime">
  <TabItem label="TypeScript" icon="seti:typescript" color="blue">
    ```typescript
    orchestrator.addAgent(agent);
    ```
  </TabItem>
  <TabItem label="Python" icon="seti:python">
    ```python
    orchestrator.add_agent(agent)
    ```
  </TabItem>
</Tabs>

3. Now you can use the orchestrator to route requests to the appropriate agent, including your Amazon Bedrock agent:

<Tabs syncKey="runtime">
  <TabItem label="TypeScript" icon="seti:typescript" color="blue">
    ```typescript
    const response = await orchestrator.routeRequest(
      "What is the base rate interest for 30 years?",
      "user123",
      "session456"
    );
    ```
  </TabItem>
  <TabItem label="Python" icon="seti:python">
    ```python
    response = await orchestrator.route_request(
        "What is the base rate interest for 30 years?",
        "user123",
        "session456"
    )
    ```
  </TabItem>
</Tabs>


---

By leveraging the `AmazonBedrockAgent`, you can easily integrate **pre-built Amazon Bedrock agents** into your Multi-Agent Orchestrator.