Originally published on the Sieve blog. Sieve is an open-source (Apache 2.0) context-reduction proxy — I work on it. This is a how-to, not a pitch; the steps work against any Ollama setup.

Ollama gives you a local LLM endpoint that is fast, private, and completely stateless. Close the chat, and everything you told the model is gone. Keep the chat open, and every turn re-sends a growing history until the context window fills up. Ask a local model about something it was never told, and — depending on the model — it may simply make something up.

This guide adds a persistent, encrypted memory to any Ollama setup using Sieve, without changing your client code beyond one URL.

The shape of the problem

Three separate annoyances show up when you run agents or long-lived chats against a local model, and they have a common root.