-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Corneliu Croitoru
committed
Oct 23, 2024
1 parent
e74bc11
commit 54a9c88
Showing
2 changed files
with
138 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 [email protected] \ | ||
--user-attributes Name=email,[email protected] \ | ||
--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. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.