<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Azard Tennant-Hosein</title>
    <description>The latest articles on DEV Community by Azard Tennant-Hosein (@azard_tennant-hosein).</description>
    <link>https://dev.to/azard_tennant-hosein</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3985716%2F4c4f327c-7e2c-4705-9aaf-8177f8fddecd.png</url>
      <title>DEV Community: Azard Tennant-Hosein</title>
      <link>https://dev.to/azard_tennant-hosein</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/azard_tennant-hosein"/>
    <language>en</language>
    <item>
      <title>Persistent memory for Ollama, in about five minutes</title>
      <dc:creator>Azard Tennant-Hosein</dc:creator>
      <pubDate>Sat, 27 Jun 2026 07:14:26 +0000</pubDate>
      <link>https://dev.to/azard_tennant-hosein/persistent-memory-for-ollama-in-about-five-minutes-4co5</link>
      <guid>https://dev.to/azard_tennant-hosein/persistent-memory-for-ollama-in-about-five-minutes-4co5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://llmsieve.dev/blog/2026/06/10/persistent-memory-for-ollama-in-about-five-minutes/" rel="noopener noreferrer"&gt;the Sieve blog&lt;/a&gt;. 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.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;This guide adds a persistent, encrypted memory to any Ollama setup using Sieve, without changing your client code beyond one URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape of the problem
&lt;/h2&gt;

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

&lt;p&gt;&lt;strong&gt;Nothing survives the session.&lt;/strong&gt; Tell your assistant on Monday that you prefer Python and your deploy target is a Raspberry Pi, and on Tuesday it knows neither. The model has no state; the application has to carry all of it, every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The payload only grows.&lt;/strong&gt; The standard workaround is to re-send history: system prompt, tool schemas, every prior turn, on every request. I measured the consequences of that pattern in &lt;a href="https://llmsieve.dev/blog/2026/06/10/the-hidden-cost-of-context/" rel="noopener noreferrer"&gt;The hidden cost of context&lt;/a&gt; — the short version is that per-turn cost grows with conversation length, and on local hardware that growth comes out of your tokens-per-second.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Absence becomes fabrication.&lt;/strong&gt; When a question falls outside the context you did send, smaller models in particular tend to answer anyway. A model that was never told your colleague's name will, often enough, invent one.&lt;/p&gt;

&lt;p&gt;The common root: the endpoint is stateless and the burden of memory falls on whatever sits in front of it. Most memory frameworks ask you to adopt an SDK and call &lt;code&gt;add()&lt;/code&gt;/&lt;code&gt;search()&lt;/code&gt; yourself. The approach here is different — put the memory &lt;em&gt;in the traffic path&lt;/em&gt;, so the client stays unchanged. I wrote up why I prefer the proxy shape in &lt;a href="https://llmsieve.dev/blog/2026/06/09/why-sieve/" rel="noopener noreferrer"&gt;Why Sieve&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll end up with
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;your client ──► Sieve (127.0.0.1:11435) ──► Ollama (127.0.0.1:11434)
                 │
                 └── encrypted store at ~/.sieve/memory.db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sieve speaks Ollama's native &lt;code&gt;/api/chat&lt;/code&gt; as well as the OpenAI-compatible &lt;code&gt;/v1/chat/completions&lt;/code&gt;, so anything that can talk to Ollama can talk to Sieve. On each turn it strips repeated instructions, tool schemas, and stale history from the outbound payload; learns durable facts from the conversation; and injects the relevant ones back in when a later turn actually needs them. The reply comes back to your client unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 — install Sieve
&lt;/h2&gt;

&lt;p&gt;You need Python 3.11+ and a running Ollama. The recommended installer is &lt;a href="https://pipx.pypa.io/" rel="noopener noreferrer"&gt;pipx&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;llm-sieve
sieve &lt;span class="nt"&gt;--version&lt;/span&gt;   &lt;span class="c"&gt;# sieve, version 1.0.0 or later&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the guided setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sieve-install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Ollama is running on &lt;code&gt;127.0.0.1:11434&lt;/code&gt;, the installer auto-detects it, shows you the models you already have pulled, downloads a ~50 MB embedding model (one-time), creates the encrypted store, and offers to start the proxy — with optional autostart on reboot. For a scripted, no-prompts install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sieve-install &lt;span class="nt"&gt;--no-input&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--provider&lt;/span&gt; http://127.0.0.1:11434 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--model&lt;/span&gt; qwen3.5:9b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 — move one URL
&lt;/h2&gt;

&lt;p&gt;Sieve listens on &lt;code&gt;11435&lt;/code&gt; — deliberately one port up from Ollama's &lt;code&gt;11434&lt;/code&gt;. Wherever your client points at Ollama, point it at Sieve instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ollama-native clients:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OLLAMA_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:11435
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;OpenAI-compatible clients:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://127.0.0.1:11435/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# was: http://127.0.0.1:11434/v1
&lt;/span&gt;    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;not-used-by-sieve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;# still forwarded upstream
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Or just curl it:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://127.0.0.1:11435/api/chat &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "model": "qwen3.5:9b",
    "messages": [{"role": "user", "content": "Hi, my name is Alex and I work on embedded firmware."}],
    "stream": false
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Model names, request shapes, response formats, streaming — all unchanged. The client does not know Sieve exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — prove it's working
&lt;/h2&gt;

&lt;p&gt;Two built-in commands, both sandboxed (they never touch your real store):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sieve demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;runs a short scripted conversation: an identity introduces itself, shares facts, asks for them back, and closes with a question about a person who was never mentioned. What you want to see: recall hits on the seeded facts, and a &lt;em&gt;refusal&lt;/em&gt; — not a fabrication — on the trap question.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sieve benchmark
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sends the same 15 messages directly to your model and through Sieve, then prints a delta table: tokens in vs out, facts learned, response times, and the trap verdict. Five to ten minutes depending on your hardware, and the numbers are yours rather than mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watching it work
&lt;/h2&gt;

&lt;p&gt;Every response Sieve touches carries diagnostic headers, so you don't have to take the proxy's behaviour on faith:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Header&lt;/th&gt;
&lt;th&gt;What it tells you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X-Sieve-Inbound-Tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Payload size before the trim&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X-Sieve-Outbound-Tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Payload size actually sent to Ollama&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X-Sieve-Phase&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;OBSERVE&lt;/code&gt; / &lt;code&gt;ACCUMULATE&lt;/code&gt; / &lt;code&gt;ACTIVATE&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X-Sieve-Fact-Count&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Facts in the store right now&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X-Sieve-Proxy-Us&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sieve's own overhead, in microseconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The inbound/outbound pair is the one to watch first: it's the per-request answer to "is this actually doing anything?" The full list is in the &lt;a href="https://llmsieve.dev/diagnostic-headers/" rel="noopener noreferrer"&gt;diagnostic headers&lt;/a&gt; reference.&lt;/p&gt;

&lt;p&gt;One thing to expect: &lt;strong&gt;the first few turns feel like pass-through.&lt;/strong&gt; Sieve activates progressively — it observes before it accumulates, and accumulates before it actively trims and injects. &lt;code&gt;X-Sieve-Phase&lt;/code&gt; tells you exactly where it is in that ramp, and &lt;code&gt;sieve status&lt;/code&gt; shows the fact count growing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where your data lives
&lt;/h2&gt;

&lt;p&gt;Everything stays on your machine. Facts, entities, and episodes land in a SQLCipher-encrypted SQLite database at &lt;code&gt;~/.sieve/memory.db&lt;/code&gt;, with the keyfile alongside it. There is no cloud component, no account, and no telemetry — the proxy talks to exactly one remote party, and it's the LLM endpoint you configured. If that endpoint is Ollama on localhost, nothing leaves the box at all.&lt;/p&gt;

&lt;p&gt;The store belongs to you, not to the package: upgrades via &lt;code&gt;pipx upgrade llm-sieve&lt;/code&gt; never touch &lt;code&gt;~/.sieve/&lt;/code&gt;, and the only command that deletes user data is &lt;code&gt;sieve uninstall --hard&lt;/code&gt;, which makes you type &lt;code&gt;DELETE&lt;/code&gt; first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest caveats
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Small models still have small-model problems.&lt;/strong&gt; Sieve can put the right facts in front of the model and refuse to let absence turn into invention on the turns it gates, but a 1–3B model under ambiguity is still a 1–3B model. The demo's trap turn is the honest check — run it against the model you actually plan to use. Models in the 8B+ class are where the absence-handling shines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cold start is real.&lt;/strong&gt; A memory layer with nothing in it can't save you tokens yet. Budget a handful of turns before the deltas get interesting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Port collisions happen.&lt;/strong&gt; If something already owns &lt;code&gt;11435&lt;/code&gt;, run &lt;code&gt;sieve start --port 11436&lt;/code&gt; and point your client there instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five minutes, summarised
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;llm-sieve
sieve-install            &lt;span class="c"&gt;# auto-detects Ollama, guided from there&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OLLAMA_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:11435
sieve demo               &lt;span class="c"&gt;# watch the recall hits and the trap refusal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One URL changed, no SDK adopted, no client code rewritten — and your Ollama models stop forgetting who you are between sessions.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Sieve is open source under Apache 2.0: &lt;a href="https://github.com/llmsieve/llm-sieve" rel="noopener noreferrer"&gt;github.com/llmsieve/llm-sieve&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>llm</category>
      <category>ai</category>
    </item>
    <item>
      <title>The two causes of your token bill</title>
      <dc:creator>Azard Tennant-Hosein</dc:creator>
      <pubDate>Wed, 17 Jun 2026 09:49:27 +0000</pubDate>
      <link>https://dev.to/azard_tennant-hosein/the-two-causes-of-your-token-bill-402e</link>
      <guid>https://dev.to/azard_tennant-hosein/the-two-causes-of-your-token-bill-402e</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://llmsieve.dev/blog/2026/06/15/the-two-causes-of-your-token-bill/" rel="noopener noreferrer"&gt;the Sieve blog&lt;/a&gt;. Sieve is an open-source (Apache 2.0) context-reduction proxy — I work on it, and I've tried to keep this post about the problem rather than the tool.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you run an LLM agent for real work, the bill is the part nobody warned you about. It starts small, it grows with use, and the worst of it is invisible — most of what you pay for on any given turn is text the model has already seen, or text you never meant to send.&lt;/p&gt;

&lt;p&gt;There's a temptation to treat this as one problem with one fix. It isn't. An agent's token bill has two distinct causes, and they need two genuinely different kinds of tool. This post is about telling them apart — because once you can, the question stops being "which tool wins" and becomes "which of my two problems am I looking at right now."&lt;/p&gt;

&lt;h2&gt;
  
  
  The bill is mostly things you didn't choose
&lt;/h2&gt;

&lt;p&gt;Start with where the tokens actually go, because it's rarely where people assume.&lt;/p&gt;

&lt;p&gt;When your agent calls a tool, the model doesn't just pay for your request — it pays for the machinery of asking. Anthropic's own &lt;a href="https://platform.claude.com/docs/en/about-claude/pricing" rel="noopener noreferrer"&gt;pricing documentation&lt;/a&gt; spells this out: the &lt;code&gt;tools&lt;/code&gt; parameter alone adds hundreds of tokens of schema to every request, the bash tool adds a fixed overhead, and a single web fetch pulls the fetched page straight into your context — "Average web page (10 kB): ~2,500 tokens... Research paper PDF (500 kB): ~125,000 tokens". A tool result you glance at once and never need again can cost more than the entire conversation around it.&lt;/p&gt;

&lt;p&gt;Now add the part that repeats. On every turn, a typical agent re-sends its system prompt, its full tool catalogue, its persona, and the conversation so far. The variable part of the request — what you actually typed — is often the smallest thing in the payload. The fixed overhead, multiplied across every turn of a long session, &lt;em&gt;is&lt;/em&gt; the bill.&lt;/p&gt;

&lt;p&gt;So the cost has two shapes, and they're not the same shape:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verbose machine output&lt;/strong&gt; — JSON tool results, logs, search dumps, fetched pages, code listings. Big, one-off, and mostly structural noise around a small signal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeated standing context&lt;/strong&gt; — the system prompt, tool schemas, persona, and history that ride along on every single turn, plus the absence of any memory that would let the agent &lt;em&gt;not&lt;/em&gt; re-send it all.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These call for different interventions, and conflating them is why "just reduce my tokens" never quite works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two different jobs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Compressing verbose output&lt;/strong&gt; is a content problem. You have a 10,000-token JSON blob; you want the model to get its meaning at a fraction of the size without losing the parts that matter. This is hard in an interesting way — it's about understanding the &lt;em&gt;shape&lt;/em&gt; of the content (a deeply nested object, an AST, a log stream) and squeezing it losslessly enough that the answer doesn't change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reducing repeated context&lt;/strong&gt; is a traffic problem. The model has already seen your tool schemas and your standing instructions; the fix is to stop re-sending what it's seen, and to remember durable facts so they can be supplied on demand instead of permanently parked in the prompt. This isn't about any single payload's shape — it's about what crosses the wire, turn after turn, and what gets remembered between turns.&lt;/p&gt;

&lt;p&gt;You can have either problem without the other. An agent that does a lot of web research and tool-calling has a &lt;em&gt;verbose-output&lt;/em&gt; problem even in a short session. A long-running personal assistant that mostly chats has a &lt;em&gt;repeated-context&lt;/em&gt; problem even though no individual message is large. Most real agents have both, in different proportions — which is exactly why one tool rarely covers the whole bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two tools, two halves
&lt;/h2&gt;

&lt;p&gt;This is where it's worth being concrete, and fair to the projects doing this work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/chopratejas/headroom" rel="noopener noreferrer"&gt;&lt;strong&gt;Headroom&lt;/strong&gt;&lt;/a&gt; is, in its own words, "the context compression layer for AI agents" — it targets the first problem. Its job is taking verbose content and making it smaller while accuracy is preserved on standard benchmarks: JSON, code, logs, the bulky machine output that coding agents generate constantly. It's Apache 2.0, runs locally, and offers library, proxy, agent-wrap, and MCP modes. If your bill is dominated by tool outputs and search results, that's the shape of problem it's built for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/llmsieve/llm-sieve" rel="noopener noreferrer"&gt;&lt;strong&gt;Sieve&lt;/strong&gt;&lt;/a&gt; — the project I work on — targets the second. It's a proxy that strips the context the model has already seen from every outbound turn, and backs that with an encrypted local store of durable facts it can inject only when a turn needs them, rather than keeping everything in the prompt forever. It also refuses to invent answers about things it was never told. If your bill is dominated by the same standing apparatus re-sent on every turn, and by an agent that forgets you between sessions, that's its half.&lt;/p&gt;

&lt;p&gt;Notice these are &lt;em&gt;different halves&lt;/em&gt;. One makes a big payload smaller; the other stops a payload from being re-sent and gives the agent a memory so it doesn't have to be. They're not competing for the same job — they're addressing the two causes named above. In principle they compose: compression handling the verbose one-off content, a reduction-and-memory layer handling the repeated standing content.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this is worth to you
&lt;/h2&gt;

&lt;p&gt;Set the percentages aside for a moment — every tool in this space quotes a big reduction number, and the numbers depend entirely on your workload. The value to you as a user is more concrete than any headline figure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sessions that don't fall over.&lt;/strong&gt; The most common real complaint isn't the monthly invoice — it's hitting a limit or a context wall in the middle of work. Spending fewer tokens per turn is, before anything else, &lt;em&gt;more room to keep going&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A bill you can reason about.&lt;/strong&gt; Both kinds of tool are observable: you can see what was sent before and after. A cost you can inspect is a cost you can manage, instead of a number that arrives at month-end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Less re-explaining yourself.&lt;/strong&gt; For the repeated-context half specifically, the payoff isn't only tokens — it's an agent that remembers your preferences and your project across sessions, so you stop re-establishing the same ground every time you open it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy you don't have to trade for savings.&lt;/strong&gt; Both Headroom and Sieve run locally; Sieve additionally keeps its memory store encrypted on your own disk with no telemetry. Cutting your token bill shouldn't mean shipping your context to one more third party.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;p&gt;A few things I won't claim, because they aren't mine to claim yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I haven't run the two together.&lt;/strong&gt; The "they compose" argument above is architectural — it follows from what each tool does, not from a tested pipeline I've measured. Treat it as a sound hypothesis, not a benchmarked result. If you stack them, I'd genuinely like to hear how it goes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduction has a warm-up.&lt;/strong&gt; A memory-and-reduction layer with an empty store can't save you much on day one; the savings arrive as it learns. Compression, by contrast, helps on the very first verbose payload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The numbers are yours, not mine.&lt;/strong&gt; Whatever either project's headline percentage, the only figure that means anything is the one you measure on your own workload. Both projects expose per-request stats precisely so you can check rather than trust. Use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;The next time the bill jumps, the useful first question isn't "what cuts tokens" — it's "which of my two problems is this." If it's verbose tool output drowning a small signal, you want compression. If it's the same standing context re-sent every turn and an agent with no memory, you want reduction. Most agents need both, and the good news is the tooling for each now exists, is open source, and runs on your own machine. Knowing which half you're looking at is most of the battle.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Sieve is open source under Apache 2.0: &lt;a href="https://github.com/llmsieve/llm-sieve" rel="noopener noreferrer"&gt;github.com/llmsieve/llm-sieve&lt;/a&gt;. If I've misrepresented Headroom, &lt;a href="https://github.com/llmsieve/llm-sieve/issues" rel="noopener noreferrer"&gt;open an issue&lt;/a&gt; and I'll correct it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>agents</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
