Skip to main content
Memories in Open WebUI provide long-term storage for important information, preferences, and context. This enables your AI models to remember details across conversations and provide more personalized, context-aware responses.

Overview

Memories provide:
  • Persistent user-specific storage
  • Vector-based semantic search
  • Automatic embedding generation
  • Context retrieval for conversations
  • Privacy-focused per-user isolation
Memories must be explicitly enabled in your Open WebUI configuration. They require a vector database and embedding function to be configured.

Architecture

Memories use a two-tier storage system:
  1. Database: Stores the actual memory content and metadata
  2. Vector Store: Stores embeddings for semantic search
When you query memories, the system:
  1. Generates an embedding of your query
  2. Searches the vector database for similar memories
  3. Returns the most relevant memories

Configuration

Enable memories in your environment:
Memories require a configured vector database and embedding function. Without these, the feature will not work.

Managing Memories

Add Memory

Store a new memory:

List All Memories

Retrieve all memories for the current user:

Query Memories

Search for relevant memories using semantic search:

Update Memory

Modify an existing memory:

Delete Memory

Remove a specific memory:

Delete All Memories

Clear all memories for the current user:

Reset Memory Embeddings

Regenerate all embeddings (useful after changing embedding models):
The reset operation regenerates embeddings for all user memories. This can take time if you have many memories.

Memory Workflow

1

User Interaction

User shares information during a conversation:
  • “I prefer dark mode”
  • “My timezone is EST”
  • “I work with Python and JavaScript”
2

Memory Creation

Important information is stored as memories:
3

Embedding Generation

System automatically generates embeddings and stores them in the vector database
4

Context Retrieval

When user asks a question, relevant memories are retrieved:
5

Personalized Response

AI uses retrieved memories to provide personalized answers

Use Cases

User Preferences

Store user preferences for personalized experiences:

Project Context

Remember ongoing project details:

Learning Progress

Track learning journey and achievements:

Vector Database Integration

Memories are stored in user-specific collections:
Supported vector databases:
  • ChromaDB (default)
  • Qdrant
  • Milvus
  • Elasticsearch
  • OpenSearch
  • Pinecone
  • PGVector
  • S3Vector
  • Oracle 23ai

Privacy and Security

Memories are user-isolated. Each user has their own private memory collection that other users cannot access.

Best Practices

  1. Sensitive Data: Avoid storing passwords or API keys in memories
  2. PII: Be cautious with personally identifiable information
  3. Retention: Implement a memory lifecycle policy
  4. Encryption: Use encrypted vector databases for production
  5. Access Control: Ensure memories feature is permission-gated

Performance Considerations

Embedding Generation

Embeddings are generated asynchronously to avoid blocking:

Bulk Operations

When adding many memories, consider batching:

Vector Search Optimization

Adjust k parameter based on your needs:

Integration Example

Memory-Augmented Chat

Troubleshooting

Memories Not Saving

  • Verify ENABLE_MEMORIES=true in configuration
  • Check vector database is running and accessible
  • Ensure embedding function is configured
  • Review user permissions for features.memories

Search Returns No Results

  • Confirm memories exist for the user
  • Try broader search queries
  • Check embedding model compatibility
  • Verify vector database collection exists

Slow Performance

  • Reduce k parameter in queries
  • Consider faster embedding models
  • Optimize vector database configuration
  • Use local embedding models instead of API calls

Next Steps

  • Learn about Artifacts for persistent storage
  • Explore Skills for reusable capabilities
  • Configure Functions for custom logic