<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ai-Agents on vishctl</title><link>https://vishctl.dev/tags/ai-agents/</link><description>Recent content in Ai-Agents on vishctl</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 27 Sep 2026 00:05:00 +0800</lastBuildDate><atom:link href="https://vishctl.dev/tags/ai-agents/index.xml" rel="self" type="application/rss+xml"/><item><title>Hermes Agent + LM Studio Bionic: Running Gemma 4 Locally</title><link>https://vishctl.dev/posts/hermes-agent-lm-studio-gemma4/</link><pubDate>Sun, 27 Sep 2026 00:05:00 +0800</pubDate><guid>https://vishctl.dev/posts/hermes-agent-lm-studio-gemma4/</guid><category>ai</category><category>local-llm</category><category>ai-agents</category><category>hermes-agent</category><category>lm-studio</category><category>gemma</category><category>homelab</category><description>A Windows walkthrough of Hermes Agent connected to LM Studio Bionic with Gemma 4 E4B: local inference, custom endpoint settings, tool use, and the checks that confirm it works.</description><content:encoded><![CDATA[<p>I wanted to take my local LLM setup one step further: put an agent in front of it. Keep the model on my machine, but give it a desktop interface, tools, and a way to work beyond a single chat reply.</p>
<p>The stack I connected was <strong>Hermes Agent + LM Studio Bionic + Gemma 4 E4B</strong> on Windows. Hermes handles the conversation and tools. Bionic hosts the model through a local API. Gemma generates the responses.</p>
<p>The connection comes down to two values:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Base URL: http://localhost:1234/v1
</span></span><span class="line"><span class="cl">Model:    google/gemma-4-e4b
</span></span></code></pre></div><p>This walkthrough follows my September setup, with the working configuration captured on September 26. The model inference runs locally. Optional features such as web search and Telegram still use network services, which matters when deciding what &ldquo;all local&rdquo; means for a particular task.</p>
<p><em>Select any screenshot to open it at full resolution.</em></p>
<h2 id="how-the-pieces-fit-together">How the pieces fit together</h2>
<p><a href="https://hermes-agent.nousresearch.com/docs/user-guide/desktop">Hermes Agent</a> is the agent application. It manages sessions, tool execution, and the conversation around the model. The model does not execute a command itself: the agent handles that part and can pass the result back for another response.</p>
<p><a href="https://lmstudio.ai/blog/introducing-lm-studio-bionic">LM Studio Bionic</a> is a separate app from classic LM Studio, with its own agent features and support for local models through the LM Studio runtime. In this setup, I use <strong>its Local Model API as Hermes&rsquo;s model backend</strong>. Bionic&rsquo;s own chat interface is not an extra agent step in the request path.</p>
<p><strong>Gemma 4 E4B</strong> is the model loaded behind that API. Selecting a different model in Hermes only works if the server can actually serve that identifier.</p>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/01-local-agent-flow.svg">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/01-local-agent-flow.svg"
         alt="Hermes Agent sends requests over localhost to LM Studio Bionic, which runs Gemma 4 E4B on the same machine. Optional web search and Telegram connect separately to Hermes over the network."/> </a><figcaption>
            <p>The inference path stays on the machine. Network tools are a separate part of the agent workflow.</p>
        </figcaption>
</figure>

<p>The interface is <strong>OpenAI-compatible</strong>: it uses a familiar request format while sending requests to <code>localhost</code>. It does not require an OpenAI-hosted model. LM Studio documents both the model-listing and chat-completion endpoints in its <a href="https://lmstudio.ai/docs/developer/openai-compat">API compatibility documentation</a>.</p>
<h2 id="1-install-hermes-and-download-the-model">1. Install Hermes and download the model</h2>
<p>Start with the <a href="https://hermes-agent.nousresearch.com/desktop">Hermes desktop download</a> and <a href="https://lmstudio.ai/download">LM Studio downloads</a>. Choose <strong>Bionic</strong> for the interface shown here. Installation and the initial model download need internet access.</p>
<p>My earlier Hermes setup screen shows the installer preparing Python, Git, Node.js, and the desktop dependencies. Let the first-time setup complete before configuring the provider.</p>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/02-hermes-windows-installer.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/02-hermes-windows-installer.png"
         alt="Hermes Windows installer preparing dependencies and building the desktop app"/> </a><figcaption>
            <p>The initial Windows setup on September 1. Later launches use the installed environment.</p>
        </figcaption>
