Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable User Input in LangChain AWS Bedrock Agent #230

Open
cardutr opened this issue Oct 7, 2024 · 2 comments
Open

Enable User Input in LangChain AWS Bedrock Agent #230

cardutr opened this issue Oct 7, 2024 · 2 comments
Assignees
Labels

Comments

@cardutr
Copy link

cardutr commented Oct 7, 2024

Hello! I am creating and agent on AWS BedRock using LangChain and would like to enable User Input [figure] on the code. I checked the documentation and I couldn't find any information about how to enable user interaction for this scenario. It seems like this functionality may not currently be supported and could require development.

This is the code:
from langchain_aws.agents import BedrockAgentsRunnable
agent = BedrockAgentsRunnable.create_agent(
            agent_name="risk_agent",
            agent_resource_role_arn=agent_resource_role_arn,
            foundation_model=foundational_model,
            instruction=SYSTEM_INSTRUCTIONS,
            tools=list_tools,
            guardrail_configuration=None,
        )

image

@Zhenye-Na
Copy link

Based on my current experience with Bedrock Agent, to enable userInput just like the screenshot you included above for agent itself is not currently supported yet.


However, there is a workaround and you could check to see if this fits your specific use cases

You can leverage CreateAgentActionGroup API with the following request to enable userInput for a specific Agent ActionGroup

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

where parentActionGroupSignature allows 'AMAZON.UserInput'|'AMAZON.CodeInterpreter'

More specifically, updates could be made in the following places during create_agent_action_group API call to enable the flag


References

@3coins
Copy link
Collaborator

3coins commented Oct 23, 2024

cc @kcgourishetti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants