Skip to content

Latest commit

Β 

History

History
36 lines (26 loc) Β· 698 Bytes

File metadata and controls

36 lines (26 loc) Β· 698 Bytes

Step 3 - Self-Learning with AgentCore Memory

Attaches Amazon Bedrock AgentCore Memory β†’ the agent remembers you across sessions.

One-time setup

pip install -r requirements.txt
python create_memory.py            # prints the memory ID
export BEDROCK_AGENTCORE_MEMORY_ID=<paste printed value>

Run

python agent.py

Try this

Session 1:

πŸ¦† My name is Sam. I prefer Python, love sailing, and I'm building ag-drones.
πŸ¦† exit

Session 2 (same terminal or new):

python agent.py
πŸ¦† what do you remember about me?
πŸ¦† suggest a weekend project

Each actor_id (defaults to $USER) gets its own memory namespace.

Next β†’ step-04-ambient.