Skip to content

Commit afe8fe0

Browse files
committed
fix: applied feedback
1 parent cad892d commit afe8fe0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/core/event_handler/bedrock_agents.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Agents for Amazon Bedrock
33
description: Core utility
44
---
55

6-
Author [Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/agents.html#agents-how){target="_blank"} using event handlers and auto generation of OpenAPI schemas.
6+
Create [Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/agents.html#agents-how){target="_blank"} using event handlers and auto generation of OpenAPI schemas.
77

88
<center>
99
```mermaid
@@ -13,10 +13,10 @@ Author [Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/us
1313

1414
## Key features
1515

16-
* Similar experience when authoring [REST](api_gateway.md){target="_blank"} and [GraphQL APIs](appsync.md){target="_blank"}
1716
* Minimal boilerplate to build Agents for Amazon Bedrock
1817
* Automatic generation of [OpenAPI schemas](https://www.openapis.org/){target="_blank"} from your business logic code
1918
* Built-in data validation for requests and responses
19+
* Similar experience when authoring [REST](api_gateway.md){target="_blank"} and [GraphQL APIs](appsync.md){target="_blank"}
2020

2121
## Terminology
2222

@@ -30,11 +30,11 @@ Author [Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/us
3030

3131
**Large Language Models (LLM)** are very large deep learning models that are pre-trained on vast amounts of data, capable of extracting meanings from a sequence of text and understanding the relationship between words and phrases on it.
3232

33-
**Agent for Amazon Bedrock** is an AWS service to build and deploy conversational agents that can interact with your customers using Large Language Models (LLM) and AWS Lambda functions.
33+
**Agent for Amazon Bedrock** is an Amazon Bedrock feature to build and deploy conversational agents that can interact with your customers using Large Language Models (LLM) and AWS Lambda functions.
3434

3535
## Getting started
3636

37-
???+ tip "All examples shared in this documentation are available within the [project repository](https://github.com/aws-powertools/powertools-lambda-python/tree/develop/examples)"
37+
!!! tip "All examples shared in this documentation are available within the [project repository](https://github.com/aws-powertools/powertools-lambda-python/tree/develop/examples)"
3838

3939
### Install
4040

@@ -50,8 +50,8 @@ To build Agents for Amazon Bedrock, you will need:
5050
|-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|:-------------:|:-------------:|
5151
| [Lambda Function](#your-first-agent) | Defines your business logic for the action group |||
5252
| [OpenAPI Schema](#generating-openapi-schemas) | API description, structure, and action group parameters |||
53-
| Bedrock [Service Role](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html){target="_blank"} | Allows Amazon Bedrock to invoke foundation models |||
54-
| Agent for Bedrock | The service that will combine all the above to create the conversational agent |||
53+
| [Bedrock Service Role](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html){target="_blank"} | Allows Amazon Bedrock to invoke foundation models |||
54+
| Agents for Bedrock | The service that will combine all the above to create the conversational agent |||
5555

5656
=== "Using AWS Serverless Application Model (SAM)"
5757
Using [AWS SAM](https://aws.amazon.com/serverless/sam/){target="_blank"} you can create your Lambda function and the necessary permissions. However, you still have to create your Agent for Amazon Bedrock [using the AWS console](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-create.html){target="_blank"}.
@@ -77,10 +77,10 @@ To build Agents for Amazon Bedrock, you will need:
7777

7878
### Your first Agent
7979

80-
To create an Agent for Amazon Bedrock, use the `BedrockAgentResolver` to annotate your actions.
80+
To create an agent, use the `BedrockAgentResolver` to annotate your actions.
8181
This is similar to the way [all the other Event Handler](api_gateway.md) resolvers work.
8282

83-
It's required to include a `description` for each API endpoint and input parameter. This will improve the understanding Amazon Bedrock has of your actions.
83+
You are required to add a `description` parameter in each endpoint, doing so will improve Bedrock's understanding of your actions.
8484

8585
=== "Lambda handler"
8686

@@ -190,8 +190,7 @@ Similarly, if the response fails validation, your handler will abort the respons
190190

191191
### Generating OpenAPI schemas
192192

193-
Use the `get_openapi_json_schema` function provided by the resolver.
194-
This function will produce a JSON-serialized string that represents your OpenAPI schema.
193+
Use the `get_openapi_json_schema` function provided by the resolver to produce a JSON-serialized string that represents your OpenAPI schema.
195194
You can print this string or save it to a file. You'll use the file later when creating the Agent.
196195

197196
You'll need to regenerate the OpenAPI schema and update your Agent everytime your API changes.
@@ -247,13 +246,13 @@ The following video demonstrates the end-to-end process:
247246
<iframe width="720" height="405" src="https://www.youtube-nocookie.com/embed/NWoC5FTSt7s?si=AG2qpLJbxCkyiLma&amp;controls=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
248247
</center>
249248

250-
During the creation process, you should use the schema generated in the previous step when prompted for an OpenAPI specification.
249+
During the creation process, you should use the schema [previously generated](#generating-openapi-schemas) when prompted for an OpenAPI specification.
251250

252251
## Advanced
253252

254253
### Accessing custom request fields
255254

256-
The event sent by Agents for Amazon Bedrock into your Lambda function contains a number of extra event fields, exposed in the `app.current_event` field.
255+
The event sent by Agents for Amazon Bedrock into your Lambda function contains a [number of extra event fields](#request_fields_table), exposed in the `app.current_event` field.
257256

258257
???+ note "Why is this useful?"
259258
You can for instance identify new conversations (`session_id`) or store and analyze entire conversations (`input_text`).
@@ -267,6 +266,7 @@ The event sent by Agents for Amazon Bedrock into your Lambda function contains a
267266
--8<-- "examples/event_handler_bedrock_agents/src/accessing_request_fields.py"
268267
```
269268

269+
<a id="request_fields_table"></a>
270270
The input event fields are:
271271

272272
| Name | Type | Description |

0 commit comments

Comments
 (0)