You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 02-use-cases/video-games-sales-assistant/README.md
+23-13Lines changed: 23 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Deploying a Conversational Data Analyst Assistant Solution with Amazon Bedrock AgentCore
2
2
3
3
> [!IMPORTANT]
4
-
> **🚀 Ready-to-Deploy Agent Web Application**: Use this reference solution to build other agent-powered web applications across different industries. Extend the agent capabilities by adding custom tools for specific industry workflowsand adapt it to various business domains.
4
+
> **🚀 Ready-to-Deploy Agent Web Application**: Use this reference solution to build agent-powered web applications across different industries. Adapt it to your business domain by adding custom agent tools for specific workflows. To accelerate development, use **[Kiro](https://kiro.dev/)** with its **[Powers](https://kiro.dev/powers/)** for Strands Agents SDK, Amazon Bedrock AgentCore, and AWS Amplify, along with the **[AWS CDK MCP Server](https://awslabs.github.io/mcp/servers/cdk-mcp-server)** for infrastructure guidance — so you can extend this solution **without starting from scratch**.
5
5
6
6
This solution provides a Generative AI application reference that allows users to interact with data through a natural language interface. The solution leverages **[Amazon Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/)**, a managed service that enables you to deploy, run, and scale custom agent applications, along with the **[Strands Agents SDK](https://strandsagents.com/)** to build an agent that connects to a PostgreSQL database, providing data analysis capabilities through a Next.js web application built with **[AWS Amplify Gen 2](https://docs.amplify.aws/)**.
7
7
@@ -41,7 +41,10 @@ The AWS CDK stack deploys and configures the following managed services:
41
41
42
42
**Amazon Bedrock AgentCore Resources:**
43
43
-**[AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html)**: Provides the managed execution environment with invocation endpoints (`/invocations`) and health monitoring (`/ping`) for your agent instances
44
-
-**[AgentCore Memory](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory.html)**: A fully managed service that gives AI agents the ability to remember, learn, and evolve through interactions by capturing events, transforming them into memories, and retrieving relevant context when needed
44
+
-**[AgentCore Memory](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory.html)**: A fully managed service that gives AI agents the ability to remember, learn, and evolve through interactions. Configured with:
45
+
-**Short-term memory (STM)**: Event-based conversation history scoped per user and session, providing immediate conversational context within a session
46
+
-**Long-term memory (LTM)**: A semantic "Facts" strategy that asynchronously extracts knowledge from conversations and stores it in per-user namespaces (`/facts/{actorId}`). Facts persist across sessions and are retrieved via vector similarity search, enabling the agent to recall insights from previous conversations
47
+
-**Observability**: Runtime application logs and memory extraction logs delivered to CloudWatch Logs, plus runtime traces to AWS X-Ray — all with 14-day retention
45
48
46
49
The AgentCore infrastructure handles all storage complexity and provides efficient retrieval without requiring developers to manage underlying infrastructure, ensuring continuity and traceability across agent interactions.
47
50
@@ -57,10 +60,11 @@ All configuration values (database ARNs, secret ARNs, model ID, etc.) are passed
57
60
### Amplify Deployment for the Front-End Application
58
61
59
62
-**Next.js Web Application (Amplify Gen 2)**: Delivers the user interface for the assistant
60
-
- Uses Amazon Cognito (via Amplify Gen 2) for user authentication and IAM permissions — no manual IAM configuration needed
63
+
- Uses Amazon Cognito (via Amplify Gen 2) for user authentication and IAM permissions — no manual IAM configuration needed. Each authenticated user's Cognito `sub` is used as the `actorId` for memory, ensuring isolated per-user memory namespaces
61
64
- The application invokes Amazon Bedrock AgentCore for interacting with the assistant (client-side streaming)
62
65
- For chart generation, the application directly invokes the Claude Haiku 4.5 model (client-side)
63
66
- DynamoDB query results are fetched through a Next.js API route (server-side)
67
+
- A Memory Facts panel lets users view the long-term knowledge extracted from their conversations by AgentCore Memory
64
68
65
69
### Strands Agent Features
66
70
@@ -84,7 +88,7 @@ The **user interaction workflow** operates as follows:
84
88
- The web application sends user business questions to the AgentCore Invoke (via client-side streaming)
85
89
- The Strands Agent (powered by Claude Haiku 4.5) processes natural language and determines when to execute database queries
86
90
- The agent's built-in tools execute SQL queries against the Aurora PostgreSQL database and formulate an answer to the question
87
-
- AgentCore Memory captures session interactions and retrieves previous conversations for context
91
+
- AgentCore Memory manages conversation context through the `AgentCoreMemorySessionManager` integration. STM provides conversation continuity within a session (scoped by `sessionId`), while LTM retrieves relevant facts from the `/facts/{actorId}` namespace across all past sessions for that user. LTM extraction is asynchronous (20-40 seconds after events are saved)
88
92
- After the agent's streaming response completes, the raw data query results are fetched from DynamoDB through a Next.js API route to display both the answer and the corresponding records
89
93
- For chart generation, the application invokes a model (powered by Claude Haiku 4.5) to analyze the agent's answer and raw data query results to generate the necessary data to render an appropriate chart visualization
90
94
@@ -105,23 +109,29 @@ The deployment consists of two main steps:
105
109
106
110
The following images showcase a conversational experience analysis that includes: natural language answers, the reasoning process used by the LLM to generate SQL queries, the database records retrieved from those queries, and the resulting chart visualizations.
107
111
108
-

112
+
-**AgentCore data analyst assistant welcome with Memory Facts access**
109
113
110
-
-**Conversational interface with an agent responding to user questions**
114
+

111
115
112
-

116
+
-**Long-term Memory Facts from AgentCore Memory**
113
117
114
-
-**Raw query results displayed in tabular format**
118
+

115
119
116
-

120
+
-**Conversational agent with tool use and reasoning**
117
121
118
-
-**Chart visualization generated from the agent's answer and the data query results (created using [Apexcharts](https://apexcharts.com/))**.
122
+

119
123
120
-

124
+
-**Raw query results in tabular format**
121
125
122
-
-**Summary and conclusion derived from the data analysis conversation**
126
+

123
127
124
-

128
+
-**Auto-generated chart from answer and data**
129
+
130
+

131
+
132
+
-**Conversation summary and data analysis conclusion**
133
+
134
+

Copy file name to clipboardExpand all lines: 02-use-cases/video-games-sales-assistant/amplify-video-games-sales-assistant-agentcore-strands/.env.local.example
0 commit comments