Skip to main content
Article·aws.amazon.com
agent-platformawsenterpriseserverlessmulti-modelbedrockknowledge-baseapi-integration

AWS Bedrock Agents

Learn how to use AWS Bedrock Agents to automate complex tasks by orchestrating foundation models, APIs, and knowledge bases, all within a secure and compliant environment.

intermediate1-2 hours6 steps
The play
  1. Set up AWS Bedrock
    Ensure you have an AWS account and access to Amazon Bedrock. Navigate to the Bedrock service in the AWS Management Console and enable access to the foundation models you intend to use with your agent.
  2. Create a Knowledge Base
    Create a knowledge base in Bedrock. This involves specifying a data source (e.g., S3 bucket) containing the information your agent will use. Configure the embedding model and chunking strategy for optimal retrieval.
  3. Define API Schema
    Define the API schema that your agent will use to interact with external services. This typically involves uploading an OpenAPI specification (Swagger) file that describes the API endpoints, request parameters, and response formats.
  4. Create an Agent
    Create a new agent in Bedrock. Configure the agent's name, description, and the foundation model it will use. Specify the knowledge base and API schema you created in the previous steps.
  5. Configure Agent Actions
    Define the actions that your agent can perform. Map the API endpoints to specific actions that the agent can trigger based on user requests. Configure the agent's prompting strategy to guide its behavior.
  6. Test and Deploy
    Test your agent by providing sample user requests. Monitor the agent's execution trace to ensure it is correctly breaking down the request, calling APIs, and querying the knowledge base. Deploy the agent to make it available to users.
Starter code
Start by exploring the AWS Bedrock console and reviewing the available foundation models and example agents.  Familiarize yourself with the OpenAPI specification format for defining API schemas.
Source
AWS Bedrock Agents — Action Pack