- Newest
- Most votes
- Most comments
Hi Rahul,
To personalize the chat experience for users and include the email ID of the logged-in user in the context before the chat starts, you can follow these steps:
-
Define a function detail in your action group that includes an email parameter:
- In the Amazon Bedrock console, go to the "Action groups" section and create a new action group.
- In the "Action group details" section, select "Define with function details" as the action group type.
- Add a new function and define a parameter for the email address, making it a required field.
-
Process the email parameter using an action group:
- In the "Actions" section of the action group, you can define an action that processes the email parameter.
- You can use the email parameter to personalize the chat experience, such as greeting the user by name.
Here's an example of how you can define the function details and an action to process the email parameter:
Function Details:
Parameter Name: Email
Parameter Type: string
Required: Yes
Action:
Action Type: Custom
Action Name: Greet User
Parameters:
- Email
Action Logic:
Greet the user by name using the provided email address
By following these steps, you can include the email ID of the logged-in user in the context before the chat starts and process this data using an action group in your Bedrock agent.
You can follow these documents for more details.
Create an action group for an Amazon Bedrock agent - Amazon Bedrock
Define function details for your agent's action groups in Amazon Bedrock - Amazon Bedrock
Add an action group to your agent in Amazon Bedrock - Amazon Bedrock
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 20 hours ago
- AWS OFFICIALUpdated 20 hours ago

It's a good idea to greet the user with an email ID, but I want to provide the email ID from the SDK using the API field 'sessionAttribute'. Is that possible? The action group might create an agent to capture the email ID whenever a user says, "This is my email." It won’t be constant. Let me know if I'm thinking in the right direction or if you have a better solution.