Skip to main content

Understanding Digital Twin Memory Systems

Your digital twin uses three complementary memory systems to provide both immediate context and long-term personalization. Understanding the difference helps you optimize your interactions.

Three Types of Memory

Your digital twin operates with memory systems that work together to enhance your experience:

Conversation History

Short-term conversation context for immediate continuity

User Memory

Long-term storage for persistent personalization

Shared Memory

Long-term storage for information shared across users of the same Digital Twin

Conversation History (Short-Term Context)

Think of this as your digital twin’s “working memory” for the current conversation.

Key Characteristics

  • Temporary: Only remembers recent conversations (configurable: 1-15 dialogues)
  • Session-focused: Provides context for ongoing discussions
  • Adjustable: Change in Settings → Remember History (bottom-left)
  • Cost-aware: More history = higher token usage and processing costs
  • Context window: Maintains conversation flow and understanding

How It Works

Conversation history is injected into each prompt before being sent to the AI model. The system selects only conversations from the current session to maintain logical continuity and prevent context confusion from mixing unrelated conversation threads.

Practical Example

You: "Let's work on API documentation for our payment system"
Twin: "Great! I'll help with your payment API docs."

[10 messages later...]

You: "Add the error codes section"
Twin: "I'll add error codes to the payment API documentation we've been building."
The digital twin remembers you’re working on payment API docs because it’s within the history window.

Benefits & Trade-offs

  • Higher values (8-15): Better context for complex, multi-step conversations but higher costs
  • Lower values (1-5): More cost-effective for simple queries but limited context
  • Optimal balance: Adjust based on conversation complexity and cost preferences

User Memory (Long-Term Personalization)

Follows you across multiple digital twins and conversations. User memory collects information about you and your interactions to personalize your experience and enhance your overall AI interactions.

Key Characteristics

  • Permanent: Stored long-term across all conversations and sessions
  • Cross-session: Available weeks or months later across different digital twins
  • Selective: Only stores important, relevant information automatically
  • Secure: Private to your account and fully protected
  • Automatic: Digital twin intelligently decides what’s important to remember
  • Structured: Organized by namespaces (personal, preferences, work, etc.)

What Gets Stored

  • Personal details: Role, company, location, important dates
  • Preferences: Communication style, response format, technical level
  • Decisions: Important choices made during conversations
  • Context: Ongoing projects, goals, and key information
  • Learning: Feedback and corrections you provide

Practical Example

Session 1: "I'm a technical writer at Acme Corp, and I prefer concise documentation"
[User Memory stores: Role=Technical Writer, Company=Acme Corp, Style=Concise]

Session 2 (weeks later): "Help me with new API docs"
Twin: "I'll create concise API documentation for Acme Corp, matching your preferred style."

Session 3 (different twin): "Review this code"
Twin: "As a technical writer at Acme Corp, I'll focus on documentation clarity and conciseness."

Benefits

  • Consistency: Same personalized experience across all interactions
  • Efficiency: No need to repeat preferences or context
  • Intelligence: Builds understanding of your needs over time
  • Continuity: Maintains context even after long breaks
  • Cross-platform: Works across different digital twins and assistants

Shared Memory (Collaborative Knowledge Base)

Think of this as your digital twin’s “team knowledge base” - a collaborative storage area where information is shared across all users of the same digital twin.

Key Characteristics

  • Permanent: Stored long-term and accessible to all users of the digital twin
  • Collaborative: Information added by any user benefits the entire team
  • Controlled: Access managed through get_from_memory and set_in_memory agents
  • Structured: Organized by namespaces for easy categorization and retrieval
  • Centralized: Single source of truth for team-wide information
  • Persistent: Maintains organizational knowledge across sessions and users

What Gets Stored

  • Team guidelines: Shared coding standards, documentation templates, style guides
  • Common instructions: Frequently used prompts, workflows, or procedures
  • Reference lists: Product catalogs, approved vendors, resource directories
  • Organizational context: Company policies, project details, team structures
  • Shared resources: Links to documentation, tools, or knowledge bases
  • Collective decisions: Team agreements, standards, or best practices

How It Works

Shared memory uses the same agent-based access pattern as user memory, but with a shared scope flag:
  • Reading: get_from_memory with argument_2 set to "true" retrieves shared parameters
  • Writing: set_in_memory with argument_2 set to "true" stores information in shared memory
  • Organization: Uses namespaces (e.g., team_guidelines, resources, policies) to categorize information
  • Access control: All users of the digital twin can read and write to shared memory

Practical Example

User A (Team Lead): "Remember that our API documentation should always include authentication examples"
[Shared Memory stores: namespace=team_guidelines, key=api_docs_standard, value=include_auth_examples]

User B (Developer, days later): "Help me document our new API endpoint"
Twin: "I'll create documentation for your API endpoint. Following your team's guidelines, I'll include authentication examples."

User C (Technical Writer, weeks later): "What are our documentation standards?"
Twin: "Your team's API documentation standards include: always include authentication examples..."

