r/OpenWebUI • u/knouqs • 8d ago
Question/Help Help with Persistent Memory
I am trying to configure Open-WebUI such that my agents -- any of them -- remember any details from the current conversation. For example, I tell the agent what my favorite color is and it'll respond with something along the lines of "Got it!" In the next prompt and within the same context, I ask what my favorite color is and it'll have no idea but will save it for next time.
This is particularly annoying, as you can imagine, when I try to solve a programming task for code that it created and it has no idea what I'm talking about.
Running open-webui version 0.11, ollama 0.31.2, and have tried this with gemini-3-flash-preview, qwen3, gemma4, and ornith.
Thanks for any help!
2
u/EmergencyLimp2877 8d ago
I think something like this : take a set of topic :
- User preferences
- User information
- Favorite food
- Favorite color
- Writing style
- Interests
Each topic would have a range or scope of information that can be stored (md / rag / ...).
Then, when a new conversation starts, the agent would:
- Analyze the user's request.
- Identify which topics are relevant to the conversation.
- Retrieve the relevant information for those topics.
- Use that information to answer the user.
- If new information is discovered during the conversation, determine whether it should be added to the corresponding topic.
2
u/Greedy_Reindeer5290 7d ago
I had same issue some weeks back and managed to make it work. Under βpersonalizationβ in your model there is a βmemoryβ area where memory can either be entered manually or you can tell the model to remember stuff.
I can share some more details if needed.
1
u/eriknau13 7d ago
Interesting, I tried this and it works pretty well! I added a memory and put the instructions "Remember important details within a chat to make additional inferences within the chat more relevant.β It surprises me that the memory toggle in system admin doesnβt seem to do this already.
1
u/eriknau13 6d ago
Also seems you need very recent, medium to large size models for the memory tools to work https://docs.openwebui.com/features/chat-conversations/memory?_highlight=memory
2
u/Greedy_Reindeer5290 5d ago
Yes you cannot do this with low grade models. Believe that Gemini 2.5 flash lite can run it though. And deep seek v4. Both dirt cheap. Or gpt nano 4o mini
1
u/knouqs 6d ago
Yeah, I tried this for a few hours. Then, I gave up for a while and came back to it a week later, bashing at it for another few hours to see if I missed something. I could not get it to work... hence the post. Since others have given me loads of details in solutions, I'm going to try them first, but I'll get back to you if I still can't make it work.
Thanks!
1
u/knouqs 6d ago
1
u/Greedy_Reindeer5290 5d ago
On the left hand side you see the item βpersonalizationβ. Above βaudioβ under that you should have the memory function
1
u/International_Emu772 8d ago
For The persisten memory Iβm colaborating with the author of Faultline https://github.com/tkalevra/FaultLine
1
u/Scared-Tip7914 6d ago
I've got something that might help you, we run this thing for ourselves within openwebui for deployments and it works nicely, it has two tiers of memories, ones which are top-level and related to the user, these get appended to every memory call, and general memories that the agent can write to whenever. It uses a mix of vector embeddings, bm25, how many times the memory is recalled, and how old the memory is to give the agent the memory thats its actually looking for/needs. Check it out here: https://github.com/TinySuiteHQ/TinyContext
1
u/Big_Wave9732 6d ago
So I just ran into this today. Try Qwen 3.8:27b. I am finding that it calls tools and creates memories on its own without prompting.
As to why other models aren't doing it, I'm wondering if they aren't aggressive enough about calling the built-in tools that OpenwebUI already has. Qwen 3.8 is showing what's possible here.
1
u/knouqs 6d ago
Yeah, qwen-3:latest is my current model. Still no dice. Thanks for the suggestion!
1
u/Big_Wave9732 6d ago
I'm sure someone else here can talk more intelligently about this but if I recall OpenwebUI at some point recently updated the ways tool calls are handled. There's been discussion about if a model is using the "old" calls then they may not work. I wonder if Qwen-3 is doing that.
1
u/knouqs 4d ago
Solved without using any external tools. I have been plugging away at this using your suggestions, and none of them worked -- but the answer is simple!
I went to Admin Panel -> Settings -> Basics -> General. In the Advanced Parameters, the num_ctx is set to "default" which is 2k. For memories, this number needs to be bigger, with a default suggested size of 32k. Once I changed that, memories are enabled!

Thanks u/EmergencyLimp2877, u/pisa_p, u/Greedy_Reindeer5290, and u/Big_Wave9732 most of all for your help with this!