</figure>

<p>In Bionic, open <strong>Settings → Local Models → Explore</strong>, find <strong>Gemma 4 E4B</strong>, and download the instruction-tuned model. These are the details visible in my setup:</p>
<div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Item</th>
            <th scope="col">My selection</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Model</td>
            <td>Gemma 4 E4B Instruct</td>
        </tr>
        <tr>
            <td>Local API identifier</td>
            <td><code>google/gemma-4-e4b</code></td>
        </tr>
        <tr>
            <td>Format</td>
            <td>GGUF</td>
        </tr>
        <tr>
            <td>Quantization</td>
            <td><code>Q4_K_M</code></td>
        </tr>
        <tr>
            <td>Displayed model size</td>
            <td>6.33 GB</td>
        </tr>
        <tr>
            <td>Execution location</td>
            <td>This device</td>
        </tr>
    </tbody>
  </table>
</div>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/03-gemma4-model-download.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/03-gemma4-model-download.png"
         alt="Bionic Explore page with Gemma 4 E4B selected and a 6.33 GB instruction-tuned download available locally"/> </a><figcaption>
            <p>Gemma 4 E4B downloaded in Bionic. The model page advertises vision, tools, and reasoning capabilities.</p>
        </figcaption>
</figure>

<p>The <strong>E</strong> in E4B means <em>effective</em>. Google&rsquo;s model card lists approximately 4.5 billion effective parameters and 8 billion with embeddings. That is why treating E4B as a conventional 4-billion-parameter weight file can give the wrong memory expectation, as detailed in <a href="https://ai.google.dev/gemma/docs/core/model_card_4">Google&rsquo;s Gemma 4 model card</a>.</p>
<p>Also distinguish the local serving name from the upstream repository. Google&rsquo;s instruction-tuned model card is <a href="https://huggingface.co/google/gemma-4-E4B-it">google/gemma-4-E4B-it</a>; the endpoint in my screenshots serves it as <code>google/gemma-4-e4b</code>. Use the name your local server reports.</p>
<h2 id="2-start-the-local-model-api">2. Start the Local Model API</h2>
<p>Open <strong>Settings → Local Model API</strong> in Bionic and turn on the server. My screen shows:</p>
<ul>
<li><strong>Local API server:</strong> Running</li>
<li><strong>Base URL:</strong> <code>http://localhost:1234/v1</code></li>
<li><strong>Just-in-time model loading:</strong> On</li>
<li><strong>CORS:</strong> Off</li>
</ul>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/04-local-model-api.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/04-local-model-api.png"
         alt="Local Model API running at localhost port 1234 with just-in-time loading enabled and a Gemma completion in the server log"/> </a><figcaption>
            <p>Bionic&rsquo;s local server is running. The log also records a completion for google/gemma-4-e4b.</p>
        </figcaption>
</figure>

