Lab 06
Lab 6: AgentCore Memory
Turn your Mortgage Assistant into a truly intelligent agent that remembers past interactions, learns user preferences, and maintains context across multiple conversations using Amazon Bedrock AgentCore Memory.
Memory Types
- Short-term Memory — stores conversations to track immediate context within sessions
- Long-term Memory — stores extracted insights — preferences, facts, and summaries — across sessions
- Semantic Retrieval — retrieve relevant memories using natural language
- User Preference Strategy — extract and persist user preferences automatically
Two Implementation Options
Option 1: Strands Agents Hooks
Fine-grained control over memory store and retrieval. Notebook: option_1_agentcore_memory_with_strands_agents_hooks.ipynb
Option 2: Session Manager
Quick to set up and easy to use. Notebook: option_2_agentcore_memory_with_strands_session_manager.ipynb
Lab 07
Lab 7: AgentCore Observability
AgentCore Observability helps you trace, debug, and monitor agent performance in production. Emits telemetry in OpenTelemetry (OTEL)-compatible format with detailed visualizations of each step in the agent workflow.
Key Components
- Service Metrics — 1-minute aggregations for invocations, latency, token usage, and errors
- Structured Logs — JSON lines capturing all agent events and operations in CloudWatch
- Spans & Traces — OTEL spans for full execution graphs via CloudWatch Transaction Search
- GenAI Dashboard — pre-built visualizations for runtime metrics and trace drill-downs
Notebook
07-agentcore-observability/Observability.ipynb
How It Works
- Enable Transaction Search once per account to allow span ingestion
- Create runtime resources — automatically provisions log groups and metric namespaces
- Instrument code with ADOT: install aws-opentelemetry-distro
- Agent invocation generates service metrics automatically
- Telemetry flows to CloudWatch — metrics, spans, and logs
- Use the built-in Observability page or build CloudWatch alarms