Memory is a critical component of intelligence. While Large Language Models (LLMs) have impressive capabilities, they lack persistent memory across conversations. Amazon Bedrock AgentCore Memory addresses this limitation by providing a managed service that enables AI agents to maintain context over time, remember important facts, and deliver consistent, personalized experiences.
AgentCore Memory operates on two levels:
Short-Term Memory: Immediate conversation context and session-based information that provides continuity within a single interaction or closely related sessions.
Long-Term Memory: Persistent information extracted and stored across multiple conversations, including facts, preferences, and summaries that enable personalized experiences over time.
Each Memory ID (mem-28947293847293) is more like a "System-Level Container" that holds the entire memory structure for the application. The namespaces within it organize different users' data.
Memory ID: mem-28947293847293
├── support/customer/sarah_123/preferences/
│ ├── email_preference
│ └── language_preference
│
├── support/customer/fred_123/preferences/
│ ├── email_preference
│ └── language_preference
│
├── support/customer/sarah_123/semantic/
│ └── past_conversations
│
└── support/customer/fred_123/semantic/
└── past_conversations
Think of it like:
Memory ID = Large Office Building - mem-28947293847293
Namespaces = Different Floors/Sections
User IDs (sarah_123, fred_123) = Individual Offices
Preferences/Semantic = File Cabinets in each office
Real-world Example:
One Memory System (mem-28947293847293)
Serves entire customer support system
Contains all users' data
Organized by namespaces
Further organized by user IDs
We now understand the memory id for the system ( large office building ) , in a long conversation across different calls or sessions we need to organize this data . when we create a memory with all or any these strategy then in a chat conversation the framework extracts and puts the data in right namespaces by reasoning with chat and deciding strategy
is from Amazon's Agent Core framework. main strategy types available:
USER_PREFERENCE
Stores user preferences
Example: Language choice, contact methods, time zones
SEMANTIC
Stores conversational facts and knowledge
Example: Past issues, solutions, technical details
EPISODIC
Stores sequential events/interactions
Example: Conversation history in chronological order
DECLARATIVE
Stores explicit facts and statements
Example: Product specifications, policy information
PROCEDURAL
Stores step-by-step procedures
Example: Troubleshooting steps, workflows
The framework automatically processes conversations and distributes information to appropriate namespaces based on strategies. Here's how:
Simple Example Flow:
Customer: "I prefer to be contacted by email only and my working hours are 9-5 EST"
↓
Framework Analysis:
↓
Automatically Identifies:
- This is a preference → USER_PREFERENCE strategy
- Stores in: support/customer/{id}/preferences/
Another Example:
Customer: "Last month I had issues with EC2 instances crashing"
↓
Framework Analysis:
↓
Automatically Identifies:
- This is historical fact → SEMANTIC strategy
- Stores in: support/customer/{id}/semantic/
Real-world Scenario:
Conversation:
Customer: "Hi, I'm Sarah. I prefer emails, not calls. Last week my database crashed at 3 AM."
↓
Automatic Distribution:
1. "prefer emails" → USER_PREFERENCE namespace
2. "database crashed" → SEMANTIC namespace
Think of it like a Smart Assistant:
Listening to conversation
Understanding context
Filing information automatically
Using right filing cabinet (strategy)
Without manual intervention
The beauty is:
No manual categorization needed
Framework handles the reasoning
Automatically sorts information
Uses AI to understand context
Places data in appropriate namespaces
The data in Agent Core memory is stored in vector stores and persistent storage managed by AWS. Here's the breakdown:
Storage Architecture:
Memory System
├── Vector Store (for semantic search) - Uses Amazon Bedrock's vector database
│ ├── Embeddings of conversations
│ └── Semantic information
│
├── Persistent Storage Uses AWS managed services, survives system restarts
│ ├── User preferences
│ ├── Raw conversation data
│ └── Structured information
│
└── Temporary Cache (RAM)
└── Active session data