> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerotwo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory System

> How ZeroTwo remembers context across conversations to provide personalized, intelligent assistance

## What is Memory?

ZeroTwo's memory system allows AI to remember important information across conversations, building a personalized understanding of you, your preferences, and your work. This creates a more intelligent, context-aware experience over time.

<Note>
  Memory is powered by mem0, a sophisticated system that stores and retrieves relevant information automatically as you chat.
</Note>

## How Memory Works

<Steps>
  <Step title="Automatic Learning">
    As you chat, AI identifies important information:

    * Your preferences and style
    * Facts about your projects
    * Technical requirements
    * Personal context
    * Recurring patterns
  </Step>

  <Step title="Intelligent Storage">
    Information is stored in a semantic memory database:

    * Organized by relevance
    * Tagged with context
    * Connected to related memories
    * Timestamped for recency
  </Step>

  <Step title="Smart Retrieval">
    When you chat, relevant memories are automatically retrieved:

    * Based on current context
    * Weighted by importance
    * Filtered by recency
    * Matched semantically
  </Step>

  <Step title="Contextual Application">
    AI uses memories to provide better responses:

    * Personalized suggestions
    * Consistent style
    * Remembered preferences
    * Contextual understanding
  </Step>
</Steps>

## Types of Memory

<Tabs>
  <Tab title="Bio Memory">
    **Personal profile information**

    What it remembers:

    * Your name and role
    * Professional background
    * Skills and expertise
    * Work context
    * Communication preferences

    **Example**:

    ```
    "I'm a senior frontend developer specializing in React"
    ```

    AI remembers this and tailors code examples to your level.
  </Tab>

  <Tab title="Chat Memory">
    **Conversation-specific context**

    What it remembers:

    * Current project details
    * Technical decisions
    * Ongoing tasks
    * Important facts
    * References mentioned

    **Example**:

    ```
    "We're using Next.js 14 with the App Router"
    ```

    AI remembers project stack without repeated explanations.
  </Tab>

  <Tab title="Project Memory">
    **Workspace-specific knowledge**

    What it remembers:

    * Project goals
    * Team members
    * Tech stack
    * Standards and conventions
    * Key documents

    **Example**:

    ```
    "Our team uses TypeScript strict mode and Tailwind CSS"
    ```

    Consistent across all project conversations.
  </Tab>

  <Tab title="Preference Memory">
    **How you like things done**

    What it remembers:

    * Code style preferences
    * Communication style
    * Output format preferences
    * Tool preferences
    * Language preferences

    **Example**:

    ```
    "Always include TypeScript types in code examples"
    ```

    AI automatically applies your preferences.
  </Tab>
</Tabs>

## Enabling Memory

<Tabs>
  <Tab title="Global Setting">
    **Enable for all conversations**:

    1. Go to **Settings** > **Memory**
    2. Toggle **Enable Memory System**
    3. Choose memory scope:
       * Personal only
       * Include projects
       * Full context

    <Info>
      Memory is enabled by default for all users.
    </Info>
  </Tab>

  <Tab title="Per Conversation">
    **Toggle for specific chats**:

    Click the **Memory** toggle in the top bar to enable/disable for current conversation.

    <Tip>
      Useful for temporary or sensitive conversations.
    </Tip>
  </Tab>

  <Tab title="Project-Level">
    **Control in projects**:

    1. Open Project settings
    2. Go to **Memory** tab
    3. Configure memory settings:
       * Enable/disable
       * Retention period
       * Sharing with team
  </Tab>
</Tabs>

## What Gets Remembered

### Automatically Captured

