Enable user input in Amazon Bedrock - Amazon Bedrock

Enable user input in Amazon Bedrock

If user input is enabled, agent reprompts the user for information about the missing parameters.

You can enable user input in the Amazon Bedrock console when you create or modify your agent. If you are using API or SDKs, you can enable user input when you create or update action group.

To learn how to enable user input in Amazon Bedrock, choose the tab for your preferred method, and then follow the steps:

Console
To enable user input for your agent
  1. If you're not already in the agent builder, do the following:

    1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

    2. Select Agents from the left navigation pane. Then, choose an agent in the Agents section.

    3. Choose Edit in Agent Builder

  2. Go to Additional settings and expand the section.

  3. For User input, select Enabled.

    Configure your agent to ask user for more information if the required information is not there to complete a task. You can configure the agent by enabling user input in your agent's action group.
  4. Make sure to first Save and then Prepare to apply the changes you have made to the agent before testing it.

API

To enable user input for your agent, send an CreateActionGroup request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint and specify the following fields:

Field Short description
actionGroupName Name of the action group
parentActionGroupSignature Specify AMAZON.UserInput to allow the agent to request information from the user
actionGroupState Specify ENABLED to allow the agent to request information from user

The following shows the general format of the required fields for enabling user input with an CreateActionGroup request.

CreateAgentActionGroup: { "actionGroupName": "AskUserAction", "parentActionGroupSignature": "AMAZON.UserInput", "actionGroupState": "ENABLED" }