https://github.com/rollecode/open-webui-memory
Automatically identify, retrieve and store memories from user conversations in Open WebUI.
https://github.com/rollecode/open-webui-memory
chatgpt memory open-webui open-webui-functions openai openai-api openwebui python
Last synced: 27 days ago
JSON representation
Automatically identify, retrieve and store memories from user conversations in Open WebUI.
- Host: GitHub
- URL: https://github.com/rollecode/open-webui-memory
- Owner: rollecode
- Created: 2025-06-15T15:11:58.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-09-25T08:14:44.000Z (8 months ago)
- Last Synced: 2026-05-02T13:33:31.504Z (28 days ago)
- Topics: chatgpt, memory, open-webui, open-webui-functions, openai, openai-api, openwebui, python
- Language: Python
- Homepage:
- Size: 112 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## đź§ Open WebUI Memory function
### ChatGPT-like automatic memory retrieval and storage for [Open WebUI](https://github.com/open-webui/open-webui)

 
Automatically identify, retrieve and store memories from user conversations in Open WebUI. This filter intelligently processes chat messages to extract meaningful information about users and stores it as memories for future reference.

This is a fork of [davixk's/nokodo's work](https://github.com/Davixk/open-webui-extensions).
## ✨ What it does
Auto Memory listens in on your conversations and detects facts, preferences, key moments, or anything useful for the assistant to remember about you.
It stores these as separate memories, so future AI interactions stay personal and context-aware—without you micromanaging.
You get:
* Seamless journaling of your important info
* Smarter, context-rich AI assistance
* No more "please remember X" (unless you want to!)
## đź§ Memory extraction logic
- New or changed facts from User's latest message are saved.
- Explicit "please remember..." requests always create a Memory.
- Avoids duplicates & merges conflicts by keeping only the latest.
- Filters out ephemeral/trivial/short-term details.
## Installation
1. Go to **Settings → Functions** and add the contents of `memory.py` file, save
2. Configure your AI model for memory identification:
### OpenAI API (Recommended)
- Set **OpenAI API key** to your OpenAI API key
- Set **Model** to `gpt-4o` (default)
- Leave **OpenAI API URL** as default (`https://api.openai.com`)
### Alternative API Services
- **Pollinations**: Set **OpenAI API URL** to `https://text.pollinations.ai/openai`
### Local Models with Ollama
- Set **OpenAI API URL** to `http://localhost:11434/v1`
- Set **OpenAI API key** to `ollama`
- Set **Model** to one of the recommended models:
#### âś… Recommended Ollama Models (tested for memory identification):
- `mistral:7b-instruct` - Excellent instruction following
- `qwen2.5:7b` - Good balance of performance and capability
- `llama3.1:8b` - Works but may need more specific prompting
#### ❌ Not Recommended:
- GGUF models
- Models without instruction tuning typically perform poorly
**Note**: Memory identification requires models that can follow complex instructions and output structured data. If using local models, ensure they're instruction-tuned variants.
## Examples
**User input**: "I live in Central street 45 and I love sushi"
**Stored memories**:
- Location: "User lives in Central street 45"
- Preference: "User loves sushi"
**User input**: "Remember that my doctor's appointment is next Tuesday at 3pm"
**Stored memory**: "Doctor's appointment scheduled for next Tuesday at 2025-01-14 15:00:00"
**Context retrieval**: When user asks "What's my address?", the filter automatically retrieves and provides the stored location information.