<AccordionGroup>
  <Accordion title="Personal Information">
    * Your name, role, and background
    * Professional expertise and skills
    * Work context and responsibilities
    * Communication style preferences
    * Language and format preferences

    **Example interaction**:

    ```
    You: I'm a DevOps engineer working with Kubernetes

    AI: [Remembers your role and expertise]

    Later conversation...
    AI: Given your Kubernetes experience, you could use 
    Helm charts for this deployment...
    ```
  </Accordion>

  <Accordion title="Project Details">
    * Project names and descriptions
    * Technology stack and tools
    * Team members and roles
    * Important decisions made
    * Key milestones and dates

    **Example**:

    ```
    You: We're building an e-commerce platform with Next.js

    AI: [Remembers project context]

    Next day...
    AI: For your e-commerce platform, let's add the 
    shopping cart feature...
    ```
  </Accordion>

  <Accordion title="Technical Preferences">
    * Coding conventions
    * Naming patterns
    * Framework choices
    * Library preferences
    * Architecture decisions

    **Example**:

    ```
    You: Use functional components with hooks, not class components

    AI: [Remembers code style]

    Later...
    AI: Here's a functional component with hooks:
    [Generates code in preferred style]
    ```
  </Accordion>

  <Accordion title="Important Facts">
    * Key dates and deadlines
    * Resource constraints
    * Requirements and specifications
    * Business rules
    * Domain knowledge

    **Example**:

    ```
    You: Our API rate limit is 100 requests per minute

    AI: [Remembers constraint]

    Later...
    AI: I'll design this to respect your 100 req/min 
    rate limit...
    ```
  </Accordion>
</AccordionGroup>

### Explicitly Added

You can explicitly add memories:

```
Remember: I prefer TypeScript over JavaScript for all projects
```

```
Store this: Our staging environment is at staging.example.com
```

```
Keep in mind: Budget constraint is $5000 for this project
```

<Tip>
  Use "Remember" or "Store this" to explicitly add important information to memory.
</Tip>

## Using Memory Effectively

### Best Practices

<AccordionGroup>
  <Accordion title="Be Explicit About Important Info">
    **Tell AI what's important**:

    ✅ **Good**:

    ```
    Remember: We use camelCase for variable names and 
    PascalCase for components
    ```

    ❌ **Less effective**:

    ```
    We sometimes use camelCase
    ```

    Clear, explicit statements are better remembered.
  </Accordion>

  <Accordion title="Update When Things Change">
    **Keep memory current**:

    ```
    Update: We switched from MongoDB to PostgreSQL
    ```

    ```
    Correction: The API endpoint is actually /api/v2/users
    ```

    AI will update or replace old information.
  </Accordion>

  <Accordion title="Provide Context">
    **Explain why things matter**:

    ✅ **Better**:

    ```
    Remember: Always check for null values because our 
    legacy API sometimes returns null instead of empty arrays
    ```

    vs just "check for null"

    Context helps AI apply knowledge appropriately.
  </Accordion>

  <Accordion title="Use Project Context">
    **Organize by project**:

    Information in projects is scoped to that workspace:

    * Team members only
    * Project-specific
    * Organized context

    Better than mixing everything in personal memory.
  </Accordion>
</AccordionGroup>

### Memory Commands

<Tabs>
  <Tab title="Add Memory">
    ```
    Remember that I prefer detailed explanations
    ```

    ```
    Store this: Production database is db.prod.example.com
    ```

    ```
    Keep in mind: Deadline is March 15th
    ```
  </Tab>

  <Tab title="Update Memory">
    ```
    Update: I now prefer concise responses
    ```

    ```
    Correction: The deadline moved to March 20th
    ```

    ```
    Change: We're using PostgreSQL 15 now, not 14
    ```
  </Tab>

  <Tab title="Query Memory">
    ```
    What do you remember about my project?
    ```

    ```
    Show me what you know about my tech stack
    ```

    ```
    What preferences have I set?
    ```
  </Tab>

  <Tab title="Remove Memory">
    ```
    Forget about the old API endpoint
    ```

    ```
    Remove: MongoDB information (we switched databases)
    ```

    ```
    Delete what you know about Project Alpha
    ```
  </Tab>
</Tabs>

## Viewing Your Memories

