Bedrock Agent - Setting User Input parameter through the API

0

When creating or updating an Agent in Bedrock through the management console, you have the option to configure the User Input option ("Select whether the agent can prompt additional information from the user when it does not have enough information to respond to an utterance."). However, when you create an Agent through the API, or CDK (CloudFormation), this option is not available and the default value is False.

Is there a way to modify the default value to True through the service API?

MLGuy
preguntada hace un mes360 visualizaciones
2 Respuestas
0
Respuesta aceptada

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"
        )
MLGuy
respondido hace 10 días
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

profile pictureAWS
EXPERTO
Matt-B
respondido hace un mes
profile picture
EXPERTO
revisado hace un mes
  • @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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas