<?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: miguel</title>
    <description>The latest articles on DEV Community by miguel (@miguel_1982).</description>
    <link>https://dev.to/miguel_1982</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%2F4066019%2F1be642c9-a1ea-44c8-ac2c-62d54a28e9dd.png</url>
      <title>DEV Community: miguel</title>
      <link>https://dev.to/miguel_1982</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/miguel_1982"/>
    <language>en</language>
    <item>
      <title>How I reduced LLM context cost by 35% without changing code (Token Firewall)</title>
      <dc:creator>miguel</dc:creator>
      <pubDate>Thu, 06 Aug 2026 13:44:31 +0000</pubDate>
      <link>https://dev.to/miguel_1982/how-i-reduced-llm-context-cost-by-35-without-changing-code-token-firewall-28j5</link>
      <guid>https://dev.to/miguel_1982/how-i-reduced-llm-context-cost-by-35-without-changing-code-token-firewall-28j5</guid>
      <description>&lt;h1&gt;
  
  
  Why Token Firewall?
&lt;/h1&gt;

&lt;p&gt;For a while now, I've been measuring how many tokens we waste resending noisy logs, repeated code comments, or bloated structures that the model doesn't actually need to solve a task.&lt;/p&gt;

&lt;p&gt;In this latest release, I built and benchmarked a simple test project (&lt;code&gt;ejemplo-token-firewall&lt;/code&gt;) containing a code file and a 53-line log file (48 of which were nearly identical):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Without Token Firewall:&lt;/strong&gt; 2,737 tokens sent per run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;With Token Firewall:&lt;/strong&gt; 1,764 tokens sent per run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s a &lt;strong&gt;35.6% direct reduction&lt;/strong&gt; without modifying the codebase or altering the context's underlying meaning.&lt;/p&gt;

&lt;p&gt;On top of that, I added the &lt;strong&gt;Cache Layout Guard&lt;/strong&gt;: it reorganizes the prompt to maintain a stable prefix (agents + skills + prompt = 1,167 tokens in this example), making it ready for providers like Anthropic, OpenAI, or Gemini to trigger their native prompt caching depending on the available window.&lt;/p&gt;




&lt;h3&gt;
  
  
  How does this differ from other tools?
&lt;/h3&gt;

&lt;p&gt;It's not that other tools lack cost control. The difference is that &lt;strong&gt;Mova Context&lt;/strong&gt; flattens this entire process into a single deterministic, auditable, and automated pipeline right before every API call:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Black Boxes:&lt;/strong&gt; Uses a deterministic algorithm to strip out noise (runs in microseconds, without using &lt;em&gt;another&lt;/em&gt; LLM that consumes tokens just to summarize).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real Auditability:&lt;/strong&gt; Detailed reports show exactly how many tokens and dollars you saved per file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-channel:&lt;/strong&gt; Works identically across the terminal, chat interfaces, scheduled jobs, multi-agent orchestrations, and via HTTP/MCP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circuit Breaker:&lt;/strong&gt; If a run exceeds your pre-configured budget/limit, it aborts &lt;em&gt;before&lt;/em&gt; making the outbound HTTP request to the LLM provider.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What’s new in this release?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Job Engine:&lt;/strong&gt; Run scheduled background tasks via cron using a background daemon (&lt;code&gt;mova jobs start&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Agent Orchestration:&lt;/strong&gt; Coordinate grouped agents directly through a &lt;code&gt;config.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New TUI (&lt;code&gt;mova ui&lt;/code&gt;):&lt;/strong&gt; A full terminal interface built with Bubble Tea to manage projects, jobs, logs, and chats.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logging &amp;amp; Rotation Systems:&lt;/strong&gt; Configurable log levels for full end-to-end traceability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved Installers:&lt;/strong&gt; Direct setup with pre-configured consoles for Windows, macOS, and Linux (including full support for UNC paths, WSL, and Docker).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation &amp;amp; Walkthroughs:&lt;/strong&gt; Step-by-step guides backed by real execution data inside &lt;code&gt;/examples&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Mova doesn't promise to cut your LLM bill in half across every single scenario (if your code is already pristine or your context is genuinely massive, the impact percentage will be lower). It is an architectural hygiene layer for your context, engineered to prevent unnecessary spending.&lt;/p&gt;

&lt;p&gt;The project is fully open source. If you test it out on your projects, any feedback, edge-case report, or issue on the repository would be hugely appreciated!&lt;/p&gt;




&lt;p&gt;You can check out the source code, CLI, and setup guides here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/m1guel1982/mova-context" rel="noopener noreferrer"&gt;github.com/m1guel1982/mova-context&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Includes practical examples with &lt;code&gt;mova budget&lt;/code&gt;, pricing configurations in &lt;code&gt;prices.json&lt;/code&gt;, and Chat/MCP/HTTP integrations.&lt;/p&gt;

&lt;p&gt;Any feedback or issue is more than welcome!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>goolang</category>
      <category>llm</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