<Steps>
  <Step title="Access Memory Dashboard">
    Go to **Settings** > **Memory** > **View All Memories**
  </Step>

  <Step title="Browse Memories">
    See all stored information organized by:

    * Category (Bio, Chat, Project, Preference)
    * Date added
    * Source conversation
    * Relevance score
  </Step>

  <Step title="Search Memories">
    Use search to find specific memories:

    ```
    Search: "API endpoints"
    ```
  </Step>

  <Step title="Manage Individual Memories">
    For each memory:

    * Edit the content
    * Change category
    * Adjust importance
    * Delete if no longer needed
  </Step>
</Steps>

## Managing Memory

### Memory Settings

<Tabs>
  <Tab title="Retention">
    **How long to keep memories**:

    * **Forever**: Keep until manually deleted
    * **1 year**: Auto-delete after 12 months
    * **6 months**: Auto-delete after 6 months
    * **3 months**: Auto-delete after 3 months

    Older memories can be manually preserved.
  </Tab>

  <Tab title="Scope">
    **What contexts to remember**:

    * **Personal only**: Just your bio and preferences
    * **Personal + Projects**: Include project memories
    * **Full context**: Everything including chat history

    More scope = better context but more storage.
  </Tab>

  <Tab title="Sharing">
    **Project memory sharing**:

    * **Private**: Only you see your memories
    * **Team**: Share project memories with team
    * **Selective**: Choose what to share

    Control what team members can see.
  </Tab>

  <Tab title="Quality">
    **Memory filtering**:

    * **Strict**: Only high-confidence memories
    * **Balanced**: Good balance (default)
    * **Relaxed**: Capture more, risk some noise

    Higher quality = more selective storage.
  </Tab>
</Tabs>

### Bulk Operations

<CardGroup cols={2}>
  <Card title="Export Memories" icon="download">
    Download all memories as JSON or CSV
  </Card>

  <Card title="Import Memories" icon="upload">
    Upload memories from previous export
  </Card>

  <Card title="Clear Project" icon="folder-minus">
    Delete all memories for specific project
  </Card>

  <Card title="Reset All" icon="rotate-left">
    Clear all memories and start fresh
  </Card>
</CardGroup>

<Warning>
  Bulk deletion operations cannot be undone. Export your memories first if you might need them later.
</Warning>

## Privacy & Security

### Data Protection

<CardGroup cols={2}>
  <Card title="Encrypted Storage" icon="lock">
    All memories encrypted at rest
  </Card>

  <Card title="Secure Access" icon="shield">
    Only you can access your personal memories
  </Card>

  <Card title="No Training Data" icon="ban">
    Memories never used to train AI models
  </Card>

  <Card title="Full Control" icon="sliders">
    View, edit, or delete any memory anytime
  </Card>
</CardGroup>

### What's Remembered vs. Not

<Tabs>
  <Tab title="✅ Remembered">
    * Information you explicitly provide
    * Important facts from conversations
    * Your stated preferences
    * Project details you share
    * Technical specifications
    * Work-related context
  </Tab>

  <Tab title="❌ Not Remembered">
    * Sensitive personal data (SSN, passwords)
    * Financial information
    * Health information
    * Temporary/one-time information
    * Explicitly forgotten items
    * Conversations with memory disabled
  </Tab>
</Tabs>

### Memory Isolation

<AccordionGroup>
  <Accordion title="Personal Memories">
    * Only visible to you
    * Never shared with team
    * Not visible in shared conversations
    * Persist across all your chats
  </Accordion>

  <Accordion title="Project Memories">
    * Scoped to specific project
    * Can be shared with team (your choice)
    * Only used in project conversations
    * Managed by project admins
  </Accordion>

  <Accordion title="Temporary Conversations">
    * Memory can be disabled per chat
    * No permanent storage
    * Good for sensitive topics
    * Fresh context each time
  </Accordion>
</AccordionGroup>

## Advanced Features

### Memory Importance

Adjust how important different memories are:

```
[High importance] Remember: Never use deprecated APIs
```

```
[Low importance] I mentioned I like coffee (not work-related)
```

