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
- Set up AWS BedrockEnsure 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.
- Create a Knowledge BaseCreate 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.
- Define API SchemaDefine 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.
- Create an AgentCreate 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.
- Configure Agent ActionsDefine 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.
- Test and DeployTest 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