Skip to content

Repository files navigation

AIsleBot — The Ecommerce AI Support Agent

AIsleBot is an AI customer support agent built with Amazon Bedrock AgentCore and the Strands Agents SDK. It helps customers track orders, request refunds, find product and policy information, and calculate loyalty discounts. Persistent memory lets it remember customer details and communication preferences across conversations.

Features

  • Order tracking: Look up order status, shipment details, and customer orders.
  • Refund requests: Process simulated refunds through a dedicated Lambda function.
  • Knowledge-base search: Retrieve product specifications, return policies, and loyalty benefits from an Amazon Bedrock Knowledge Base.
  • Customer memory: Store and retrieve customer facts and preferences using AgentCore Memory.
  • Loyalty calculations: Calculate points redemption and tier discounts using AgentCore Code Interpreter, with a limited local fallback when the service is unavailable.
  • Web browsing: Visit websites and retrieve information using AgentCore Browser.

How it works

The agent runs on Amazon Bedrock AgentCore Runtime and uses an Amazon Nova model through the Strands Agents SDK to interpret requests and select tools.

Order tracking goes through AgentCore Gateway and an API Gateway REST API to the order-tracking Lambda. Refund requests use a direct Lambda target on AgentCore Gateway. Knowledge-base retrieval, memory, code execution, and browsing connect to their respective AWS services.

The order and customer records are sample data, and refunds are simulated. This is a learning and portfolio project, not a live ecommerce or payment service. The included catalog and policies are demonstration content, not official Amazon policies.

Project structure

.
├── main.py                 # Agent, tools, memory hooks, and runtime entry point
├── lambda/
│   ├── order_tracker.py    # Sample order and customer lookups
│   ├── refund_processor.py # Simulated refund processing
│   └── lambda_schema      # Gateway tool schema
├── product_catalog.txt    # Sample knowledge-base source content
├── pyproject.toml          # Python dependencies
├── uv.lock                 # Dependency lockfile
├── .env.example            # Configuration template
└── Project Reflection.md   # Design decisions and lessons learned

Configuration

The project requires Python 3.14+, the dependencies in pyproject.toml, and access to configured AWS resources: a Bedrock model, AgentCore Gateway and its targets, a Knowledge Base, and AgentCore Memory. Browser and Code Interpreter access are also needed for their respective tools.

Install dependencies with uv sync. Copy .env.example to .env and supply your own resource values:

Variable Purpose
GATEWAY_URL AgentCore Gateway MCP endpoint
KB_ID Bedrock Knowledge Base ID
MEMORY_ID AgentCore Memory ID
AWS_REGION AWS region; defaults to us-east-1

Load the variables into your Bash session before starting the agent:

set -a
source .env
set +a

The application does not load .env automatically. A deployed runtime also needs these variables configured in its own environment. AWS authentication uses the normal credential provider locally and an execution role when deployed. Each role needs permissions for the services it calls.

Local configuration, generated deployment files, and virtual environments are excluded from Git. AWS infrastructure must be provisioned separately; cloning this repository does not create it.

Example requests

  • “Can you track order ORD-001 for customer CUST-123?”
  • “I want to return my Kindle Paperwhite from order ORD-002.”
  • “What are the benefits of the Platinum loyalty tier?”
  • “I am a Gold member with 4,250 points. Calculate my discount on a $150 order.”
  • “My name is Jane, and I prefer concise responses.”
  • “Go to https://www.udacity.com and tell me the page title.”

Background

Built as part of the Udacity AWS AI Engineering Nanodegree. The project explores tool integration, retrieval-augmented generation, persistent memory, cloud deployment, and troubleshooting IAM permissions across AWS services.

About

AIsleBot is an AI customer support agent built with Amazon Bedrock AgentCore, featuring order tracking, refunds, knowledge-base search, loyalty calculations, web browsing, and persistent memory.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages