Skip to content

User Memory

User Memory enables agents to remember information about users across all sessions, learning preferences and context to deliver increasingly personalized interactions over time. Powered by AWS Bedrock's Agent Core Memory feature, this capability transforms one-off conversations into ongoing relationships.

User Memory automatically captures and stores information about each user during conversations. This information is securely stored and seamlessly retrieved when the user returns for future conversations, enabling agents to provide contextually relevant, personalized responses without requiring users to repeat themselves.

Without user memory, every conversation starts from scratch:

  • Users must re-explain their role and preferences
  • Agents can't adapt to individual communication styles
  • Context from previous sessions is lost
  • Personalization is impossible
  • User experience feels impersonal and repetitive

With user memory:

  • Agents remember who users are and what they care about
  • Responses adapt to individual preferences
  • Context builds over time
  • Each conversation is better than the last
  • Users feel understood and valued

The system intelligently stores two types of user information:

Explicit choices, settings, and stated preferences:

  • Communication Style: Prefers detailed explanations vs brief summaries
  • Format Preferences: Likes bullet points, tables, or narrative format
  • Domain Specifics: Works in healthcare, manufacturing, finance, etc.
  • Role Information: CFO, engineer, support agent, etc.
  • Tool Preferences: Prefers certain tools or approaches

Contextual understanding of the user:

  • Domain Expertise: Level of technical knowledge
  • Working Environment: Team size, company type, industry
  • Interests: Topics they frequently discuss
  • Goals: What they're trying to accomplish
  • Patterns: How they use the system

User Memory Lifecycle

  1. User interacts with agent

    During conversation, agent notes information worth remembering

  2. Memory automatically captured

    Relevant information stored in AWS Bedrock Agent Core Memory

  3. User returns later

    Memory seamlessly loaded when user starts new session

  4. Agent uses context

    Responses incorporate remembered preferences and context

  5. Memory evolves

    Each conversation adds to and refines understanding

First Conversation (Week 1):

  • Sarah asks about billing policies
  • Mentions she's CFO of mid-sized manufacturing company
  • Prefers detailed financial breakdowns
  • Agent remembers these details

Second Conversation (Week 2):

  • Sarah asks different question
  • Agent already knows her role and preferences
  • Immediately provides CFO-appropriate level of detail
  • No need to re-establish context

Result: Faster, more relevant support

First Conversation:

  • Marcus asks about API integrations
  • Mentions he works with Python
  • Prefers code examples
  • Building microservices architecture

Subsequent Conversations:

  • Agent automatically includes Python examples
  • References microservices context
  • Provides appropriate technical depth
  • No repetitive context-setting needed

Result: More efficient technical assistance

As your organization uses the system:

  • Each user builds their own knowledge profile
  • New team members get immediately relevant help
  • Seasoned users receive increasingly sophisticated assistance
  • System adapts to individual needs and expertise levels
const agentConfig: AgentConfig = {
agentId: 'support-agent',
agentName: 'Customer Support Agent',
userMemory: {
enabled: true,
strategies: ['preferences', 'semantic'],
maxMemorySize: 5000 // tokens
}
};

Control what gets remembered:

userMemory: {
enabled: true,
strategies: ['preferences'], // Only explicit preferences
// Or both:
strategies: ['preferences', 'semantic'], // Full memory
retentionDays: 90 // Clear after 90 days of inactivity
}

Different settings for different apps:

// Customer support: remember preferences
customerSupportAgent: {
userMemory: {
enabled: true,
strategies: ['preferences']
}
}
// Technical assistant: deep semantic understanding
techAssistant: {
userMemory: {
enabled: true,
strategies: ['preferences', 'semantic'],
maxMemorySize: 10000 // More context for technical work
}
}

Remember customer context:

  • Previous issues and resolutions
  • Product preferences
  • Communication style
  • Account history

Benefit: Customers don't repeat themselves

Adapt to developer expertise:

  • Programming language preferences
  • Framework choices
  • Complexity level appropriate to skill
  • Project context

Benefit: More relevant technical guidance

Personalize recommendations:

  • Budget constraints
  • Feature priorities
  • Decision criteria
  • Purchase history

Benefit: Better product recommendations

Tailor information delivery:

  • Department and role
  • Areas of responsibility
  • Information preferences
  • Access patterns

Benefit: Faster information discovery

Users own their memory:

  • Can request to view stored memory
  • Can ask agent to forget specific information
  • Can clear all memory
  • Transparent about what's remembered

Memory respects organizational boundaries:

  • External users: memory scoped to their entity
  • Internal users: broader but controlled access
  • No cross-entity memory leakage
  • Secure isolation guaranteed

Secure storage and handling:

  • Encrypted at rest in AWS Bedrock
  • Not used for AI model training
  • Subject to retention policies
  • Audit trail of memory access

Begin with limited memory:

  1. Phase 1: Enable preferences only
  2. Phase 2: Monitor what gets remembered
  3. Phase 3: Add semantic understanding if beneficial
  4. Phase 4: Adjust based on user feedback

Match retention to use case:

  • Customer support: 90-180 days
  • Internal tools: Longer retention (1+ year)
  • Sensitive domains: Shorter retention
  • Consider regulations: GDPR, data protection laws

Make memory transparent:

  • Explain what gets remembered
  • Provide examples of benefits
  • Show how to manage memory
  • Build trust through transparency

Continuously improve:

  • Review what's being remembered
  • Identify useful vs noise
  • Refine memory strategies
  • Measure personalization quality

Users can directly instruct memory:

"Remember that I prefer technical explanations" "Forget my previous project context" "What do you remember about me?"

Share memory patterns:

  • Team memory profiles
  • Role-based defaults
  • Department preferences
  • Organizational standards

Understand memory usage:

  • Most commonly remembered facts
  • Memory utilization per user
  • Personalization effectiveness
  • Privacy compliance metrics

User Memory creates a continuous learning cycle:

  1. First Interaction: Agent learns basic information
  2. Subsequent Interactions: Context deepens
  3. Preferences Refined: Understanding improves
  4. Anticipatory Service: Agent predicts needs
  5. Relationship Deepens: Each conversation better than the last

This transforms AI assistants from tools into knowledgeable colleagues who understand your team's unique needs and working styles.

Enable User Memory

Configure memory strategies for your agents.

How-To Guide →

See Memory in Action

Experience personalization in the Weather Sample.

Explore Sample →

Understanding Memory

Deep dive into memory architecture and privacy.

Read Concepts →

Session Management

Conversations persist with full history alongside user memory.

Learn More →

Advanced Chat Apps

User memory enhances the chat experience.

Learn More →

Multi-Tenancy

Memory respects entity boundaries for secure isolation.

Learn More →