<?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: MERC</title>
    <description>The latest articles on DEV Community by MERC (@merc_2a1cc4f16).</description>
    <link>https://dev.to/merc_2a1cc4f16</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%2F4234812%2Fc8874871-599f-4daf-b0da-c52bafd7d879.png</url>
      <title>DEV Community: MERC</title>
      <link>https://dev.to/merc_2a1cc4f16</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/merc_2a1cc4f16"/>
    <language>en</language>
    <item>
      <title>A local LLM agent that's ~300x lighter than OpenClaw</title>
      <dc:creator>MERC</dc:creator>
      <pubDate>Mon, 09 Nov 2026 09:50:12 +0000</pubDate>
      <link>https://dev.to/merc_2a1cc4f16/a-local-llm-agent-thats-300x-lighter-than-openclaw-4612</link>
      <guid>https://dev.to/merc_2a1cc4f16/a-local-llm-agent-thats-300x-lighter-than-openclaw-4612</guid>
      <description>&lt;p&gt;I've been running local LLMs for a while, and one thing kept bothering me: most agent frameworks are heavy. System prompts, tool schemas, function definitions, orchestration logic — by the time the model gets to do anything, half the context is gone.&lt;/p&gt;

&lt;p&gt;OpenClaw and similar tools are powerful, but they carry a lot of overhead. My agent is roughly 300x lighter in size (about 1,500 lines of Python, standard library only, no dependencies) and starts far faster in my testing. (Replace with your actual metric if it's memory, startup time, etc.)&lt;/p&gt;

&lt;p&gt;This post is about the design, not a pitch.&lt;/p&gt;

&lt;p&gt;The idea: cmd blocks instead of the tools API&lt;/p&gt;

&lt;p&gt;Instead of the usual function-calling setup, the model just writes commands inside plain cmd blocks. The agent finds them, asks for approval (y/n), and runs them.&lt;/p&gt;

&lt;p&gt;Sure, let me check the logs.&lt;/p&gt;

&lt;p&gt;tail -n 50 /var/log/syslog&lt;/p&gt;

&lt;p&gt;That's the whole protocol. No JSON schemas, no middleware, no big tool definitions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it saves&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In my old setup, framework overhead was roughly 260 extra tokens per request. On a small local model that adds up fast — every turn re-sends that stuff.&lt;/p&gt;

&lt;p&gt;It also helps with KV cache reuse: I run it against Colibri, my OpenAI-compatible local server, which reuses the conversation cache and only processes new tokens. Smaller cache, faster responses, even on models that felt too slow before. It should work with llama.cpp, Ollama, vLLM, or any OpenAI-compatible backend.&lt;/p&gt;

&lt;p&gt;The unusual part: roleplay + agent&lt;/p&gt;

&lt;p&gt;The project has three modes:&lt;/p&gt;

&lt;p&gt;agent — normal CLI agent&lt;/p&gt;

&lt;p&gt;rp_agent — roleplay character that can also run commands (supports chara_card_v2)&lt;/p&gt;

&lt;p&gt;chat — just conversation, no system access&lt;/p&gt;

&lt;p&gt;The rp_agent mode is the part I'm unsure about. You load a character card, and the model works on your system while staying in character — commands are the character's actions, not separate instructions. I don't know yet if that's a good idea or overengineering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Context rotation at 75% — summarizes and archives instead of dropping old messages&lt;/p&gt;

&lt;p&gt;/save and /load for sessions&lt;/p&gt;

&lt;p&gt;Tmux interface with separate panels&lt;/p&gt;

&lt;p&gt;Safety: shell injection guard, command whitelist, permission modes&lt;/p&gt;

&lt;p&gt;What I'd like feedback on&lt;/p&gt;

&lt;p&gt;Command blocks vs. the tools API — is function calling actually too expensive for local models, or is it just me?&lt;/p&gt;

&lt;p&gt;Context summaries + rotation vs. simple truncation — does it hold up over long sessions?&lt;/p&gt;

&lt;p&gt;Roleplay + agent — interesting, or should these stay separate?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Tyv43/colibri-mini-agent-character-assistant" rel="noopener noreferrer"&gt;https://github.com/Tyv43/colibri-mini-agent-character-assistant&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;~1,500 lines of Python, standard library only, no pip install. If it breaks, open an issue.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>python</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
