diff --git a/examples/chat-demo-app/README.md b/examples/chat-demo-app/README.md index 9315fe5..44e24ca 100644 --- a/examples/chat-demo-app/README.md +++ b/examples/chat-demo-app/README.md @@ -1,14 +1,142 @@ -# Welcome to your CDK TypeScript project +## ๐ŸŽฎ Demo Application -This is a blank project for CDK development with TypeScript. +### Overview +The demo showcases the versatility of the Multi-Agent Orchestrator System through an interactive chat interface. Watch how the system seamlessly handles diverse queries using specialized agents: -The `cdk.json` file tells the CDK Toolkit how to execute your app. +![Demo Application](./img/demo-app.jpg) -## Useful commands +### Featured Agents +Our extended demo version showcases 6 specialized agents: -* `npm run build` compile typescript to js -* `npm run watch` watch for changes and compile -* `npm run test` perform the jest unit tests -* `npx cdk deploy` deploy this stack to your default AWS account/region -* `npx cdk diff` compare deployed stack with current state -* `npx cdk synth` emits the synthesized CloudFormation template +| Agent | Technology | Purpose | +|-------|------------|---------| +| Travel Agent | Amazon Lex Bot | Flight bookings and travel queries | +| Weather Agent | Bedrock LLM + API Tool | Real-time weather information | +| Restaurant Agent | Amazon Bedrock | Restaurant recommendations | +| Math Agent | Bedrock LLM + Math Tools | Mathematical calculations | +| Tech Agent | Bedrock LLM | Technical support and information | +| Health Agent | Bedrock LLM | Health-related inquiries | + +The demo highlights the system's ability to handle complex, multi-turn conversations while preserving context and leveraging specialized agents across various domains. + +### Key Capabilities +- **Context Switching**: Seamlessly handles transitions between different topics +- **Multi-turn Conversations**: Maintains context across multiple interactions +- **Tool Integration**: Demonstrates API and custom tool usage +- **Agent Selection**: Shows intelligent routing to specialized agents +- **Follow-up Handling**: Processes brief follow-up queries with context retention + +## ๐Ÿ“‹ Prerequisites + +Before deploying the demo web app, ensure you have the following: + +1. An AWS account with appropriate permissions +2. AWS CLI installed and configured with your credentials +3. Node.js and npm installed on your local machine +4. AWS CDK CLI installed (`npm install -g aws-cdk`) + +## ๐Ÿš€ Deployment Steps + +Follow these steps to deploy the demo chat web application: + +1. **Clone the Repository**: + ```bash + git clone https://github.com/awslabs/multi-agent-orchestrator.git + cd multi-agent-orchestrator + ``` + +2. **Navigate to the Demo Web App Directory**: + ```bash + cd examples/chat-demo-app + ``` + +3. **Install Dependencies**: + ```bash + npm install + ``` + +4. **Bootstrap AWS CDK**: + ```bash + cdk bootstrap + ``` + +5. **Review and Customize the Stack** (optional): + Open `chat-demo-app/cdk.json` and review the configuration. You can customize aspects of the deployment by enabling or disabling additional agents. + + ```json + { + "context": { + "enableLexAgent": true + // Additional configurations + } + } + ``` + + **enableLexAgent:** Enable the sample Airlines Bot (See AWS Blogpost [here](https://aws.amazon.com/blogs/machine-learning/automate-the-customer-service-experience-for-flight-reservations-using-amazon-lex/)) + +6. **Deploy the Application**: + ```bash + cdk deploy + ``` + +7. **Create a user in Amazon Cognito user pool**: + ```bash + aws cognito-idp admin-create-user \ + --user-pool-id your-region_xxxxxxx \ + --username your@email.com \ + --user-attributes Name=email,Value=your@email.com \ + --temporary-password "MyChallengingPassword" \ + --message-action SUPPRESS \ + --region your-region + ``` + +## ๐ŸŒ Accessing the Demo + +Once deployment is complete: +1. Open the URL provided in the CDK outputs in your web browser +2. Log in with the created credentials +3. Start interacting with the multi-agent system + +## โœ… Testing the Deployment + +To ensure the deployment was successful: + +1. Open the web app URL in your browser +2. Try different types of queries: + - Travel bookings + - Weather checks + - Math problems + - Technical questions + - Health inquiries +3. Test follow-up questions to see context retention +4. Observe agent switching for different topics + +## ๐Ÿงน Cleaning Up + +To avoid incurring unnecessary AWS charges: +```bash +cdk destroy +``` + +## ๐Ÿ› ๏ธ Troubleshooting + +If you encounter issues during deployment: + +1. Ensure your AWS credentials are correctly configured +2. Check that you have the necessary permissions in your AWS account +3. Verify that all dependencies are correctly installed +4. Review the AWS CloudFormation console for detailed error messages if the deployment fails + +## โžก๏ธ Next Steps + +After exploring the demo: +1. Customize the web interface in the source code +2. Modify agent configurations to test different scenarios +3. Integrate additional AWS services +4. Develop custom agent implementations + +## โš ๏ธ Disclaimer + +This demo application is intended solely for demonstration purposes. It is not designed for handling, storing, or processing any kind of Personally Identifiable Information (PII) or personal data. Users are strongly advised not to enter, upload, or use any PII or personal data within this application. Any use of PII or personal data is at the user's own risk and the developers of this application shall not be held responsible for any data breaches, misuse, or any other related issues. Please ensure that all data used in this demo is non-sensitive and anonymized. + +For production usage, it is crucial to implement proper security measures to protect PII and personal data. This includes obtaining proper permissions from users, utilizing encryption for data both in transit and at rest, and adhering to industry standards and regulations to maximize security. Failure to do so may result in data breaches and other serious security issues. \ No newline at end of file diff --git a/examples/chat-demo-app/img/demo-app.jpg b/examples/chat-demo-app/img/demo-app.jpg new file mode 100644 index 0000000..fba09ba Binary files /dev/null and b/examples/chat-demo-app/img/demo-app.jpg differ