Benefits

  • Team consistency: Everyone gets the same guidelines and information
  • Knowledge preservation: Important decisions and standards don’t get lost
  • Onboarding efficiency: New team members inherit organizational knowledge automatically
  • Reduced repetition: Set standards once, benefit across all team interactions
  • Collaborative learning: Team improvements benefit everyone using the digital twin

Use Cases

Store coding standards, architecture decisions, deployment procedures, and approved libraries. Every developer gets consistent guidance on team practices.
Maintain style guides, template structures, terminology standards, and review checklists. Ensures consistent documentation across all writers.
Share common troubleshooting steps, escalation procedures, FAQ responses, and product knowledge. Standardizes support quality across team members.
Store course policies, grading rubrics, resource lists, and institutional guidelines. Provides consistent information to all students and instructors.

Managing Shared Memory

1

Add Information

Any user can add information to shared memory by instructing the digital twin to remember something for the team:
"Remember for the team: all pull requests require two approvals"
2

Retrieve Information

The digital twin automatically accesses shared memory when relevant to the conversation. You can also explicitly query:
"What are our team's code review guidelines?"
3

Update Information

Update shared parameters by providing new values:
"Update our team guideline: pull requests now require three approvals"
4

Organize with Namespaces

Use clear namespaces to categorize information:
  • team_guidelines - Standards and procedures
  • resources - Links and reference materials
  • policies - Organizational rules
  • templates - Reusable content structures
Regularly review and clean up shared memory to keep it relevant and organized. Remove outdated information and consolidate duplicate entries.

Memory Systems Working Together

The three memory systems complement each other perfectly:
  • Conversation History handles immediate context and ongoing discussions
  • User Memory provides persistent personalization and long-term context
  • Shared Memory maintains team knowledge and organizational standards
  • Together, they create a seamless, intelligent experience that feels natural, personalized, and team-aware

Best Practices

  1. Adjust history length based on conversation complexity
  2. Trust automatic memory storage - your twin knows what’s important
  3. Provide feedback to improve long-term personalization
  4. Use clear preferences early in relationships with new twins
  5. Leverage shared memory for team standards and common knowledge
  6. Keep shared memory organized with clear namespaces and regular cleanup

Memory Comparison Table

Understanding the distinctions between these three memory systems is crucial for optimizing your AI experience.
Conversation History is temporarily injected into each prompt and contains the recent dialogue exchanges (configurable 1-25 messages). While essential for maintaining context within a conversation, excessive history consumes unnecessary credits and varies between different conversations or assistants. It’s best used for immediate context like “continue the code from my last message” or “refine that previous suggestion.” User Memory is your persistent preference vault accessible across all conversations and Digital Twins through agent tools. It stores lasting preferences like your technical interests, learning style (reading/writing), communication preferences (short responses), and personal details (age 53, lives in Saint-Louis). This memory travels with you whether you’re using the Code Assistant, Conversational Assessment, or any other specialized assistant, ensuring consistent personalization without repeatedly explaining your preferences. Shared Memory is the collaborative knowledge base accessible to all users of the same digital twin. It stores team-wide information like coding standards, documentation templates, organizational policies, and shared resources. Unlike user memory (which is private to you) or conversation history (which is session-specific), shared memory creates a collective intelligence that benefits the entire team.
AspectConversation HistoryUser MemoryShared Memory
DurationTemporary (current conversation)Permanent (weeks/months/years)Permanent (weeks/months/years)
ScopeRecent dialogue exchangesImportant personal data & preferencesTeam-wide information & standards
PurposeConversation continuityLong-term personalizationCollaborative knowledge sharing
StorageFull conversation contextSelective key informationSelective team information
ControlUser adjustable (1-25 dialogues)Automatic + manual managementManual management by any team user
ContentComplete message exchangesPreferences, goals, decisionsGuidelines, standards, resources
Cost ImpactDirect (more history = more tokens)Minimal (structured parameters)Minimal (structured parameters)
AccessibilitySession-specific onlyCross-platform, all assistantsAll users of the same digital twin
OrganizationSequential chronological orderNamespaced and categorizedNamespaced and categorized
PrivacyPrivate to user sessionPrivate to individual userShared across all twin users
OptimizationAdjust length based on complexityOrganize with namespaces and periodic cleanupRegular team review and cleanup

When to Use Each System

Use Conversation History for:
  • Referencing previous messages in the current discussion
  • Building complex arguments or explanations over multiple turns
  • Maintaining context for ongoing tasks or projects within a session
  • Following up on specific points made earlier in the conversation
Use User Memory for:
  • Storing permanent preferences and personal information
  • Maintaining consistency across different conversations and assistants
  • Avoiding repetitive explanations of your role, company, or preferences
  • Building long-term personalization that improves over time
Use Shared Memory for:
  • Establishing team-wide standards and guidelines
  • Maintaining organizational knowledge and policies
  • Sharing resources and reference materials across team members
  • Ensuring consistency in team practices and outputs
  • Onboarding new team members with institutional knowledge

Bottom Line

Conversation History = temporary context for current chat User Memory = permanent preferences that follow you everywhere Shared Memory = team knowledge base accessible to all users of your digital twin