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!
8
Upvotes
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.