<p>Just-in-time loading lets an API request load a matching model when possible. For the first check, it is still useful to confirm the model appears under <strong>Loaded Instances</strong>, so a download or loading issue is easier to spot.</p>
<p>The screenshots keep CORS off. It is not a general connection switch to enable whenever a client fails; it concerns browser-origin requests. First check the server address, model, and authentication settings.</p>
<p>Both apps run on the same Windows machine here. If Hermes runs inside WSL, a container, or another computer, <code>localhost</code> refers to that environment instead. The address may then need to change.</p>
<h2 id="3-add-the-endpoint-in-hermes">3. Add the endpoint in Hermes</h2>
<p>In Hermes, open <strong>Settings → Providers → Custom Endpoints</strong>. Create a named endpoint so it is easy to recognize in the provider list.</p>
<div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Field</th>
            <th scope="col">Value shown in my setup</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Name</td>
            <td><code>LMStudio Local</code></td>
        </tr>
        <tr>
            <td>Provider ID</td>
            <td><code>lmstudio-local</code></td>
        </tr>
        <tr>
            <td>Endpoint URL</td>
            <td><code>http://localhost:1234/v1</code></td>
        </tr>
        <tr>
            <td>API Mode</td>
            <td>Auto-detect</td>
        </tr>
        <tr>
            <td>Default Model</td>
            <td><code>google/gemma-4-e4b</code></td>
        </tr>
        <tr>
            <td>Context</td>
            <td>Auto</td>
        </tr>
        <tr>
            <td>Use for new chats</td>
            <td>Enabled</td>
        </tr>
        <tr>
            <td>Discover models</td>
            <td>Enabled</td>
        </tr>
    </tbody>
  </table>
</div>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/05-hermes-custom-endpoint.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/05-hermes-custom-endpoint.png"
         alt="Hermes Custom Endpoints settings with LMStudio Local active, localhost API URL, and google/gemma-4-e4b selected"/> </a><figcaption>
            <p>The working custom endpoint on September 26. Hermes and Bionic must agree on the base URL and model identifier.</p>
        </figcaption>
</figure>

<p>Use the <strong>base URL</strong>, including <code>/v1</code>, in the endpoint field. Do not paste the full <code>/v1/chat/completions</code> request URL there.</p>
<p>Authentication depends on the server configuration. LM Studio&rsquo;s API documentation says authentication is disabled by default; if you enable it, supply the matching local API token in Hermes. A placeholder saying &ldquo;Leave blank to keep current key&rdquo; does not reveal whether an existing key is stored, as noted in the <a href="https://lmstudio.ai/docs/developer/core/authentication">LM Studio authentication documentation</a>.</p>
<p>Click <strong>Test</strong>, then <strong>Save</strong>, and activate the endpoint with <strong>Use</strong> if needed. Check the active profile as well: my screen has separate <code>default</code> and <code>work</code> scopes.</p>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/06-endpoint-test.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/06-endpoint-test.png"
         alt="Earlier Hermes endpoint configuration with a notification that the endpoint is reachable and two models were found"/> </a><figcaption>
            <p>An earlier September 1 check returned: Endpoint is reachable. Found 2 models. Your count depends on the local model inventory.</p>
        </figcaption>
</figure>

<p>Current Hermes also documents a built-in <strong>LM Studio</strong> provider through <code>hermes model</code>, described in the <a href="https://hermes-agent.nousresearch.com/docs/integrations/providers">Hermes provider guide</a>. The custom endpoint route above is the desktop configuration used in these screenshots.</p>
<h2 id="4-check-the-request-from-both-sides">4. Check the request from both sides</h2>
<p>Start a new Hermes session and confirm the model selector says <strong>Gemma 4 E4B</strong>. A saved default does not necessarily change the provider of an existing conversation.</p>
<p>Send a small prompt first, such as <code>Hi Hermes</code>. While it runs, inspect <strong>Loaded Instances</strong> in Bionic. My capture shows Gemma on <strong>This device</strong>, with an active request marked <strong>Generating</strong>.</p>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/07-local-model-generating.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/07-local-model-generating.png"
         alt="Gemma 4 E4B loaded on this device in GGUF Q4_K_M format with one request generating and a token count of 226"/> </a><figcaption>
            <p>The local runtime is doing work: Gemma 4 E4B has an active generation request.</p>
        </figcaption>
</figure>

