Prerequisites
Prior Knowledge of
- Strands Agents
- Python 3.1x
- AWS Credentials with access to Bedrock and related components
- Access to Anthropic Claude Haiku 4.5
- AgentCore Short-term Memory with MemoryManager, AgentInitializedEvent and MessageAddedEvent hooks
We will use MemoryManager to store short term conversational history and retrieve n number of conversations
This is a simple AWS Strands agents that uses a web search tool to query and store the results.
Initialize agents with conversation history using session management
Can use this to help Migrate from MemoryClient to MemoryManager architecture
This example demonstrates Short Term Memory of AgentCore. Below is the high level architecture.
Project Structure
STEP1: Requirements.txt - Packages Needed
STEP2: Packages Installation
STEP3: Import all packages
STEP4: Memory Manager Initialization(Memory_Manager.py)
STEP5: Memory SessionManager Initialization(Memory_Manager.py)
STEP6.1: MemoryHookProvider Initialization - Part 1

STEP6.2: MemoryHookProvider Initialization - Part 2

STEP7: Agent Tools Definition (Agent_Tools.py)

STEP8: Agent Initialization (Personal_Agent.py)
AGENT Testing in Terminal













Top comments (0)