Akarsha Sehwag ce1e2d8367
Add Workshop E2E (#253)
* feat: e2e tutorial lab5

* docs: Add README.md for 05-AgentCore Observability lab

* feat: Add Lab 6 of E2E tutorial

* fix: Fix Agent ECR repository typo

* docs: Update Lab 6 Guidelines

* feat: cleanup guardrails

* docs: fix step name

* added lab4

* Add Lab 3 Identity Notebook and README

* added memory and updated lab 1

* pushing all of the helper files from original use case. Remove as needed

* feat: update lab1 helper file

* chore: restructure utils

* feat: update memory helper

* chore: restructure identity

* chore: append to agent definition from the helper

* Renamed agentcore identity to lab6

* Renamed Gateway notebook to Lab 3 and reviewed with fixes

* Fixed typo in delete_memory

* Lab 1: review and minor fixes

* Lab 1: cleanup

* Lab 2: refactored

* fix: change model to Claude 3.7

* added TODOs

* updated lab1 notebook

* update runtime intro

* refactor utils file

* minor_update to memory

* memory return client

* revert change.

* feat: update runtime lab

* feat: add helper for bedrock guardrails

* fix: fix typos

* docs: minor update

* update lab1 tools

* update memory

* update - runtime

* updated lab3 + lambda

* removed outputs

* changed sh

* removed zip

* added one missing piece

* chore: rm observability old lab

* Updates to Lab6 Identity

* Updates to Lab6 Identity

* updated arch. diagram

* update docs lab1

* rename-lab-5-6

* update arch doc

* lab 03

* fixed lab 3 docs

* Fix Lab 4

* Lab 7 frontend

* Fix lab7

* Fix prereq issues and update gitignore

* adding lab 3 tool removal

* removed checkpoints

* merged

* chore: Update Lab 4 documentation

* fix: Update AgentCore IAM Role to access memory

* Lab 7 fixed invoke to runtime

* minor changes

* removed guardrails + minor edits

* Deleting files and folders.

* Rename, Refactor and deletion

Added sagemaker_helper

* fixing Client

* Removing guardrails code

* remove unused arch

* remove unused files

* updating lab01

* remove policies

* updating lab02

* docs: Update lab 4 markdown

* chore: Update Lab 4

* update cleanup

* cleaning up DS_Store files

* frontend

* updates to lab1 notebook

* updating architectures

* Lab5: fixed response formatting in streamlit app

* updating lab3

* updated lab3

* Lab 5 and Lab 6 and Helper Scripts Updates

Lab 5: Added the architecture diagram
Lab 6: Updated the notebook
Utils: Added helper functions
Sagemaker_helper: Cosmetic Updates

* Updating lab 4

* removing clean up from lab 3

* added lab3 changes

* Streamlit Fixes, Cosmetic Updates, Notebook Updates

* add maira's changes

* update lab2+3

* minor updates

* sync labs

* fix runtime docs

* refactoring end-to-end tutorials

* remove guardrail ss

---------

Co-authored-by: Aleksei Iancheruk <aianch@amazon.fr>
Co-authored-by: EugeneSel <youdjin.sel15@gmail.com>
Co-authored-by: Aidan Ricci <riaidan@amazon.com>
Co-authored-by: Achintya <pinnintiachintya@gmail.com>
Co-authored-by: naresh rajaram <nareshrd@amazon.com>
Co-authored-by: Lorenzo Micheli <lorenzo.micheli@gmail.com>
Co-authored-by: Achintya <apinnint@amazon.com>
Co-authored-by: HT <hardikvt@amazon.com>
Co-authored-by: HT <hardik.thakkar00@gmail.com>
Co-authored-by: Maira Ladeira Tanke <mttanke@amazon.com>
2025-08-14 22:52:33 -04:00
..
2025-08-14 22:52:33 -04:00
2025-07-21 10:45:13 -04:00
2025-07-21 11:34:00 -04:00
2025-07-28 13:45:12 -04:00
2025-07-21 10:45:13 -04:00

Customer Support Agent

Important

The examples provided in this repository are for experimental and educational purposes only. They demonstrate concepts and techniques but are not intended for direct use in production environments.

This is a customer support agent implementation using AWS Bedrock AgentCore framework. The system provides an AI-powered customer support interface with capabilities for warranty checking, customer profile management, Google calendar integration, and Amazon Bedrock Knowledge Base retrieval.

architecture

Table of Contents

Prerequisites

AWS Account Setup

  1. AWS Account: You need an active AWS account with appropriate permissions

  2. AWS CLI: Install and configure AWS CLI with your credentials

    aws configure
    
  3. Bedrock Model Access: Enable access to Amazon Bedrock Anthropic Claude 4.0 models in your AWS region

  4. Python 3.10+: Required for running the application

  5. Create OAuth 2.0 credentials for calendar access : For Google Calendar integration

Deploy

  1. Create infrastructure

    python -m venv .venv
    source .venv/bin/activate
    pip install -r dev-requirements.txt
    
    chmod +x scripts/prereq.sh
    ./scripts/prereq.sh
    
    chmod +x scripts/list_ssm_parameters.sh
    ./scripts/list_ssm_parameters.sh
    

    Caution

    Please prefix all the resource name with customersupport.

  2. Create Agentcore Gateway

    python scripts/agentcore_gateway.py create --name customersupport-gw
    
  3. Setup Agentcore Identity

    • Setup Cognito Credential Provider
    python scripts/cognito_credentials_provider.py create --name customersupport-gateways
    
    python test/test_gateway.py --prompt "Check warranty with serial number MNO33333333"
    
    • Setup Google Credential Provider

    Follow instructions to setup Google Credentials.

    python scripts/google_credentials_provider.py create --name customersupport-google-calendar
    
    python test/test_google_tool.py
    
  4. Create Memory

    python scripts/agentcore_memory.py create --name customersupport
    
    python test/test_memory.py load-conversation
    python test/test_memory.py load-prompt "My preference of gaming console is V5 Pro"
    python test/test_memory.py list-memory
    
  5. Setup Agent Runtime

Caution

Please ensure the name of the agent starts with customersupport.

agentcore configure --entrypoint main.py -er arn:aws:iam::<Account-Id>:role/<Role> --name customersupport<AgentName>

Use ./scripts/list_ssm_parameters.sh to fill:

  • Role = ValueOf(/app/customersupport/agentcore/runtime_iam_role)
  • OAuth Discovery URL = ValueOf(/app/customersupport/agentcore/cognito_discovery_url)
  • OAuth client id = ValueOf(/app/customersupport/agentcore/web_client_id).

configure

Caution

Please make sure to delete .agentcore.yaml before running agentcore launch.


rm .agentcore.yaml

agentcore launch

python test/test_agent.py customersupport<AgentName> -p "Hi"

code

  1. Local Host Streamlit UI

Caution

Streamlit app should only run on port 8501.

streamlit run app.py --server.port 8501 -- --agent=customersupport<AgentName>

Sample Queries

  1. I have a Gaming Console Pro device , I want to check my warranty status, warranty serial number is MNO33333333.

  2. What are the warranty support guidelines ?

  3. Whats my agenda for today?

  4. Can you create an event to setup call to renew warranty?

  5. I have overheating issues with my device, help me debug.

Scripts

Amazon Bedrock AgentCore Gateway

Create Amazon Bedrock AgentCore Gateway

python scripts/agentcore_gateway.py create --name my-gateway
python scripts/agentcore_gateway.py create --name my-gateway --api-spec-file custom/path.json

Delete Amazon Bedrock AgentCore Gateway

# Delete gateway (reads from gateway.config automatically)
python scripts/agentcore_gateway.py delete

# Delete with confirmation skip
python scripts/agentcore_gateway.py delete --confirm

Amazon Bedrock AgentCore Memory

Create Amazon Bedrock AgentCore Memory

python scripts/agentcore_memory.py create --name MyMemory
python scripts/agentcore_memory.py create --name MyMemory --event-expiry-days 60

Delete Amazon Bedrock AgentCore Memory

# Delete memory (reads from SSM automatically)
python scripts/agentcore_memory.py delete

# Delete with confirmation skip
python scripts/agentcore_memory.py delete --confirm

Cognito Credentials Provider

Create Cognito Credentials Provider

python scripts/cognito_credentials_provider.py create --name customersupport-gateways

Delete Cognito Credentials Provider

# Delete provider (reads name from SSM automatically)
python scripts/cognito_credentials_provider.py delete

# Delete specific provider by name
python scripts/cognito_credentials_provider.py delete --name customersupport-gateways

# Delete with confirmation skip
python scripts/cognito_credentials_provider.py delete --confirm

Google Credentials Provider

Create Credentials Provider

python scripts/google_credentials_provider.py create --name customersupport-google-calendar
python scripts/google_credentials_provider.py create --name my-provider --credentials-file /path/to/credentials.json

Delete Credentials Provider

# Delete provider (reads name from SSM automatically)
python scripts/google_credentials_provider.py delete

# Delete specific provider by name
python scripts/google_credentials_provider.py delete --name customersupport-google-calendar

# Delete with confirmation skip
python scripts/google_credentials_provider.py delete --confirm

Agent Runtime

Delete Agent Runtime

# Delete specific agent runtime by name
python scripts/agentcore_agent_runtime.py customersupport

# Preview what would be deleted without actually deleting
python scripts/agentcore_agent_runtime.py --dry-run customersupport

# Delete any agent runtime by name
python scripts/agentcore_agent_runtime.py <agent-name>

Cleanup

chmod +x scripts/cleanup.sh
./scripts/cleanup.sh

python scripts/google_credentials_provider.py delete
python scripts/cognito_credentials_provider.py delete
python scripts/agentcore_memory.py delete
python scripts/agentcore_gateway.py delete
python scripts/agentcore_agent_runtime.py customersupport<AgentName>

rm .agentcore.yaml
rm .bedrock_agentcore.yaml

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details on:

  • Adding new samples
  • Improving existing examples
  • Reporting issues
  • Suggesting enhancements

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

  • Issues: Report bugs or request features via GitHub Issues
  • Documentation: Check individual folder READMEs for specific guidance

🔄 Updates

This repository is actively maintained and updated with new capabilities and examples. Watch the repository to stay updated with the latest additions.