<p>This is a better check than the model selector alone: Hermes points to the local provider, and the local server shows generation for the same model.</p>
<p>The numbers on this screen need some care. <strong>226</strong> is a token count, not tokens per second. <strong>6.33 GB</strong> is the displayed model size, not a measurement of total runtime memory. <strong>109,568 ctx</strong> is the loaded context setting in this instance, not a long-context benchmark or a setting everyone should copy.</p>
<p>Model weights, context cache, and runtime overhead all consume memory. If loading or generation struggles, reduce the configured context and check actual RAM/VRAM use. Google&rsquo;s <a href="https://ai.google.dev/gemma/docs/core">memory-planning notes</a> also distinguish model weights from context and other runtime allocations.</p>
<h3 id="optional-check-the-api-directly-with-powershell">Optional: check the API directly with PowerShell</h3>
<p>This diagnostic separates a server problem from a Hermes configuration problem. Run it on the machine hosting Bionic. The first request lists model identifiers:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="nv">$baseUrl</span> <span class="p">=</span> <span class="s2">&#34;http://localhost:1234/v1&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$headers</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Only needed if you enabled authentication on the local server.</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="nv">$env:LM_API_TOKEN</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nv">$headers</span><span class="p">.</span><span class="py">Authorization</span> <span class="p">=</span> <span class="s2">&#34;Bearer </span><span class="nv">$env:LM_API_TOKEN</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$models</span> <span class="p">=</span> <span class="nb">Invoke-RestMethod</span> <span class="n">-Uri</span> <span class="s2">&#34;</span><span class="nv">$baseUrl</span><span class="s2">/models&#34;</span> <span class="n">-Headers</span> <span class="nv">$headers</span>
</span></span><span class="line"><span class="cl"><span class="nv">$models</span><span class="p">.</span><span class="py">data</span> <span class="p">|</span> <span class="nb">Select-Object</span> <span class="n">id</span>
</span></span></code></pre></div><p>Then send a small chat request, using the exact ID returned by your server:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="nv">$body</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">model</span> <span class="p">=</span> <span class="s2">&#34;google/gemma-4-e4b&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="n">messages</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">            <span class="n">role</span> <span class="p">=</span> <span class="s2">&#34;user&#34;</span>
</span></span><span class="line"><span class="cl">            <span class="n">content</span> <span class="p">=</span> <span class="s2">&#34;In one sentence, explain what local inference means.&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">stream</span> <span class="p">=</span> <span class="vm">$false</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span> <span class="p">|</span> <span class="nb">ConvertTo-Json</span> <span class="n">-Depth</span> <span class="mf">6</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$response</span> <span class="p">=</span> <span class="nb">Invoke-RestMethod</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-Uri</span> <span class="s2">&#34;</span><span class="nv">$baseUrl</span><span class="s2">/chat/completions&#34;</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-Method</span> <span class="n">Post</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-Headers</span> <span class="nv">$headers</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-ContentType</span> <span class="s2">&#34;application/json&#34;</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-Body</span> <span class="nv">$body</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">$response</span><span class="p">.</span><span class="n">choices</span><span class="p">[</span><span class="mf">0</span><span class="p">].</span><span class="py">message</span><span class="p">.</span><span class="py">content</span>
</span></span></code></pre></div><p>A model-list response proves the server is reachable and the model is discoverable; a completion proves the runtime can actually generate. LM Studio documents these separately as <a href="https://lmstudio.ai/docs/developer/openai-compat/models">List Models</a> and <a href="https://lmstudio.ai/docs/developer/openai-compat/chat-completions">Chat Completions</a>.</p>
<h2 id="5-try-a-tool-then-inspect-what-happened">5. Try a tool, then inspect what happened</h2>
<p>After the greeting worked, I asked Hermes about the weather in Singapore. The conversation shows a <strong>search step</strong>, followed by a weather response, with Gemma 4 E4B selected in the composer.</p>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/08-hermes-weather-tool.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/08-hermes-weather-tool.png"
         alt="Hermes conversation with a greeting and a Singapore weather question, showing a web search action and Gemma 4 E4B selected"/> </a><figcaption>
            <p>A chat reply followed by a tool-assisted weather answer. The model is local; the search needs the network.</p>
        </figcaption>