AI prioritizes high-importance memories when context is limited.

### Memory Connections

Memories can be linked:

```
This relates to what I told you about the database schema
```

AI creates connections between related memories for better context.

### Temporal Context

Memories include time context:

* Recent memories weighted higher
* Outdated information flagged
* Historical context maintained
* Evolution tracked over time

### Memory Triggers

Set conditions for when memories apply:

```
Remember this only for frontend work: Use React hooks
```

```
When discussing the mobile app, remember we target iOS 14+
```

Context-aware application of memories.

## Troubleshooting

<AccordionGroup>
  <Accordion title="AI not remembering something">
    **Possible causes**:

    * Memory disabled for that conversation
    * Information not clear or explicit enough
    * Conflicting information causing uncertainty
    * Memory filtered as low importance

    **Solutions**:

    * Explicitly state: "Remember this: \[fact]"
    * Rephrase more clearly
    * Check memory settings
    * Manually add to memory dashboard
  </Accordion>

  <Accordion title="Outdated information being used">
    **Fix**:

    * Update the memory: "Update: \[new information]"
    * Delete old memory from dashboard
    * Explicitly correct: "That's no longer accurate, now it's..."

    Old memories can linger if not updated.
  </Accordion>

  <Accordion title="Too much irrelevant context">
    **Solutions**:

    * Adjust memory quality to "Strict"
    * Review and delete unnecessary memories
    * Use project-scoped memory instead of global
    * Clear memories for completed projects
  </Accordion>

  <Accordion title="Privacy concerns">
    **Actions**:

    * Review all memories in dashboard
    * Delete sensitive information
    * Adjust sharing settings
    * Use temporary conversations for sensitive topics
    * Export and clear if switching accounts
  </Accordion>
</AccordionGroup>

## Use Cases

### Developers

```
Remember: 
- I use VS Code with Vim keybindings
- Prefer functional programming style
- Tech stack: React, TypeScript, Node.js, PostgreSQL
- Always include error handling in examples
```

AI generates code matching your style and stack automatically.

### Writers

```
Remember:
- I write technical blog posts
- Audience: intermediate developers
- Tone: friendly but professional
- Always include code examples
- Prefer shorter paragraphs
```

Consistent writing style across all content.

### Project Managers

```
Remember:
- Team: 8 developers, 2 designers, 1 PM
- Sprint length: 2 weeks
- Using Jira for tracking
- Standup at 9:30 AM daily
- Current sprint: Sprint 23
```

Context-aware project planning and organization.

### Researchers

```
Remember:
- Field: Machine Learning
- Focus: Natural Language Processing
- Using PyTorch framework
- Prefer academic paper citations
- Working on transformer models
```

Relevant research suggestions and technical depth.

## Best Practices Summary

<Check>
  **Memory best practices**:

  1. **Be explicit** - Clearly state what's important
  2. **Keep updated** - Correct outdated information
  3. **Organize by project** - Use project memory for team work
  4. **Review regularly** - Clean up unnecessary memories
  5. **Respect privacy** - Don't store sensitive personal data
  6. **Use commands** - "Remember", "Update", "Forget" are powerful
  7. **Provide context** - Explain why things matter
  8. **Test and refine** - Check if AI is using memories correctly
</Check>

## Next Steps

<CardGroup cols={2}>
  <Card title="Custom Instructions" icon="message" href="/chat/custom-instructions">
    Set persistent instructions for all chats
  </Card>

  <Card title="Projects" icon="folder" href="/workspaces/create-workspace">
    Organize memories in project workspaces
  </Card>

  <Card title="Assistants" icon="robot" href="/assistants/overview">
    Create assistants with specific knowledge
  </Card>

  <Card title="Privacy Settings" icon="shield" href="/privacy/data-and-compliance">
    Learn about data privacy and control
  </Card>
</CardGroup>

<Check>
  Memory makes ZeroTwo smarter over time - building a personalized AI assistant that truly knows you and your work!
</Check>
