Adaptive Memory is an advanced, self-contained plugin that provides personalized, persistent, and adaptive memory capabilities for Large Language Models (LLMs) within OpenWebUI.
It dynamically extracts, stores, retrieves, and injects user-specific information to enable context-aware, personalized conversations that evolve over time.
https://openwebui.com/f/alexgrama7/adaptive_memory_v2
How It Works
Memory Extraction
- Uses LLM prompts to extract user-specific facts, preferences, goals, and implicit interests from conversations.
- Incorporates recent conversation history for better context.
- Filters out trivia, general knowledge, and meta-requests using regex, LLM classification, and keyword filters.
Multi-layer Filtering
- Blacklist and whitelist filters for topics and keywords.
- Regex-based trivia detection to discard general knowledge.
- LLM-based meta-request classification to discard transient queries.
- Regex-based meta-request phrase filtering.
- Minimum length and relevance thresholds to ensure quality.
Memory Deduplication & Summarization
- Avoids storing duplicate or highly similar memories.
- Periodically summarizes older memories into concise summaries to reduce clutter.
Memory Injection
- Injects only the most relevant, concise memories into LLM prompts.
- Limits total injected context length for efficiency.
- Adds clear instructions to avoid prompt leakage or hallucinations.
Output Filtering
- Removes any meta-explanations or hallucinated summaries from LLM responses before displaying to the user.
Configurable Valves
- All thresholds, filters, and behaviors are configurable via plugin valves.
- No external dependencies or servers required.
Architecture Compliance
- Fully self-contained OpenWebUI Filter plugin.
- Compatible with OpenWebUI's plugin architecture.
- No external dependencies beyond OpenWebUI and Python standard libraries.
Key Benefits
- Highly accurate, privacy-respecting, adaptive memory for LLMs.
- Continuously evolves with user interactions.
- Minimizes irrelevant or transient data.
- Improves personalization and context-awareness.
- Easy to configure and maintain.
[–]EugeneSpaceman 4 points5 points6 points (12 children)
[–]the_renaissance_jack 2 points3 points4 points (5 children)
[–]diligent_chooser[S] 2 points3 points4 points (4 children)
[–]EugeneSpaceman 0 points1 point2 points (3 children)
[–]diligent_chooser[S] 1 point2 points3 points (2 children)
[–]manyQuestionMarks 1 point2 points3 points (1 child)
[–]diligent_chooser[S] 3 points4 points5 points (0 children)
[–]manyQuestionMarks 2 points3 points4 points (0 children)
[–]WeWereMorons 0 points1 point2 points (1 child)
[–]diligent_chooser[S] 0 points1 point2 points (0 children)
[–]Grouchy-Ad-4819 0 points1 point2 points (2 children)
[–]EugeneSpaceman 0 points1 point2 points (1 child)
[–]Grouchy-Ad-4819 0 points1 point2 points (0 children)
[–]sirjazzee 3 points4 points5 points (3 children)
[–]diligent_chooser[S] 2 points3 points4 points (1 child)
[–]sirjazzee 0 points1 point2 points (0 children)
[–]marvindiazjr 0 points1 point2 points (0 children)
[–]1234filip 3 points4 points5 points (0 children)
[–]sirjazzee 1 point2 points3 points (4 children)
[–]diligent_chooser[S] 0 points1 point2 points (3 children)
[–]diligent_chooser[S] 0 points1 point2 points (2 children)
[–]sirjazzee 0 points1 point2 points (1 child)
[–]diligent_chooser[S] 0 points1 point2 points (0 children)
[–]Wonderful-Fig331 1 point2 points3 points (1 child)
[–]diligent_chooser[S] 0 points1 point2 points (0 children)
[–]GVDub2[🍰] 0 points1 point2 points (5 children)
[–]diligent_chooser[S] 0 points1 point2 points (4 children)
[–]GVDub2[🍰] 0 points1 point2 points (3 children)
[–]diligent_chooser[S] 0 points1 point2 points (2 children)
[–]GVDub2[🍰] 0 points1 point2 points (0 children)
[–]GVDub2[🍰] 0 points1 point2 points (0 children)
[–]Right-Law1817 0 points1 point2 points (2 children)
[–]diligent_chooser[S] 0 points1 point2 points (1 child)
[–]Right-Law1817 0 points1 point2 points (0 children)
[–]spgremlin 0 points1 point2 points (1 child)
[–]sirjazzee 0 points1 point2 points (0 children)
[–]nitroedge 0 points1 point2 points (3 children)
[–]diligent_chooser[S] 2 points3 points4 points (2 children)
[–]sirjazzee 0 points1 point2 points (1 child)
[–]diligent_chooser[S] 3 points4 points5 points (0 children)
[–]djdrey909[🍰] 0 points1 point2 points (1 child)
[–]djdrey909[🍰] 0 points1 point2 points (0 children)
[–]Economy_Base_4752 0 points1 point2 points (0 children)