</figure>

<p>That is the interesting step beyond plain local chat: the agent fetched information through a tool and used it in the reply. It shows the plumbing works, not that the search result is accurate, so for something like live weather, trust the source over the summary.</p>
<p>Hermes exposes its skills and tools through <strong>Capabilities</strong>. This allows connecting local CLI tools (such as developer utilities or sandboxes) alongside broader integrations. The Skills Hub is useful for discovering workflows, but an installed skill can still call external services or require separate credentials. Check which endpoints or external services a skill calls before assuming the whole workflow stays on the machine, as covered in the <a href="https://hermes-agent.nousresearch.com/docs/user-guide/features/web-search">Hermes web-tool documentation</a>.</p>
<figure class="post-screenshot"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/09-hermes-skills.png">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/09-hermes-skills.png"
         alt="Hermes Capabilities view showing installed skills, tool tabs, and the Skills Hub browser"/> </a><figcaption>
            <p>Capabilities adds workflows around the local model. Catalog availability is separate from what has been installed and tested.</p>
        </figcaption>
</figure>

<p>For a useful local follow-up, try a small workspace task: ask Hermes to read a README and summarize the project, or explain a short log file. Start with a read-only request and review the tool activity before moving on to edits.</p>
<h2 id="where-all-local-begins-and-ends">Where &ldquo;all local&rdquo; begins and ends</h2>
<p>For this configuration, <strong>the agent application and model runtime are on my machine, and the selected model is served over loopback</strong>. There is no hosted LLM required for that main inference path.</p>
<div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Activity</th>
            <th scope="col">Where it happens</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Gemma response generation</td>
            <td>Local LM Studio runtime</td>
        </tr>
        <tr>
            <td>Hermes conversation and orchestration</td>
            <td>Local desktop app</td>
        </tr>
        <tr>
            <td>Reading a local file through a local tool</td>
            <td>On the machine</td>
        </tr>
        <tr>
            <td>Initial app and model downloads</td>
            <td>Network required</td>
        </tr>
        <tr>
            <td>Web search and fetched pages</td>
            <td>External network services</td>
        </tr>
        <tr>
            <td>Telegram messaging</td>
            <td>Telegram&rsquo;s network</td>
        </tr>
        <tr>
            <td>Other skills, connectors, or auxiliary models</td>
            <td>Depends on their configuration</td>
        </tr>
    </tbody>
  </table>
</div>
<p>LM Studio supports <a href="https://lmstudio.ai/docs/app/offline">offline inference with downloaded models</a>. To check an entirely offline Hermes workflow, disable network-dependent integrations, check any auxiliary model settings, disconnect the network, and try the exact local task you intend to use. The connected weather example above is not that test.</p>
<h3 id="optional-reach-hermes-through-telegram">Optional: reach Hermes through Telegram</h3>
<p>I also connected Telegram during the earlier setup. Hermes&rsquo;s messaging settings let you configure a bot and restrict access to approved users. Follow the <a href="https://hermes-agent.nousresearch.com/docs/user-guide/messaging/telegram">official Telegram setup guide</a> for the token, user access, and gateway steps.</p>
<p>This gives you a messaging interface to the agent while the model can continue running locally. The host machine, Hermes gateway, and local model server need to remain available. Messages still pass through Telegram, so this is a network-connected extension of the setup.</p>
<figure class="post-screenshot post-screenshot-portrait"><a href="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/10-telegram-hermes-bot.jpg">
    <img loading="lazy" src="https://vishctl.dev/images/posts/hermes-agent-lm-studio-gemma4/10-telegram-hermes-bot.jpg"
         alt="Telegram conversation with Hermes Bot showing a greeting, a web search for the Jev model, and a generated reply"/> </a><figcaption>
            <p>Hermes receives the Telegram message, runs a web search, and replies through the bot.</p>
        </figcaption>
