3 Answers
- Newest
- Most votes
- Most comments
0
The answer about using the Action Group was in the right direction, however, it was missing some details. After some trial and error, I discovered that you need to add another action group to the agent, but it has to have the following details to enable the user input:
agent.add_action_group(
action_group_name = "UserInputAction",
action_group_state="ENABLED",
parent_action_group_signature="AMAZON.UserInput"
)
answered 10 months ago
0
Hi There
This is set in the Action Group. See https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#bedrock-agent_CreateAgentActionGroup-request-parentActionGroupSignature
parentActionGroupSignature
To allow your agent to request the user for additional information when trying to complete a task, set this field to AMAZON.UserInput. You must leave the description, apiSchema, and actionGroupExecutor fields blank for this action group.
During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.
Type: String
Valid Values: AMAZON.UserInput
Required: No
0
in CDK Python within the CfnAgent:
action_groups=[
aws_bedrock.CfnAgent.AgentActionGroupProperty(
action_group_name="UserInputAction",
action_group_state="ENABLED", # #Allowed values: ENABLED | DISABLED
parent_action_group_signature="AMAZON.UserInput"
),
]
answered 6 months ago
Relevant content
- asked 8 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 23 days ago
- AWS OFFICIALUpdated 7 months ago
@Matt-B, Thank you for your prompt answer. I'm still trying to understand how do I pass this
AMAZON.UserInput
? It is not a string ("AMAZON.UserInput"
) and I can't find where it is defined to include it in my CDK code.