Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.82 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.82 KB

Agents for Amazon Bedrock Test UI

A generic Streamlit UI for testing generative AI agents built using Agents for Amazon Bedrock. For more information, refer to the blog post Developing a Generic Streamlit UI to Test Amazon Bedrock Agents.

Prequisites

Running Locally

  1. Run the following pip command to install the dependencies:

    pip install -r requirements.txt
    
  2. Set the following environment variables either directly or using a .env file (use .env.template as a starting point):

    • BEDROCK_AGENT_ID - The ID of the agent.
    • BEDROCK_AGENT_ALIAS_ID - The ID of the agent alias. The default TSTALIASID 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.
  3. (Optional) Set the following environment variables similarly to customize the UI:

    • BEDROCK_AGENT_TEST_UI_TITLE - The page title. The default Agents 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.
  4. (Optional) Set the LOG_LEVEL environment variable for additional logging using a standard format. If more advanced configuration is needed, copy logging.yaml.template and logging.yaml and configure it as appropriate.

  5. Run the following command to start the Streamlit app:

    streamlit run app.py --server.port=8080 --server.address=localhost