A generic Streamlit UI for testing generative AI agents built using Agents for Amazon Bedrock.
-
Run the following
pip
command to install the dependencies:pip install -r requirements.txt
-
Set the following environment variables:
BEDROCK_AGENT_ID
- The ID of the agentBEDROCK_AGENT_ALIAS_ID
- The ID of the agent alias. The defaultTSTALIASID
will be used if it is not set.- The AWS environment variables that provides the credentials to your account. The principal must have the necessary permissions to invoke the Bedrock agent.
-
(Optional) Set the folliowing environment variables to customize the UI:
BEDROCK_AGENT_TEST_UI_TITLE
- The page title. The defaultAgents for Amazon Bedrock Test UI
will used if it is not set.BEDROCK_AGENT_TEST_UI_ICON
- The favicon, such as:bar_chart:
. The default Streamlit icon will be used if it is not set.
-
Run the following command to start the Streamlit app:
streamlit run app.py --server.port=8080 --server.address=localhost