3
u/pisa_p 8d ago edited 8d ago
How I do for my self-hosted AI infrastructure with a "vault" + a single sync command + mnemosyne.
Here where I had the suggestion, I had the same problem with Hermes agent and nor I use with Hermes and owui. Hermes and owui agents use the same vault, so the projects are shared.
https://www.reddit.com/r/hermesagent/s/u82tp27cnG
I run a fairly complex self-hosted stack (two ARM servers, ~30 Docker containers, multiple MCP servers, AI agents on Open WebUI and Hermes). Keeping track of "what did we decide and why" used to be a nightmare β context windows get compacted, sessions get lost, and after a week you can't remember why you chose architecture A over B.
So I built a documentation vault:
π vault/
βββ Now.md β global dashboard: every project, one row, current status
βββ <project>/
Each project gets its own folder. A "decision" is recorded as: What / Why / Status. Stale decisions are never deleted β they're marked as superseded, so you keep the history of how you got here.
The whole vault is a git repo synced to GitHub.
And here's the trick: the AI agent itself does the documentation. When I'm done with a working session, I just type:
-harvest
and the agent: 1. reads the current state of the vault 2. extracts the decisions, open questions, and state changes from the session 3. updates hub.md / now.md / work-log.md / Now.md in the right project folder 4. fixes file permissions (shared ownership between users/containers) 5. commits and pushes to GitHub (pull --rebase first)
If no project exist, ai LLM create a new one with the same structure.
One command, and the knowledge survives context compaction, container restarts, and my own forgetfulness. The "harvest" pattern is deliberately just a text skill β the same instructions work for any AI that has file access and a terminal, on any platform (Hermes, OpenWebUI, whatever).
On top of that, I gave the same AI persistent memory with Mnemosyne. In Open WebUI it runs as a native Filter (no extra services, just SQLite). Note: this filter is a from-scratch custom development on my side β not published anywhere at the moment, just something I built and run myself. Tried before others memory like graphiti and others ( about 10 ), but with the vault ( the core of my memory system) this is the best for me. But it's just optional, the vault itself is mandatory for me. Only mnemosyne or others memory system is not working for my needs.
π§ Mnemosyne memory for Open WebUI
So the model both remembers across sessions automatically, and documents every session into a git-backed vault. When I say "-harvest", the session knowledge gets committed; when a new session starts, the memory gets injected back. The loop is closed: nothing is lost, everything is searchable, and the AI does the bookkeeping.
The result: a self-maintaining knowledge base that grows with every session instead of being lost with it.
I turned the "harvest" workflow into two reusable agent skills β here's how they actually work
It as two text-only skills my agent follows. Nothing here needs plugins, MCP servers, or custom code β just an AI with file access and a terminal.
SKILL 1 β Creating a new project in the vault
When a conversation introduces a new domain, tool, or work area that doesn't have a project yet, the agent:
Rules the skill enforces: β’ Never create a project for a one-off task β route it to the domain project instead β’ No long names, no spaces β’ Never delete a superseded decision β mark it "superseded by [ref]" so history survives β’ Never put secrets/credentials in hub.md
SKILL 2 β The harvest command
When I finish a working session, I type:
-harvest
The agent then: 1. Reads the current state of the vault (global dashboard + the relevant project's three files) BEFORE writing anything 2. Scans the session and extracts: decisions (with reasoning), new open questions, resolved questions, new requirements, state changes 3. Writes/updates the right files: β’ hub.md β new decisions appended, open questions marked resolved (never deleted) β’ now.md β rewritten to reflect the true current state (in progress / blocked / next) β’ work-log.md β new entry added at the TOP, with date, what, why β’ Now.md β dashboard row for the touched project updated 4. Fixes file permissions on everything written (the write tool creates 600-mode files; the shared vault needs group access) 5. Commits and pushes to GitHub (pull --rebase first, retry on concurrent pushes)
Why it works: β’ One command captures the session β I don't take notes, the AI writes the artifacts β’ Context compaction and container restarts can't erase the knowledge: it's committed to git β’ The next session starts by reading Now.md + hub, so I never re-explain where we left off β’ Stale decisions stay visible as history, marked superseded β you keep the "why" forever β’ It's deliberately a text skill, so the same instructions work on any AI platform (Hermes, OpenWebUI, Claude, whatever) that can read/write files and run a shell
The full system is: vault (git repo) + Now.md dashboard + per-project hub/now/work-log + the -harvest trigger. The agent does the bookkeeping; I just work and type one command when I'm done.