</figure>

<h2 id="if-something-does-not-work">If something does not work</h2>
<div class="table-scroll">
  <table>
    <thead>
        <tr>
            <th scope="col">Symptom</th>
            <th scope="col">What to check first</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Connection refused</td>
            <td>Bionic is running, the Local Model API is on, and the port matches.</td>
        </tr>
        <tr>
            <td>Endpoint works in PowerShell but not in Hermes</td>
            <td>Base URL, active endpoint, profile, and selected conversation model.</td>
        </tr>
        <tr>
            <td>Model not found</td>
            <td>Copy the exact ID from <code>/v1/models</code>; a display name or upstream repository name may differ.</td>
        </tr>
        <tr>
            <td>HTTP 401 or missing authorization</td>
            <td>Confirm which provider received the request, then check its authentication requirements.</td>
        </tr>
        <tr>
            <td>Unexpected API-format errors</td>
            <td>The shown setup uses Auto-detect. If detection fails, explicitly try Chat Completions, which the server supports.</td>
        </tr>
        <tr>
            <td>Loading fails or generation becomes very slow</td>
            <td>Available memory, context allocation, competing loaded models, and runtime/offload settings.</td>
        </tr>
        <tr>
            <td>Chat works but a tool fails</td>
            <td>Tool configuration, permissions, and model/runtime support for tool calls. A text reply alone does not test these.</td>
        </tr>
        <tr>
            <td>Telegram stops replying</td>
            <td>Host availability, gateway status, allowed users, and access to the local model server.</td>
        </tr>
    </tbody>
  </table>
</div>
<p>The part I wanted to prove here was straightforward: <strong>Hermes can use my locally served Gemma model as its backend.</strong> The endpoint test, the model&rsquo;s active generation, and the resulting conversation make that connection visible.</p>
<p>From here, I would evaluate it task by task: local file summaries, log analysis, and small coding changes, checking both the answers and the tool actions. Getting the agent connected is the starting point; learning which work this model handles well is the next experiment.</p>
<p>If you are building up the same stack, my <a href="https://vishctl.dev/posts/ai-agent-basics/">AI agent basics</a> guide explains the model/tool loop, and <a href="https://vishctl.dev/posts/running-llama-cpp-on-32gb-macbook-air/">running llama.cpp locally</a> looks at the runtime side more directly.</p>
<h2 id="cheat-sheet">Cheat sheet</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Hermes Agent         = the agent app: manages sessions, tools, and the conversation
</span></span><span class="line"><span class="cl">LM Studio Bionic     = the app hosting the model behind a local API
</span></span><span class="line"><span class="cl">Gemma 4 E4B          = the model: about 4.5B effective parameters, 8B with embeddings
</span></span><span class="line"><span class="cl">Local Model API      = Bionic&#39;s OpenAI-compatible server at http://localhost:1234/v1
</span></span><span class="line"><span class="cl">OpenAI-compatible    = the familiar request format, sent to localhost instead of a hosted model
</span></span><span class="line"><span class="cl">Model identifier     = the name the local server reports (google/gemma-4-e4b here); use that one
</span></span><span class="line"><span class="cl">Just-in-time loading = an API request can load a matching model on demand
</span></span><span class="line"><span class="cl">Who runs tools       = the agent, not the model; results go back to the model for another reply
</span></span><span class="line"><span class="cl">All local            = inference stays on the machine; web search and Telegram still use the network
</span></span><span class="line"><span class="cl">localhost caveat     = from WSL, a container, or another machine, localhost points somewhere else
</span></span></code></pre></div>]]></content:encoded></item></channel></rss>