<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>llms &amp;mdash; Nat Knight</title>
    <link>http://natknight.xyz/tag:llms</link>
    <description>Reflections, diversions, and opinions from a progressive ex-physicist programmer dad with a sore back.</description>
    <pubDate>Mon, 23 Nov 2026 02:20:36 -0700</pubDate>
    <item>
      <title>Self-hosting a Software Factory: Part 2, It&#39;s the error states, stupid!</title>
      <link>http://natknight.xyz/self-hosting-a-software-factory-part-2-its-the-error-states-stupid</link>
      <description>&lt;![CDATA[#project #selfhosting #llms #agents&#xA;&#xA;My self-hosted software factory is coming along!&#xA;&#xA;!--more--&#xA;&#xA;After a bit of research I settled on Incus as my sandboxing technology (it&#39;s not unlike Docker, but uses actual VMs instead of containers).&#xA;I&#39;ve figured out how to use the EYG CLI as an &#34;oracle&#34; in my containers and tests.&#xA;I&#39;ve figured out how to safely store and manage code (with git-bundle).&#xA;I&#39;m using a Django app (hey, I said it could be janky) as my coordinator.&#xA;&#xA;As I build out the coordinator I&#39;m finding the places where the complexity was hiding, and as usual it&#39;s mostly in the error cases.&#xA;&#xA;A naive model of how this system should work is tantalizingly simple: work goes in one end, the agent does the work, commits land on main:&#xA;&#xA;Diagram: Tickets / Specs flow into Agent Runs, which produce Commits.&#xA;&#xA;But of course, sometimes the agent won&#39;t converge, or commits will introduce bugs:&#xA;&#xA;Diagram: the same flow, with arrows looping back to Tickets / Specs from Agent Runs (non-convergence or ambiguity) and from Commits (bugs).&#xA;&#xA;That&#39;s fine, part of how the factory works is by catching and automatically fixing bugs.&#xA;&#xA;But then, of course, there are the cases where jobs fail for exogenous reasons: expired keys, resource limitations, home server networking hiccups or power outages. These introduce a lot of possible corrupt states, and often necessitate human intervention:&#xA;&#xA;Diagram: the previous flow, plus arrows from Tickets / Specs and Agent Runs down to a Human Intervention box (infra errors, elevated permissions).&#xA;&#xA;And, oh yeah, we were going to have a bunch of tests here. What if the agent finishes but the CI or holdout tests fail?&#xA;&#xA;Diagram: the previous flow with a Tests stage between Agent Runs and Commits; failing tests loop back to Tickets / Specs as bugs or escalate to Human Intervention.&#xA;&#xA;I&#39;m sure there are other failure modes I haven&#39;t thought of.&#xA;&#xA;Once this project is over I look forward to seeing how others have tackled this:&#xA;&#xA;Is it irreducible complexity? Do you just need to deal with it?&#xA;Is there a re-framing, a fundamental abstraction, or a different set of primitives that makes the problem dramatically simpler?&#xA;Is it way more efficient to just sandbox and manually manage an agent powered by a high-end model? (I suspect it may be.)&#xA;Do I learn enough that I want to tear this factory apart and re-build it?&#xA;&#xA;Only time will tell!&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="http://natknight.xyz/tag:project" class="hashtag"><span>#</span><span class="p-category">project</span></a> <a href="http://natknight.xyz/tag:selfhosting" class="hashtag"><span>#</span><span class="p-category">selfhosting</span></a> <a href="http://natknight.xyz/tag:llms" class="hashtag"><span>#</span><span class="p-category">llms</span></a> <a href="http://natknight.xyz/tag:agents" class="hashtag"><span>#</span><span class="p-category">agents</span></a></p>

<p>My <a href="https://natknight.xyz/self-hosting-a-software-factory-part-1">self-hosted software factory</a> is coming along!</p>


<ul><li>After a bit of research I settled on <a href="https://linuxcontainers.org/incus/">Incus</a> as my sandboxing technology (it&#39;s not unlike Docker, but uses actual VMs instead of containers).</li>
<li>I&#39;ve figured out how to use the <a href="https://eyg.run/guides/install-a-prebuilt-binary">EYG CLI</a> as an “oracle” in my containers and tests.</li>
<li>I&#39;ve figured out how to safely store and manage code (with <a href="https://git-scm.com/docs/git-bundle"><code>git-bundle</code></a>).</li>
<li>I&#39;m using a Django app (hey, I said it could be janky) as my coordinator.</li></ul>

<p>As I build out the coordinator I&#39;m finding the places where the complexity was hiding, and as usual it&#39;s mostly in the error cases.</p>

<p>A naive model of how this system should work is tantalizingly simple: work goes in one end, the agent does the work, commits land on <code>main</code>:</p>

<p><img src="https://natknight.xyz/static/factory2/factory-1-naive.svg" alt="Diagram: Tickets / Specs flow into Agent Runs, which produce Commits."></p>

<p>But of course, sometimes the agent won&#39;t converge, or commits will introduce bugs:</p>

<p><img src="https://natknight.xyz/static/factory2/factory-2-bugs.svg" alt="Diagram: the same flow, with arrows looping back to Tickets / Specs from Agent Runs (non-convergence or ambiguity) and from Commits (bugs)."></p>

<p>That&#39;s fine, part of how the factory works is by catching and automatically fixing bugs.</p>

<p>But then, of course, there are the cases where jobs fail for exogenous reasons: expired keys, resource limitations, home server networking hiccups or power outages. These introduce a <em>lot</em> of possible corrupt states, and often necessitate human intervention:</p>

<p><img src="https://natknight.xyz/static/factory2/factory-3-human.svg" alt="Diagram: the previous flow, plus arrows from Tickets / Specs and Agent Runs down to a Human Intervention box (infra errors, elevated permissions)."></p>

<p>And, oh yeah, we were going to have a bunch of tests here. What if the agent finishes but the CI or holdout tests fail?</p>

<p><img src="https://natknight.xyz/static/factory2/factory-4-tests.svg" alt="Diagram: the previous flow with a Tests stage between Agent Runs and Commits; failing tests loop back to Tickets / Specs as bugs or escalate to Human Intervention."></p>

<p>I&#39;m sure there are other failure modes I haven&#39;t thought of.</p>

<p>Once this project is over I look forward to seeing how others have tackled this:</p>
<ul><li>Is it irreducible complexity? Do you just need to deal with it?</li>
<li>Is there a re-framing, a fundamental abstraction, or a different set of primitives that makes the problem dramatically simpler?</li>
<li>Is it way more efficient to just sandbox and manually manage an agent powered by a high-end model? (I suspect it may be.)</li>
<li>Do I learn enough that I want to tear this factory apart and re-build it?</li></ul>

<p>Only time will tell!</p>
]]></content:encoded>
      <guid>http://natknight.xyz/self-hosting-a-software-factory-part-2-its-the-error-states-stupid</guid>
      <pubDate>Wed, 11 Nov 2026 03:41:27 +0000</pubDate>
    </item>
    <item>
      <title>Self-hosting a Software Factory: Part 1</title>
      <link>http://natknight.xyz/self-hosting-a-software-factory-part-1</link>
      <description>&lt;![CDATA[#project #selfhosting #llms #agents&#xA;&#xA;One of the ways that folks are leveraging LLM-powered agents to do software development is the &#34;software factory&#34; (or [&#34;software dark factory&#34;]) pattern, where the LLMs write all the code and the humans aren&#39;t allowed to even review it.&#xA;&#xA;[&#34;software dark factory&#34;]: https://www.danshapiro.com/blog/2026/01/the-five-levels-from-spicy-autocomplete-to-the-software-factory/&#xA;&#xA;Apparently this works, though you need a good way to verify your product. I&#39;m a little skeptical that it&#39;s the best way to use these tools, but it&#39;s an interesting idea, so I&#39;m going to try to build one for myself.&#xA;&#xA;!--more--&#xA;&#xA;The Project&#xA;&#xA;I&#39;m cheating a little bit by picking a project that&#39;s embarrassingly easy to verify: a new interpreter for an extant programming language.&#xA;&#xA;The programming language is called [EYG] and has many interesting and desirable properties:&#xA;&#xA;functional style + a sound type system&#xA;immutable dependencies&#xA;deterministic execution&#xA;the editor tooling and compiler are independent of the runtime (so I don&#39;t have to implement them!)&#xA;&#xA;[EYG]: https://eyg.run&#xA;&#xA;Its only annoying drawback is that its interpreter is in JavaScript (compiled from Gleam, but running on Node). I&#39;d really prefer a native interpreter, or better still, a Rust library that can execute EYG code.&#xA;&#xA;Lucky for me, I have:&#xA;&#xA;access to LLMs that can cheaply churn out code, and&#xA;an &#34;oracle&#34; that can see if my project is working properly, i.e. the existing EYG interpreter.&#xA;&#xA;So that&#39;s the project: a Rust library + easily deployable binary that can interpret EYG code.&#xA;&#xA;The Rules&#xA;&#xA;The project will be split into two repos, each with different rules:&#xA;&#xA;eyg-rs is the actual interpreter/library:&#xA;&#xA;I&#39;m not allowed to write or review code here. I can peek in occasionally for quality control, but that should be the exception.&#xA;The work needs to be mediated by an automated system, not me manually driving an agent.&#xA;The code needs to end up correct, efficient, and clean.&#xA;All agent-driven work must happen in a sandbox on my own hardware.&#xA;&#xA;I&#39;m trying to learn about the factory pattern, so I actually have to build one. I could almost certainly just point Claude Code at the EYG spec and have it converge on a working interpreter, but that wouldn&#39;t teach me anything about the system that&#39;s managing the work.&#xA;&#xA;Keeping it sandboxed is a precaution against an agent hosing my home lab.&#xA;&#xA;Figuring out how to get it clean and efficient is, of course, part of the challenge.&#xA;&#xA;eyg-rs-factory is the system that tracks work, manages the agent, and validates the final product:&#xA;&#xA;I can read and write code here, including using agents to do it for me.&#xA;I can use my tools in whatever mode gets the job done.&#xA;This code can be arbitrarily janky as long as it works.&#xA;&#xA;This is where the learning happens, so it gets to be hands-on and sloppy if that&#39;s what it takes.&#xA;&#xA;I&#39;ve started building it, but it&#39;s not working yet. I&#39;ll let you know how it goes once it&#39;s closing tickets!]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="http://natknight.xyz/tag:project" class="hashtag"><span>#</span><span class="p-category">project</span></a> <a href="http://natknight.xyz/tag:selfhosting" class="hashtag"><span>#</span><span class="p-category">selfhosting</span></a> <a href="http://natknight.xyz/tag:llms" class="hashtag"><span>#</span><span class="p-category">llms</span></a> <a href="http://natknight.xyz/tag:agents" class="hashtag"><span>#</span><span class="p-category">agents</span></a></p>

<p>One of the ways that folks are leveraging LLM-powered agents to do software development is the “software factory” (or <a href="https://www.danshapiro.com/blog/2026/01/the-five-levels-from-spicy-autocomplete-to-the-software-factory/">“software dark factory”</a>) pattern, where the LLMs write all the code and the humans aren&#39;t allowed to even <em>review</em> it.</p>

<p>Apparently this works, though you need a good way to verify your product. I&#39;m <a href="https://natknight.xyz/link-how-strongdms-ai-team-build-serious-software-without-even-looking-at-the">a little skeptical</a> that it&#39;s the best way to use these tools, but it&#39;s an interesting idea, so I&#39;m going to try to build one for myself.</p>



<h2 id="the-project" id="the-project">The Project</h2>

<p>I&#39;m cheating a little bit by picking a project that&#39;s embarrassingly easy to verify: a new interpreter for an extant programming language.</p>

<p>The programming language is called <a href="https://eyg.run">EYG</a> and has many interesting and desirable properties:</p>
<ul><li>functional style + a sound type system</li>
<li>immutable dependencies</li>
<li>deterministic execution</li>
<li>the editor tooling and compiler are independent of the runtime (so I don&#39;t have to implement them!)</li></ul>

<p>Its only annoying drawback is that its interpreter is in JavaScript (compiled from Gleam, but running on Node). I&#39;d really prefer a native interpreter, or better still, a Rust library that can execute EYG code.</p>

<p>Lucky for me, I have:</p>
<ul><li>access to LLMs that can cheaply churn out code, and</li>
<li>an “oracle” that can see if my project is working properly, i.e. the existing EYG interpreter.</li></ul>

<p>So that&#39;s the project: a Rust library + easily deployable binary that can interpret EYG code.</p>

<h2 id="the-rules" id="the-rules">The Rules</h2>

<p>The project will be split into two repos, each with different rules:</p>

<p><a href="https://github.com/nathanielknight/eyg-rs">eyg-rs</a> is the actual interpreter/library:</p>
<ul><li>I&#39;m <strong>not allowed to write or review code</strong> here. I can peek in occasionally for quality control, but that should be the exception.</li>
<li>The work needs to be mediated by an <strong>automated system</strong>, not me manually driving an agent.</li>
<li>The code needs to end up <strong>correct, efficient, and clean</strong>.</li>
<li>All agent-driven work must happen <strong>in a sandbox</strong> on my own hardware.</li></ul>

<p>I&#39;m trying to learn about the factory pattern, so I actually have to <em>build</em> one. I could almost certainly just point Claude Code at the EYG spec and have it converge on a working interpreter, but that wouldn&#39;t teach me anything about the system that&#39;s managing the work.</p>

<p>Keeping it sandboxed is a precaution against an agent hosing my home lab.</p>

<p>Figuring out how to get it clean and efficient is, of course, part of the challenge.</p>

<p><a href="https://github.com/nathanielknight/eyg-rs-factory">eyg-rs-factory</a> is the system that tracks work, manages the agent, and validates the final product:</p>
<ul><li>I can read and write code here, including using agents to do it for me.</li>
<li>I can use my tools in whatever mode gets the job done.</li>
<li>This code can be <strong>arbitrarily janky</strong> as long as it works.</li></ul>

<p>This is where the learning happens, so it gets to be hands-on and sloppy if that&#39;s what it takes.</p>

<p>I&#39;ve started building it, but it&#39;s not working yet. I&#39;ll let you know how it goes once it&#39;s closing tickets!</p>
]]></content:encoded>
      <guid>http://natknight.xyz/self-hosting-a-software-factory-part-1</guid>
      <pubDate>Fri, 16 Oct 2026 21:10:18 +0000</pubDate>
    </item>
    <item>
      <title>TIL: Fetching web pages with Claude Desktop</title>
      <link>http://natknight.xyz/til-extending-claude-desktop-with-model-context-protocol-plugins</link>
      <description>&lt;![CDATA[#til #llms #claude #modelcontextprotocol&#xA;&#xA;I was checking out the Model Context Protocol, a spec from Anthropic that lets you expose external programs to an LLM, and discovered that you can extend the Claude desktop app in this way. There are a bunch of enterprisey tools (and you can write your own, more interesting stuff), but out-of-the box you can enable URL-fetching, which lets you grab and process arbitrary information with Claude.&#xA;&#xA;!--more--&#xA;&#xA;To enable the plugin,&#xA;&#xA;Install the Claude desktop app.&#xA;Enable MCP under &#34;Settings&#34;   &#34;Developer&#34;   &#34;Edit Config&#34;&#xA;Add details about the MCP plugins you want in the indicated file.&#xA;&#xA;For fetch, you&#39;d add:&#xA;&#xA;{&#xA;  &#34;mcpServers&#34;: {&#xA;    &#34;fetch&#34;: {&#xA;      &#34;command&#34;: &#34;uvx&#34;,&#xA;        &#34;args&#34;: [&#xA;          &#34;mcp-server-fetch&#34;&#xA;        ]&#xA;    }&#xA;  }&#xA;}&#xA;&#xA;Anthropic has more docs on using MCP plugins from the desktop app, and a list of built-in plugins that you can set up with minimal effort.&#xA;&#xA;I think there are some exciting possibilities here! I don&#39;t think it should be too hard to give the model access to reference material, searchable history--basically retrieval augmented generation but for small, bespoke uses that wouldn&#39;t warrant the effort of custom-building an RAG system.&#xA;&#xA;Of course, you&#39;re sending all of that off to Anthropic, so it would be particularly_ interesting to find a system that can do this with a self-hosted LLM, where the privacy and power concerns aren&#39;t as severe.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="http://natknight.xyz/tag:til" class="hashtag"><span>#</span><span class="p-category">til</span></a> <a href="http://natknight.xyz/tag:llms" class="hashtag"><span>#</span><span class="p-category">llms</span></a> <a href="http://natknight.xyz/tag:claude" class="hashtag"><span>#</span><span class="p-category">claude</span></a> <a href="http://natknight.xyz/tag:modelcontextprotocol" class="hashtag"><span>#</span><span class="p-category">modelcontextprotocol</span></a></p>

<p>I was checking out the <a href="https://www.anthropic.com/news/model-context-protocol">Model Context Protocol</a>, a spec from Anthropic that lets you expose external programs to an LLM, and discovered that you can extend the <a href="https://claude.ai/download">Claude desktop app</a> in this way. There are a bunch of enterprisey tools (and you can write your own, more interesting stuff), but out-of-the box you can enable URL-fetching, which lets you grab and process arbitrary information with Claude.</p>



<p>To enable the plugin,</p>
<ol><li>Install the Claude desktop app.</li>
<li>Enable MCP under “Settings” &gt; “Developer” &gt; “Edit Config”</li>
<li>Add details about the MCP plugins you want in the indicated file.</li></ol>

<p>For <a href="https://github.com/modelcontextprotocol/servers/tree/main/src/fetch">fetch</a>, you&#39;d add:</p>

<pre><code class="language-json">{
  &#34;mcpServers&#34;: {
    &#34;fetch&#34;: {
      &#34;command&#34;: &#34;uvx&#34;,
        &#34;args&#34;: [
          &#34;mcp-server-fetch&#34;
        ]
    }
  }
}
</code></pre>

<p>Anthropic has <a href="https://modelcontextprotocol.io/quickstart/user">more docs</a> on using MCP plugins from the desktop app, and a list of <a href="https://github.com/modelcontextprotocol/servers/tree/main?tab=readme-ov-file#-reference-servers">built-in plugins</a> that you can set up with minimal effort.</p>

<p>I think there are some exciting possibilities here! I don&#39;t think it should be too hard to give the model access to reference material, searchable history—basically <a href="https://en.wikipedia.org/wiki/Retrieval-augmented_generation">retrieval augmented generation</a> but for small, bespoke uses that wouldn&#39;t warrant the effort of custom-building an RAG system.</p>

<p>Of course, you&#39;re sending all of that off to Anthropic, so it would be <em>particularly</em> interesting to find a system that can do this with a self-hosted LLM, where the privacy and power concerns aren&#39;t as severe.</p>
]]></content:encoded>
      <guid>http://natknight.xyz/til-extending-claude-desktop-with-model-context-protocol-plugins</guid>
      <pubDate>Fri, 14 Feb 2025 03:56:14 +0000</pubDate>
    </item>
  </channel>
</rss>