<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by John K. Johansen on Medium]]></title>
        <description><![CDATA[Stories by John K. Johansen on Medium]]></description>
        <link>https://medium.com/@johnkjohansen?source=rss-0f26fc68fc66------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*H_Z4gXHiFX5g72FRJCZO5A.jpeg</url>
            <title>Stories by John K. Johansen on Medium</title>
            <link>https://medium.com/@johnkjohansen?source=rss-0f26fc68fc66------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:08:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@johnkjohansen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Four Tiers of Agent Memory: What I Built Into Kaigents After Watching Agents Forget Everything]]></title>
            <link>https://medium.com/@johnkjohansen/four-tiers-of-agent-memory-what-i-built-into-kaigents-after-watching-agents-forget-everything-549679f75d90?source=rss-0f26fc68fc66------2</link>
            <guid isPermaLink="false">https://medium.com/p/549679f75d90</guid>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[ai-agent-software]]></category>
            <category><![CDATA[agentic-ai-architecture]]></category>
            <category><![CDATA[ai-agent-memory]]></category>
            <category><![CDATA[kaigents]]></category>
            <dc:creator><![CDATA[John K. Johansen]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 00:00:16 GMT</pubDate>
            <atom:updated>2026-08-01T02:38:00.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fBTAHeOCVaLArcQ5" /></figure><p>Back in February I wrote about why <a href="https://johnkjohansen.com/blog/ai-agent-memory-statelessness-failure.md">stateless agents fail at real work</a>. The thesis was simple: an agent that forgets everything when its session ends is just an expensive script. You wouldn’t hire an employee who lost all memory at 5 PM every day. Why would you deploy an AI agent that does the same thing?</p><p>At the time, Kaigents had a basic two-plane memory architecture: Temporal for task state, Qdrant for contextual retrieval. It was enough to prove the concept. But after six months of running agents in production on our <a href="https://johnkjohansen.com/blog/sovereign-stack-private-ai-kubernetes-amd.md">on-premise AMD K8s cluster</a>, I realized that “memory” is not one thing. It is at least four things, and they are as different from each other as your working memory is from your ability to learn from your mistakes.</p><p>So we built all four. The code is on <a href="https://github.com/jensjohansen/kaigents">GitHub</a>, and this article is a guided tour of what is there and why.</p><h3>Why “Add Memory” Is the Wrong Instruction</h3><p>The first instinct of most agent platforms is to bolt a vector database onto the side of an LLM and call it “memory.” This is roughly equivalent to handing someone a filing cabinet and calling it a brain. The filing cabinet is useful, but it is not what makes you intelligent.</p><p>Human memory is not a single system. Cognitive science has identified at least four distinct memory systems, each serving a different purpose, each with its own acquisition mechanism, retention profile, and failure mode:</p><ol><li><strong>Working memory</strong> — the active buffer where you hold information you are using right now. Small, fast, constantly overwritten.</li><li><strong>Episodic memory</strong> — your autobiographical record of what happened, when, and in what context. Consolidated from experience, recalled with effort.</li><li><strong>Epistemic memory</strong> — your belief system, including what you have learned is true, what you have learned is false, and the dependency chains between your beliefs. This is what lets you say “I tried that approach last time and it failed, so let me try something different.”</li><li><strong>Knowledge transfer</strong> — not a memory system per se, but the mechanism by which one person’s accumulated experience becomes another person’s starting point. Teaching, mentoring, writing things down.</li></ol><p>When you give an agent “a vector database,” you are giving it a crude approximation of episodic memory with none of the other three. The agent can retrieve similar past contexts, but it cannot hold a working buffer, it cannot distinguish hypothesis from outcome, and it cannot teach another agent what it learned.</p><p>Kaigents now has all four. Here is how each one maps to its human counterpart and how we built it.</p><h3>Tier 1: Short-Term Memory — The Working Buffer</h3><h3>The Human Analog</h3><p>Your working memory holds the handful of items you are actively manipulating right now. You are reading this sentence, and your working memory is holding the subject of the previous sentence so the pronoun “your” makes sense. It is small (roughly 4–7 items), fast, and constantly being overwritten as you shift attention.</p><p>When you are in a meeting and someone says “the supplier in Shenzhen quoted $3.20 per unit,” your working memory holds that fact for the duration of the conversation. You do not need to “search” for it — it is just there, available to your reasoning process in milliseconds.</p><h3>What We Built</h3><p>Kaigents’ short-term memory is the <strong>Live Case File</strong>. When an agent is working on a task, every piece of information that arrives during that work request — documents, messages, tool results, user corrections — is streamed into a <a href="https://qdrant.tech/">Qdrant</a> vector collection with LSM-style live upserts. The material is queryable within sub-seconds. No re-indexing, no batch job, no “wait while we process your input.”</p><p>The agent does not need to choose between “ingest this” and “reason about this.” It does both simultaneously. The ingestion path is an <a href="https://johnkjohansen.com/blog/mcp-enterprise-managed-authorization.md">MCP tool</a> ( memory.record), which means it goes through the same policy controls, allowlisting, and audit trail as every other tool call.</p><p>We also built a <strong>Context Manager</strong> that sits between the memory tiers and the model. Not every model has a 128K context window. Some of the most capable local models — the ones you can actually run on an <a href="https://johnkjohansen.com/blog/amd-ryzen-ai-npu-enterprise-chip.md">AMD Ryzen AI NPU</a> — have 4K or 8K windows. The Context Manager assembles a budget-fitted context from the available memory so the agent is effective regardless of which model it is running on. Think of this as your brain’s ability to focus on the relevant subset of your working memory rather than dumping everything you know into every thought.</p><h3>Where to Look in the Code</h3><p>The MemoryManager struct in <a href="https://github.com/jensjohansen/kaigents/blob/main/engine/crates/kaigents-memory/src/lib.rs">kaigents-memory/src/lib.rs</a> is the entry point. The record method handles short-term ingestion. The fit_to_budget function in kaigents-core/src/context_manager.rs handles context window management.</p><h3>Tier 2: Long-Term Memory — Consolidation and Recall</h3><h3>The Human Analog</h3><p>Episodic memory is your autobiographical record. You remember the meeting where the supplier quoted $3.20, but you do not remember every word of the conversation. Your brain consolidated the raw experience into a summary episode: “Met with Shenzhen supplier on Tuesday. They quoted $3.20/unit for 10K MOQ. Lead time 45 days.”</p><p>The consolidation process is not passive. Your brain actively reflects on experience, extracting lessons and discarding noise. This is why sleep matters — consolidation happens during sleep, and sleep deprivation degrades episodic memory formation.</p><p>When you start a new task, you do not replay every past experience. You recall relevant episodes — “the last time I negotiated with a Chinese supplier, starting at 40% below their quote worked well” — and use them as precedence.</p><h3>What We Built</h3><p>After each run, Kaigents triggers a <strong>consolidation</strong> step. The agent’s run timeline — every work attempt, every tool call, every result, every human correction — is fed to a local LLM (served via <a href="https://johnkjohansen.com/blog/model-serving-2-lemonade-server.md">Lemonade Server</a> on our AMD hardware) that extracts a summary episode. The episode is stored in RethinkDB with provenance back-links to the original work request.</p><p>When a future work request starts, the agent calls memory.recall - another MCP tool - to search both the vector store (semantic similarity) and the episode store (keyword filtering). The recalled episodes arrive with provenance: the agent can tell you <em>which</em> past work request produced this memory and <em>why</em> it is relevant.</p><p>The consolidation is not a dumb summary. The LLM is prompted to extract lessons — what worked, what didn’t, what was surprising — following the Reflexion pattern from the research literature: record episode, reflect into heuristics, retrieve on future tasks. The agent improves by reading its own past, not by retraining.</p><h3>Where to Look in the Code</h3><p>The consolidate_run_memory method in kaigents-memory/src/lib.rs handles episode extraction. The recall method handles cross-request retrieval. Episodes are stored in the memory_episodes table in RethinkDB. The full architecture is documented in <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/architecture/agent-memory-proposal.md">docs/architecture/agent-memory-proposal.md</a>.</p><h3>Tier 3: Epistemic Memory — Belief Revision and Retraction Cascades</h3><h3>The Human Analog</h3><p>This is the memory system that most agent platforms completely ignore, and it is the one that matters most for production quality.</p><p>Epistemic memory is your belief system. Not just what you know, but what you <em>believe to be true</em>, what you <em>believe to be false</em>, and the dependency chains between your beliefs. When you learn that a supplier’s quote was actually $4.50 (not $3.20 as you initially recorded), you don’t just update one fact. You re-evaluate every conclusion you drew from the $3.20 assumption: the margin calculation, the go/no-go decision, the competitive analysis.</p><p>This is called a <strong>retraction cascade</strong>. A falsified hypothesis invalidates every belief that depended on it. Your brain does this automatically — when you learn a foundational assumption was wrong, you feel the cognitive dominoes falling.</p><p>Humans also have the ability to deliberately re-verify a defeated belief. “I tried approach X and it failed, but that was three years ago — the landscape has changed. Let me try again, but this time informed by knowing why it failed last time.” This is not naive retry. It is informed re-verification that carries the failure history forward.</p><h3>What We Built</h3><p>This is the differentiator. We built a <strong>Belief Manager</strong> into the Kaigents engine that implements an assumption-based truth maintenance system (ATMS) — a concept from classical symbolic AI that is being rebuilt for LLM agents.</p><p>Every hypothesis the agent forms is a first-class record with:</p><ul><li>A <strong>confidence level</strong></li><li>An <strong>assumption set</strong> — the other hypotheses this belief depends on</li><li>A <strong>falsification condition</strong> — what would prove it wrong</li><li>A <strong>status</strong>: pending, confirmed, or falsified</li></ul><p>When an outcome arrives (an experiment is closed), the hypothesis is marked confirmed or falsified. If falsified, a <strong>retraction cascade</strong> automatically invalidates every belief whose assumption set contained the falsified hypothesis. The cascade is recursive: if belief B depended on belief A, and belief C depended on belief B, then falsifying A invalidates both B and C.</p><p>Falsified hypotheses are not deleted. They are retained with a valid_to timestamp, so the agent can answer &quot;what did we used to believe and why was it wrong?&quot; This is critical for auditability - you want to know what your agent tried and why it stopped trying.</p><p>Re-verification is an explicit action ( experiment.reverify), not an automatic retry. When an agent wants to re-test a falsified approach, it must deliberately re-open the assumption context, and the failure history is carried forward so the re-test is informed by the original failure mode.</p><p>We also built a <strong>repeat-prevention quality gate</strong>. When an agent proposes an approach that a recalled, falsified hypothesis warns against, the Belief Manager surfaces it as a system message. The agent may proceed only by explicitly invoking re-verification — making the deliberate-reverification requirement auditable in the run timeline.</p><p>No major cloud provider offers this. The epistemic layer remains open-source-only, which is one of the strongest arguments for a sovereign build.</p><h3>Where to Look in the Code</h3><p>The BeliefManager is implemented in kaigents-memory/src/lib.rs. Key methods: record_belief, close_experiment (triggers retraction cascades), reverify_hypothesis, and validate_approach (the repeat-prevention gate). Hypotheses are stored in the memory_beliefs table in RethinkDB. The research basis is in <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/research/agent-context-and-memory-research.md">docs/research/agent-context-and-memory-research.md</a>, Section 5.</p><h3>Tier 4: Knowledge Propagation — Teaching Agents What Other Agents Learned</h3><h3>The Human Analog</h3><p>This is not a memory system in the cognitive science sense. It is the mechanism by which one person’s accumulated experience becomes another person’s starting point. Onboarding documents. Mentorship. Apprenticeship. The institutional knowledge that makes a senior engineer 10x more productive than a junior one, even when the junior one is smarter.</p><p>When a new engineer joins a team, they don’t start from scratch. They inherit the team’s playbooks, postmortems, and “things we tried that didn’t work” lists. This is knowledge transfer, and it is the difference between an organization that learns and an organization that repeats its mistakes with different people.</p><h3>What We Built</h3><p>We defined a <strong>.kgpkg package format</strong> - a tar.gz archive containing:</p><ul><li>manifest.json - metadata including the embedding model used, schema version, and package type</li><li>points.jsonl - Qdrant vector points (the semantic memory)</li><li>episodes.jsonl - consolidated episodes (the episodic memory)</li><li>beliefs.jsonl - hypotheses and their outcomes (the epistemic memory)</li></ul><p>An agent that has been working for months in one workspace can export its accumulated experience into a .kgpkg file. A new agent in a different workspace can import that file and start with the predecessor&#39;s knowledge - without re-ingesting the source material, without re-computing embeddings, without re-running consolidation.</p><p>The import process handles three hard problems:</p><ol><li><strong>Embedding model lock</strong>: We standardize on a single embedding model across all Kaigents workspaces. This eliminates the “vector space mismatch” problem — vectors produced by model A are meaningless to model B. The model ID is stored in the package manifest and validated on import.</li><li><strong>Cross-workspace deduplication</strong>: When importing, the system checks for duplicates. Qdrant points are compared by vector cosine similarity (threshold &gt;0.95). Episodes and beliefs are compared by exact text match in RethinkDB. Duplicates are skipped, and the import result includes skip counts so you know what was already there.</li><li><strong>Provenance preservation</strong>: Every imported memory carries origin_workspace_id and origin_package_id fields. The receiving agent knows this knowledge came from somewhere else, and a <strong>source priority ordering</strong> in the MemoryPolicy CRD lets you declare which sources take precedence when there are conflicts.</li></ol><p>Package-scoped retraction cascades ensure that if you remove an imported package, only the beliefs that came from that package are falsified — not beliefs from other packages that happened to share a dependency. This is the mechanical implementation of “uninstall this plugin without breaking the rest of the system.”</p><h3>Where to Look in the Code</h3><p>The export_memory and import_memory methods in kaigents-memory/src/lib.rs handle the package format. The remove_package method handles package-scoped retraction. The CLI commands kaigents-cli memory export and kaigents-cli memory import are wired in kaigents-cli/src/main.rs. The research basis, including 11 challenges and their dispositions, is in <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/research/knowledge-propagation-research.md">docs/research/knowledge-propagation-research.md</a>.</p><h3>How It All Fits Together</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*TzBQF3QwMto76jC0capNOg.png" /></figure><p>The architecture is documented in detail in the <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/architecture/agent-memory-proposal.md">agent memory proposal</a>. The implementation tracker with acceptance criteria for each milestone is in the <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/implementation/kaigents-implementation-tracker.md">implementation tracker</a>.</p><h3>What We Did Not Build (Yet)</h3><p>Honesty matters more than marketing. Three things from the original design are intentionally deferred:</p><ol><li><strong>NebulaGraph temporal graph layer</strong>: The design calls for a bi-temporal knowledge graph with as-of queries and LLM-driven entity/edge extraction. We stubbed it. The current system uses RethinkDB filter queries instead of graph traversals for retraction cascades. This is sufficient for simple dependency chains but does not support multi-hop graph reasoning. Building this properly on NebulaGraph (the only commercial-safe graph backend) is a multi-quarter effort.</li><li><strong>Context Manager v2 (summarization/compression)</strong>: The current Context Manager uses a selection/truncation strategy — it picks the most relevant items and truncates to fit the model’s window. The design also calls for summarization (compress older context into a summary) and hierarchical demotion (core to recall to archival, the Letta/MemGPT pattern). These are not implemented. The truncation strategy is sufficient for current workloads but will need summarization for very long-running agents.</li><li><strong>Temporal-based consolidation</strong>: Consolidation currently runs in-process at the end of each run. The design calls for it to be a durable Temporal workflow that can be paused, resumed, and survive crashes. If the runner crashes during consolidation, the episode is lost. This is acceptable for the current PoC scope but must be hardened for production.</li></ol><p>These three deviations are documented in <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/architecture/agent-memory-proposal.md">Section 13 of the memory proposal</a>. I believe in documenting what you did not build as clearly as what you did.</p><h3>The Testing Story</h3><p>I have shipped enough software to know that “it compiles” is not the same as “it works.” The memory subsystem has:</p><ul><li><strong>22 unit tests</strong> in the core crate (context management, model serving, resource definitions)</li><li><strong>19 unit tests</strong> in the memory crate (record, search, consolidate, recall, belief management, export, import, dedup)</li><li><strong>3 integration tests</strong> that run against live infrastructure — a real Qdrant instance, a real RethinkDB cluster, and a real Lemonade Server serving gpt-oss-20b and nomic-embed-text on our AMD hardware</li></ul><p>The integration tests verify the full M9-M12 flow end-to-end: record memories, search them, consolidate into episodes, recall with provenance, record beliefs, close experiments with retraction cascades, validate approaches, export to .kgpkg, import into a new workspace, and confirm deduplication works. They also verify 3-level retraction cascades and package-scoped retraction in isolation.</p><p>All 44 tests pass. Both the default and RethinkDB feature builds compile with zero warnings.</p><h3>Why This Matters</h3><p>I have been building software for 40 years. The pattern is always the same: the first version of any system is stateless and simple. It works for demos. Then you try to use it in production, and you discover that statelessness is a feature for web servers and a fatal flaw for anything that needs to learn.</p><p>The agent platforms that will survive the next two years are the ones that solve memory properly. Not “we have a vector database” memory. Real memory — working buffers, episodic consolidation, belief revision with retraction cascades, and knowledge transfer between agents.</p><p>The <a href="https://github.com/jensjohansen/kaigents">Kaigents memory subsystem</a> is MIT-licensed and running on our cluster today. The code is not a demo. It is not a wrapper around someone else’s API. It is a from-scratch implementation of four memory tiers in Rust, backed by Qdrant and RethinkDB, designed for <a href="https://johnkjohansen.com/blog/sovereign-stack-private-ai-kubernetes-amd.md">sovereign on-premise deployment</a> on AMD hardware.</p><p>If you are serious about agent memory — if you want to understand how retraction cascades work, how the .kgpkg format is structured, or how the Context Manager fits a 4K context window - go read the code. Start with <a href="https://github.com/jensjohansen/kaigents/blob/main/start_here.md">start_here.md</a>, then read the <a href="https://github.com/jensjohansen/kaigents/blob/main/docs/architecture/agent-memory-proposal.md">memory proposal</a>, then read <a href="https://github.com/jensjohansen/kaigents/blob/main/engine/crates/kaigents-memory/src/lib.rs">kaigents-memory/src/lib.rs</a>.</p><p>The repository is at <a href="https://github.com/jensjohansen/kaigents">github.com/jensjohansen/kaigents</a>. Clone it. Read it. Break it. Send me a pull request.</p><p><em>John K. Johansen is the creator of Kaigents and a strategist for AI-driven business transformation. He has been building systems that remember for four decades — the first 35 years with human teams, the last 5 with AI agents.</em></p><p><em>Originally published at </em><a href="https://johnkjohansen.com/blog/kaigents-memory-four-tiers-agent-intelligence"><em>https://johnkjohansen.com</em></a><em> on August 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549679f75d90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agent Computers: Why Your Next Laptop Is a Local AI Department]]></title>
            <link>https://medium.com/@johnkjohansen/agent-computers-why-your-next-laptop-is-a-local-ai-department-bfbf1757156d?source=rss-0f26fc68fc66------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfbf1757156d</guid>
            <category><![CDATA[amd-ryzen]]></category>
            <category><![CDATA[agentic-workstation]]></category>
            <category><![CDATA[ai-sovereignty]]></category>
            <category><![CDATA[intel-core-ultra]]></category>
            <category><![CDATA[ai-workstation]]></category>
            <dc:creator><![CDATA[John K. Johansen]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 00:00:58 GMT</pubDate>
            <atom:updated>2026-07-26T00:39:12.406Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0xn1N4X95aMMJpG6" /></figure><p>For thirty years, the word “laptop” has meant roughly the same thing: a portable computer that runs the software you point it at, one task at a time, waiting for your input. That definition is now wrong for a growing class of hardware, and the industry has not caught up with vocabulary that reflects it.</p><p>What is arriving on desks and in bags right now is not a faster laptop. It is a machine that can run multiple autonomous AI agents concurrently, persistently, and entirely offline — agents that plan, retrieve, execute tool calls, and hand work off to each other without a round trip to a cloud API. Call it what it is: an <strong>agent computer</strong>. And the silicon making this possible — AMD’s Ryzen AI Max and Ryzen AI Embedded X100/X199 series, alongside Intel’s Core Ultra with its own AI acceleration path — is the actual story, even though most coverage is still talking about “AI PCs” as if they are laptops with a chatbot bolted on.</p><h3>The Shift Nobody Named Correctly</h3><p>“AI PC” was always a marketing category, not an architectural one. It described a machine with an NPU present, not a machine capable of doing anything qualitatively different from what came before. An agent computer is a different claim: it is a device where the memory capacity, the memory bandwidth, and the heterogeneous compute (CPU + GPU + NPU) are sized specifically for running large language models as <strong>standing infrastructure</strong>, not as an occasional cloud API replacement.</p><p>The distinction matters because agentic workflows are not single-shot inference. A multi-agent system running locally might have a planning agent, a retrieval agent, a code-execution agent, and a critique agent all resident in memory, each potentially backed by a different model size or specialization, all expected to respond in the seconds-not-minutes range a human collaborator would tolerate. That is a fundamentally different workload profile than “type a prompt, wait for a paragraph.” It looks more like running a small department than running an app.</p><h3>The Memory Wall Just Moved</h3><p>The single biggest constraint on local LLM inference has never really been raw compute — it has been memory capacity and bandwidth. A 70B parameter model needs on the order of 140GB at FP16, or something in the 35–40GB range aggressively quantized. A 300B+ parameter model, the range where genuinely capable reasoning and coding performance starts to show up even in open-weight releases, pushes past what any consumer discrete GPU has ever offered, let alone a laptop.</p><p><strong>AMD’s Ryzen AI Max</strong> and the newer <strong>Ryzen AI Embedded X100/X199</strong> series attack this problem directly with unified memory architecture, configurable up to <strong>192GB</strong>, shared coherently between the CPU, the RDNA integrated GPU, and the XDNA 2 NPU. That is not a typo relative to what discrete GPU buyers are used to — a single high-end discrete card tops out well below that figure, and stacking multiple cards to get there means a workstation chassis, a server-grade power supply, and a very different capital outlay than a device you close and put in a bag.</p><p>What 192GB of unified memory actually buys you is the ability to load a 300B+ parameter model, quantized to a reasonable bit depth, entirely in memory with headroom left for KV cache growth across a long agentic context window — the kind of context window multi-step tool-calling workflows chew through quickly. This is the architectural unlock that makes “agent computer” a meaningful category rather than a rebrand: the model does not have to be small enough to fit a phone, and it does not have to phone home to a datacenter to be capable.</p><h3>Performance at the Edge: Where Zen 5 and XDNA 2 Actually Win</h3><p>Memory capacity gets you in the door. Token generation speed determines whether the experience is usable. This is where AMD’s current-generation combination of <strong>Zen 5</strong> CPU cores and the <strong>XDNA 2</strong> NPU has been posting a real, measurable advantage over Intel’s Core Ultra parts in local inference benchmarks — specifically in llama.cpp and Vulkan-backed inference paths, which is where most of the open-source local-AI ecosystem (Ollama, LM Studio, and the broader GGUF-model tooling) actually runs today.</p><p>The reason is not mysterious. XDNA 2 was designed with a substantially higher INT8/BF16 throughput ceiling than the NPU blocks in prior Ryzen AI generations, and Zen 5’s wider vector units and improved memory controller give the CPU-side fallback path — which matters whenever an inference framework has not yet been optimized to route through the NPU — meaningfully better throughput than Intel’s current Lunar Lake and Arrow Lake-based Core Ultra parts on the same workload. In practical terms, this shows up as faster tokens-per-second in decode, which is the phase agentic workflows spend the most wall-clock time in, since it scales with response length rather than prompt length.</p><p>This is a genuine, benchmarkable edge today. It is worth stating plainly rather than hedging it into vagueness: if your priority is local token generation speed on the Vulkan/llama.cpp stack right now, AMD’s current silicon is ahead.</p><h3>Intel’s Different Bet: Open, Heterogeneous, Multi-Vendor</h3><p>Intel is not chasing AMD’s unified-memory-capacity number, and it would be a mistake to read that as Intel losing the race rather than declining to run it. Intel’s Core Ultra strategy centers on a <strong>prefill/decode split across heterogeneous accelerators</strong> — using the NPU for the compute-bound prefill phase and the integrated GPU (or a discrete Arc GPU, or in datacenter contexts, a completely separate accelerator) for the memory-bandwidth-bound decode phase — built explicitly on open standards (OpenVINO, ONNX Runtime) rather than a single-vendor stack.</p><p>The bet here is architectural flexibility over raw local capacity: Intel’s approach is designed to scale from a laptop NPU up through datacenter-class heterogeneous infrastructure using the same software abstraction layer, and to let the prefill and decode stages be served by different hardware — potentially different vendors’ hardware — without rewriting the inference pipeline. For an enterprise that wants a coherent AI infrastructure story from edge to datacenter, rather than a single very capable laptop, that is a real and defensible strategy. It optimizes for portability of the software stack rather than for maximizing what fits under one chassis lid.</p><h3>What This Means If You Are Choosing Hardware Now</h3><p>If your requirement is running the largest possible local models — 300B+ parameter class, multi-agent, entirely offline, no cloud dependency — the unified memory capacity on AMD’s Ryzen AI Max and Ryzen AI Embedded X100/X199 platforms is currently unmatched in the mobile/workstation category, and the Zen 5 + XDNA 2 combination gives you real throughput advantages on the tooling most local-AI practitioners already use.</p><p>If your requirement is building infrastructure that spans laptop to datacenter with a consistent, vendor-neutral software stack, and you are willing to trade some raw local memory ceiling for architectural openness, Intel’s heterogeneous prefill/decode approach is the more coherent long-term bet.</p><p>Either way, the underlying claim is the same: the device on your desk is no longer just running software. It is capable of running a standing team of agents, persistently, locally, at parameter counts that would have required a rack of GPUs two years ago. The vocabulary will catch up eventually. The hardware already has.</p><p><em>Originally published at </em><a href="https://johnkjohansen.com/blog/agent-computers-local-ai-department"><em>https://johnkjohansen.com</em></a><em> on July 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfbf1757156d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anthropic Just Committed $200 Billion to Google Cloud. Here Is Why That Should Concern You.]]></title>
            <link>https://medium.com/@johnkjohansen/anthropic-just-committed-200-billion-to-google-cloud-here-is-why-that-should-concern-you-c9f937e4c4f7?source=rss-0f26fc68fc66------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9f937e4c4f7</guid>
            <category><![CDATA[ai-strategy]]></category>
            <category><![CDATA[vendor-lock-in]]></category>
            <category><![CDATA[enterprise-ai]]></category>
            <category><![CDATA[cloud-infrastructure]]></category>
            <category><![CDATA[sovereign-ai]]></category>
            <dc:creator><![CDATA[John K. Johansen]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 00:00:54 GMT</pubDate>
            <atom:updated>2026-07-17T20:37:39.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jAon4JlKQ5QX_YZI" /></figure><p>The $200 billion number is designed to be impressive, and it succeeds. A five-year commitment to Google Cloud’s TPU infrastructure is one of the largest infrastructure deals in the history of enterprise technology. But strip away the zeroes and look at the structure: Anthropic, the company that a significant portion of enterprise AI strategy is built around, has committed its inference infrastructure future to a single hyperscaler for the next five years.</p><p>That is not a strategic partnership. That is a dependency. And if your AI strategy depends on Claude, it is your dependency too — whether or not you were party to the negotiation.</p><p>I want to be clear about what this article is and is not. It is not an argument against Claude. Claude is an excellent model with genuine capabilities in reasoning and safety-aware response generation. The argument I am making is about what you need to understand when you build an AI strategy on top of an API whose cost structure is now determined by a $200 billion infrastructure commitment you had no part in making.</p><h3>The Dual Hyperscaler Position That Is Not What It Looks Like</h3><p>The same week as the Google commitment, Anthropic announced that Claude is now generally available in Microsoft Azure, running on NVIDIA GB300 Blackwell Ultra infrastructure. The instinct is to read this as distribution diversity — Anthropic is available through both Google and Microsoft, so no single hyperscaler dependency.</p><p>This reading is wrong, and the distinction matters.</p><p><strong>The Google commitment is compute infrastructure.</strong> The $200 billion buys Anthropic access to Google’s TPU capacity — the silicon that actually runs the model training and inference workloads. This is the foundation. Anthropic’s ability to train the next generation of Claude models, its ability to serve inference at scale, and its marginal cost per API token are all downstream of this commitment.</p><p><strong>The Azure availability is distribution.</strong> Claude on Azure is served through Anthropic’s API, which runs on Anthropic’s infrastructure, which is Google TPUs. Azure is a purchasing channel for enterprise customers who want to use Azure billing and Azure’s managed AI platform. It does not represent a second compute dependency. If Google’s TPU pricing, availability, or roadmap changes, Anthropic’s cost structure changes — and that cost structure is the same regardless of whether the customer is buying Claude through Google’s API or Microsoft’s Foundry.</p><p>The one-line summary: Anthropic has two distribution channels and one compute dependency. Two distribution channels is good for Anthropic’s market reach. One compute dependency is a structural risk for any enterprise whose AI strategy depends on Claude’s price stability and availability.</p><h3>Vendor Lock-In at One Remove</h3><p>Most enterprise conversations about AI vendor lock-in focus on the application layer. “Can we switch from Claude to GPT-5 if we need to?” That is a real question, and it is worth having a plan for. But it is the second-order problem.</p><p>The first-order problem is infrastructure lock-in at the provider level — what I call vendor lock-in at one remove.</p><p>When your AI vendor commits its compute infrastructure to a single hyperscaler, you inherit that infrastructure dependency through the API. You do not control it. You did not negotiate it. You cannot opt out of it without switching your AI vendor entirely. And you will not find out it matters until something changes.</p><p>What could change? Google could adjust TPU pricing as the infrastructure investment amortizes. Anthropic could renegotiate the terms in year three. Google’s TPU roadmap could diverge from the requirements of the Claude model family in ways that create training or inference constraints. Geopolitical or regulatory changes could affect Google’s cloud infrastructure in geographies where your enterprise operates. None of these are predictions. They are the category of events that a $200B, five-year infrastructure commitment makes possible — events whose consequences reach Anthropic’s API before they reach your awareness.</p><h3>The Sovereign Inference Alternative, Made Specific</h3><p>I have been writing about sovereign inference since early 2025. The argument has always been about avoiding this exact dependency structure — not abstractly, but concretely.</p><p>When you run open-weight models on hardware you control, your inference cost structure consists of three components: hardware depreciation, electricity, and operational staff time. Hardware depreciation amortizes over the useful life of the hardware. Electricity costs are driven by your local utility and your hardware’s power efficiency. Operational staff time is a function of how well your infrastructure is designed and automated. None of these components is subject to a five-year contract renegotiation by a third party. None of them changes because Google’s TPU pricing model shifted.</p><p>The open-weight models that are competitive with Claude for a significant range of tasks — Qwen3, GPT-OSS 20B, the Llama family — are available today. They run on AMD or NVIDIA hardware in a standard Kubernetes cluster. The inference quality gap between these models and Claude for many enterprise use cases is smaller than it was two years ago, and it is continuing to narrow.</p><p>I am not arguing that every Claude use case can be replaced by an open-weight model today. For some tasks — complex reasoning, nuanced judgment calls, safety-critical response generation — Claude’s specific capabilities remain differentiated. For those tasks, Claude’s API may continue to be the right choice even with the infrastructure dependency it carries.</p><p>The question worth asking is: what fraction of your Claude API usage actually requires Claude’s differentiating capabilities, versus what fraction is using Claude as a capable-enough general-purpose model for tasks that open-weight alternatives can handle? Knowing that ratio is the beginning of a real AI resilience strategy.</p><h3>The Practical Risk Management Framework</h3><p>I am not suggesting that enterprises abandon Claude. I am suggesting that enterprises understand what they have built their AI strategy on, and make active choices about the risk they are accepting.</p><p><strong>Audit your Claude dependencies.</strong> For each application, workflow, or agent that uses Claude, understand: what specific capability does Claude provide that drives this choice? Is it reasoning quality? Context length? Safety constraints? Response style? Specificity of instruction-following? The answer determines how substitutable this use case is.</p><p><strong>Identify the substitutable tier.</strong> Some fraction of Claude usage is general-purpose — document summarization, code completion, data extraction, structured generation. For these tasks, open-weight alternatives are typically competitive. Identify this tier and develop a sovereign inference capability that can serve it. This reduces your dependency without requiring you to abandon Claude for the tasks where it is genuinely differentiated.</p><p><strong>Model the cost scenario.</strong> What would a 20% increase in Anthropic’s API pricing do to the economics of each Claude-dependent application? If the answer is “it would break the business model,” you have a concentration risk that is worth mitigating now, before the price changes. If the answer is “it would be irritating but manageable,” your risk tolerance may be reasonable.</p><p>The $200 billion commitment is not a reason to panic. It is a reason to understand the dependency you have and make a considered choice about how much of your AI strategy to concentrate there.</p><p>That is what risk management looks like.</p><p><em>Originally published at </em><a href="https://johnkjohansen.com/blog/anthropic-google-200b-commitment"><em>https://johnkjohansen.com</em></a><em> on July 4, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9f937e4c4f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Run AI Agents on Kubernetes (And Why “One Linux Machine Per Agent” Is Solving the Wrong…]]></title>
            <link>https://medium.com/@johnkjohansen/why-i-run-ai-agents-on-kubernetes-and-why-one-linux-machine-per-agent-is-solving-the-wrong-8e859cde7273?source=rss-0f26fc68fc66------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e859cde7273</guid>
            <category><![CDATA[aiops]]></category>
            <category><![CDATA[ai-governance]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[ai-execution]]></category>
            <dc:creator><![CDATA[John K. Johansen]]></dc:creator>
            <pubDate>Sat, 20 Jun 2026 00:00:10 GMT</pubDate>
            <atom:updated>2026-06-20T16:21:39.725Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why I Run AI Agents on Kubernetes (And Why “One Linux Machine Per Agent” Is Solving the Wrong Problem)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0Y_NihqRa3Aa8gDi" /></figure><p>A few weeks ago I had a conversation with a founder building an agent execution platform. His architecture: one Linux machine per agent, using Incus system containers for isolation. His argument against Kubernetes was direct — K8s is designed for stateless, short-lived workloads, and AI agents are stateful, long-running, and sensitive to noisy neighbors. The right answer, in his view, was to give each agent its own OS-level isolation from the start.</p><p>It is a coherent argument. The concerns it addresses are real. And I think it is solving the wrong problem with an expensive tool.</p><p>I have been running AI agents on Kubernetes in production since early 2025. I built Kaigents — a K8s-native AI agent substrate — specifically to address the stateful, long-running, governance-heavy requirements of production agent teams. Here is how I think about the tradeoffs, and why I believe the VM-per-agent approach trades one set of problems for a harder one.</p><h3>The Legitimate Concerns</h3><p>Let me start where the VM-per-agent advocates are right, because they are not wrong about the problems — they are wrong about the solution.</p><p><strong>Noisy neighbors are real.</strong> An agent doing heavy computation or memory-intensive context loading can affect other pods on the same node. Kubernetes provides resource limits (CPU, memory, storage), but a pod that stays within its declared limits can still create cache pressure, NUMA contention, and kernel-level resource conflicts with its neighbors. On shared nodes, isolation is not absolute.</p><p><strong>Stateful, long-running workloads require different thinking.</strong> A web server pod can be killed and replaced in seconds with no consequence. An agent pod that has been building context for 40 minutes, holding conversation history, maintaining a working memory of a complex project — killing that pod and restarting it is not a zero-cost operation. The consequences of eviction are different in kind, not just in degree.</p><p><strong>Blast radius matters.</strong> If an agent is compromised or behaves unexpectedly, the question of what it can affect is not trivial. In a shared K8s cluster without rigorous network policy and RBAC, an agent with a compromised credential can potentially reach workloads it should never touch.</p><p>These concerns are real. Any honest K8s-native agent architecture has to address them. The question is whether the right response is OS-level isolation per agent, or K8s-native solutions to each concern.</p><h3>Why Durable Execution Is the State Management Answer</h3><p>The most common objection to K8s for agent workloads is the statefulness problem. The response I hear is: “K8s is designed for stateless pods. Agents are not stateless.”</p><p>This objection conflates two separate concerns: where state lives and how long a compute unit runs.</p><p>Kubernetes is perfectly capable of running long-lived processes. Stateful applications — databases, message queues, search engines — run in Kubernetes all the time. The concern is not longevity; it is state persistence across failures. And Kubernetes does not solve state persistence — it was never designed to. That is not a K8s limitation; it is a correct division of responsibility.</p><p>The answer is <strong>Temporal</strong> (or equivalent durable execution engines). Temporal persists every step of every workflow to durable storage as it executes. When an agent pod is evicted, rescheduled, or killed due to a node failure, the workflow state is intact in Temporal’s database. The new pod picks up exactly where the previous one left off. From the agent workflow’s perspective, the pod eviction did not happen.</p><p>This is not a workaround. This is the correct architecture. The agent’s state belongs in a durable store, not in the memory of a running process. An agent that keeps its state in memory is one hardware failure away from losing it, whether it runs in a K8s pod or a dedicated VM. Temporal solves the actual problem: state durability across arbitrary failures.</p><p>The VM-per-agent approach does not solve this problem. It avoids the eviction scenario by making eviction less likely (a dedicated VM is less likely to be preempted), but it does not make state durable. If the VM fails, the agent state is still lost. The problem is deferred, not solved.</p><h3>Why K8s Network Policy Is the Blast Radius Answer</h3><p>The blast radius concern — what an agent can affect if it behaves unexpectedly — is real. The K8s answer is network policy, combined with RBAC and namespace isolation.</p><p>In a well-configured K8s cluster, each agent persona (or class of agents) runs in a dedicated namespace with:</p><ul><li><strong>Network policies</strong> that explicitly define which services the agent can reach. An agent persona that needs access to a CRM API and a vector database gets a network policy that permits exactly those destinations and denies everything else by default.</li><li><strong>RBAC</strong> that limits what Kubernetes APIs the agent’s service account can call.</li><li><strong>Resource quotas</strong> that bound the agent’s compute and memory consumption at the namespace level, preventing runaway resource usage from affecting cluster-wide stability.</li></ul><p>This is not absolute isolation. But for most threat models, it is sufficient, and it is far cheaper to operate than a VM per agent.</p><p>The VM-per-agent model provides stronger isolation — OS-level boundary, separate kernel, separate network stack. If your threat model requires that level of isolation (you are running agents that execute untrusted user-provided code, for example), the cost may be justified. But for the vast majority of enterprise agent use cases — agents that call APIs, read databases, generate text, run structured workflows — namespace-level K8s isolation with strict network policies is the right level of protection at a fraction of the infrastructure cost.</p><h3>The TCO Argument That Will Surface in Every Investor Conversation</h3><p>Here is the number that concerns me most about the VM-per-agent architecture: <strong>cost per concurrent agent</strong>.</p><p>A system container (Incus LXD) is lighter than a full VM but heavier than a K8s pod. A system container requires its own kernel namespace, its own init system, its own network stack. The memory overhead per container is measured in hundreds of megabytes to gigabytes depending on what runs inside it. If you are targeting 1,000 concurrent agents, you are carrying gigabytes of overhead just for isolation infrastructure that adds no value to the agent’s actual work.</p><p>A K8s pod, by contrast, shares the host kernel and the node’s namespace infrastructure. The per-pod overhead is measured in megabytes. At 1,000 concurrent agents, the K8s overhead is an order of magnitude lower.</p><p>The difference does not matter when you are running 10 agents. It matters enormously when you are trying to operate a platform at scale. And the investor question — “what does it cost to serve 10,000 concurrent agents?” — has a very different answer depending on which architecture you chose.</p><p>At pre-seed, infrastructure cost seems abstract. At Series A, when you are trying to demonstrate unit economics, the per-agent cost of your isolation model becomes a real number in a deck that is being scrutinized by people who have seen a lot of infrastructure cost structures.</p><p>The VM-per-agent answer to the TCO question requires one of the following:</p><ol><li>Agent sessions are infrequent and short, so the per-container overhead amortizes well.</li><li>The security requirements genuinely demand OS-level isolation and the cost is justified.</li><li>You accept that the architecture will need to change as you scale.</li></ol><p>None of these are inherently wrong. But they need to be explicit decisions, not defaults.</p><h3>What Kaigents Actually Does</h3><p>Kaigents runs on Kubernetes. Each agent persona is defined in a Kubernetes Custom Resource (CRD). Temporal handles durable execution — every workflow step is persisted, every failure is recoverable, every state transition is auditable.</p><p>Agent personas run in dedicated namespaces. Network policies are generated from the persona spec: this persona can reach these MCP tool endpoints, this database, this API, and nothing else. RBAC is bounded to the service account for that persona. Resource limits are set from the persona spec.</p><p>When an agent is running a complex task and the underlying node fails, Temporal detects the workflow worker is gone, waits for a new worker to register in the rescheduled pod, and resumes execution from the last persisted checkpoint. The agent’s task continues. The node failure is an infrastructure event, not a data loss event.</p><p>The governance layer — what KaiManager provides on top of this — audits every tool call, enforces quality gates on outputs, and provides the escalation paths that production agent governance requires. These concerns sit above the infrastructure layer; they are workflow and policy concerns, not isolation concerns.</p><h3>The Right Question Is Not “K8s or VMs”</h3><p>The right question is: what does your threat model actually require?</p><p>If you are building a general-purpose code execution sandbox where arbitrary user-provided code runs inside the agent, OS-level isolation is appropriate. The security requirements are genuine.</p><p>If you are building an enterprise AI agent platform where agents call structured APIs, read governed data sources, and produce outputs reviewed by humans — K8s namespace isolation with network policies, RBAC, and Temporal-backed durable execution is the right architecture. It is cheaper, more operationally mature (K8s has a decade of production tooling behind it), and scales without the linear cost growth of per-agent system containers.</p><p>The “one Linux machine per agent” instinct comes from a reasonable place: a desire to make isolation simple and absolute. I understand the appeal. But simple and absolute isolation is expensive, and the problems it is solving — statefulness, blast radius — have K8s-native answers that are cheaper and scale better.</p><p>Build for your actual threat model. Instrument everything. Use Temporal for state durability, not VM persistence. Let Kubernetes do what it is genuinely excellent at.</p><p>The architecture that can serve 10 agents well is not necessarily the one that can serve 10,000 agents profitably. That is worth thinking about before the investor asks.</p><p><em>Originally published at </em><a href="https://johnkjohansen.com/blog/k8s-native-agents-vs-vm-per-agent"><em>https://johnkjohansen.com</em></a><em> on June 20, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e859cde7273" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Sovereign Stack: Part 2 — The Practical Private Cloud]]></title>
            <link>https://medium.com/@johnkjohansen/the-sovereign-stack-part-2-the-practical-private-cloud-f555ea8369d8?source=rss-0f26fc68fc66------2</link>
            <guid isPermaLink="false">https://medium.com/p/f555ea8369d8</guid>
            <category><![CDATA[sovereign-ai]]></category>
            <category><![CDATA[data-sovereignty]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cost-optimization]]></category>
            <dc:creator><![CDATA[John K. Johansen]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 00:00:24 GMT</pubDate>
            <atom:updated>2026-06-16T17:42:18.001Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t8CfpYj461CMBMi4" /></figure><p>In <a href="https://johnkjohansen.com/blog/sovereign-stack-private-ai-kubernetes-amd">Part 1 of this series</a>, we defined the “Sovereign Stack” through the lens of extreme efficiency: AMD NPUs and on-premise hardware. It is the ultimate destination for those who can manage their own silicon. We explored an architecture that delivers the gold standard for privacy, power efficiency, and long-term TCO.</p><p>But Article 1 presented the destination. This article is about the journey.</p><p>Let’s be honest: most entrepreneurs aren’t looking to become hardware engineers. The modern DevOps landscape has shifted so far toward software-defined infrastructure that managing physical nodes, cooling, and power is often a non-starter for a scaling business. If your infrastructure depends on your personal ability to fix a mini-PC, your business cannot scale.</p><p>This article is the practical alternative. We are going to build the <strong>Sovereign Stack in the Cloud</strong>.</p><p>We are letting go of NPU-specific optimizations-which remain largely unavailable in server-grade hardware and unsupported by core tools like vLLM or Ollama. Instead, we are focusing on the <strong>GPU-enabled Private Cloud</strong>: a strategy that delivers 100% data sovereignty and predictable fixed costs, without the hyperscaler lock-in or the on-premise hardware liability.</p><h3>The Founding Premise: Your Data Is the Moat, Not the Models</h3><p>Before we talk about GPUs, we must align on the business objective.</p><p>Open-source LLMs (Llama, Qwen, Mistral) are effectively commodities. In the next 18 months, “intelligence” will be free. What differentiates your AI department from a generic wrapper app is your <strong>proprietary corpus</strong>: your unique embeddings, your RAG indexes, and the institutional knowledge encoded in your data lake.</p><p><strong>Every technical decision that follows is about protecting that data.</strong> If your agents are sending your proprietary context to a SaaS API for every query, you aren’t building a moat; you’re leaking your “secret sauce” into your landlord’s training set. By building a private cloud on Kubernetes, we ensure that your knowledge base never leaves a cluster that you own and control. You aren’t just running a model; you are securing the company’s memory.</p><h3>Part 1: The ROI of Sovereignty (Ownership vs. Rent)</h3><p>For a serial engineer or a founder, seed capital is your most precious resource. The temptation is to “move fast” by building on OpenAI’s API. But for an AI-native company, tokens are not just a utility-they are your <strong>cost of goods sold (COGS).</strong></p><p>If you spend $1,500/month on OpenAI tokens, you own nothing at the end of the month. You are a tenant. If you spend $1,500/month on a dedicated Sovereign Cluster, you have built an <strong>infrastructure asset.</strong> You have 24/7 unlimited access to your own inference engine, a growing data lake, and a predictable monthly burn that stays flat even as your token volume explodes.</p><h3>The “Prototype Trap”</h3><p>The most expensive mistake you can make is building your prototype on a proprietary model and planning to “move to local LLMs later.”</p><p><strong>Why?</strong> Because AI logic is brittle. A model’s “intelligence” is inextricably linked to how you chunk your data, how you write your prompts, and how your rerankers are tuned. If you build your entire RAG pipeline around GPT-4o, moving to a local Llama 3 instance later won’t just be a “swap”-it will be a <strong>complete re-engineering</strong> of your AI logic. You will find that the model in production interprets your chunking strategy differently than the model you used in dev, leading to “hallucination drift” that can take months to debug.</p><p><strong>The guideline for engineers</strong>: Build on your sovereign stack from Day Zero. It’s better to have a slightly less “magical” prototype that you actually own and understand, than a brilliant one you can’t afford to scale.</p><h3>Part 2: The Architecture of Density (Why Nodes Matter)</h3><p>When engineers start building AI clusters, they often ask: “Can’t I just run this on one giant GPU server?”</p><p>The answer is <strong>no</strong>, and the reason has nothing to do with CPU. In a Sovereign Stack, your real constraints are <strong>Memory Density</strong> and <strong>Storage Throughput.</strong></p><h3>2.1 Memory is the Primary Constraint</h3><p>AI workloads are memory-hungry. Not just the VRAM on your GPU for inference, but the system RAM required to keep your vector database (Qdrant), your secret store (Vault), and your workflow engine (Temporal) responsive. If your nodes are starved for memory, your agents will experience “latency spikes” that look like model hallucinations but are actually just system thrashing. To run a production team of AI agents, you need memory density across multiple nodes to ensure no single service starves the others.</p><h3>2.2 The Data Lake Requires Distributed Density</h3><p>The second constraint is disk IOPS and storage resilience. If “the data lake is the AI,” then its storage cannot be a single point of failure.</p><p>We use <strong>Rook-Ceph</strong> to shard and replicate your data across the physical disks of every node in the cluster. For a “multi-write” environment-where dozens of agents are simultaneously researching, embedding, and updating your knowledge base-you need <strong>architectural density.</strong></p><h3>2.3 The “Bootstrap” Fallacy</h3><p>Many startups try to “bootstrap” with a single-node cluster. This is a trap. A single-node cluster is a <strong>liability</strong>, not an asset. If that node goes down, your AI department has amnesia. If your storage isn’t distributed, a single disk failure destroys your true business value-the re-embedded corpus.</p><p><strong>The Guideline</strong>: Start with a minimum of 5 nodes. Not because you need the CPU power, but because you need the <strong>distributed reliability</strong> to protect your data moat from day one.</p><h3>Part 3: The Portable Moat — Data Sovereignty Across Clouds</h3><p>If “the data lake is the AI,” then its location is your biggest point of vulnerability. When you build on a public cloud, you risk a new form of lock-in: <strong>Data Gravity.</strong></p><p>If your document corpus and vector indexes live in a proprietary managed service (like Pinecone or AWS S3), the friction of moving that data-the time, the egress costs, and the schema re-mapping-becomes so high that you are effectively a permanent tenant of that provider. To ensure true business continuity, we treat the data lake as a <strong>portable asset.</strong></p><h3>3.1 The S3-Compatible Abstraction (Rook-Ceph vs. MinIO)</h3><p>By running <strong>Rook-Ceph</strong> inside your Kubernetes cluster, you create an S3-compatible storage layer that you own. Your agents, embedding pipelines, and backup tools all speak the standard S3 protocol, but they are talking to <em>your</em> disks, not Amazon’s.</p><p><strong>An Honorable Mention for MinIO</strong>: If you only need object storage, <strong>MinIO</strong> is a fantastic, industry-standard choice. However, we prefer <strong>Rook-Ceph</strong> because it provides a <strong>unified storage substrate</strong>: Block storage (PV) for databases like Qdrant, Shared File Systems (Shared FS) for agent collaboration, and Object storage for the data lake. Moving providers means moving a single storage pool, not three different proprietary services.</p><h3>3.2 Treating Embeddings as Binary Assets</h3><p>The most common mistake is treating a RAG index as a “secondary” artifact that can just be recomputed.</p><p><strong>The Insight: Re-embedding is your Real RTO.</strong> Most IT departments define Disaster Recovery (DR) by how fast they can restore a disk. In AI, that is a dangerous delusion. If you lose your RAG index, your <strong>Recovery Time Objective (RTO)</strong> isn’t the 30 minutes it takes to restore a backup-it is the <strong>hundreds of GPU hours</strong> required to re-read and re-embed your entire document corpus. That is a massive unbudgeted expense and potentially weeks of downtime.</p><p><strong>The Strategy</strong>: We treat the <strong>Qdrant</strong> database files and the Rook-Ceph shards as binary assets. We use tools like <strong>Velero</strong> to take point-in-time snapshots of the entire storage volume and ship them to an independent, off-site object store (like Backblaze B2 or Wasabi). If your cloud provider disappears tomorrow, you don’t re-embed; you <strong>restore the binary state.</strong> You resume operations in hours, and you haven’t wasted a single dollar of re-compute capital.</p><h3>3.3 Connectivity &amp; Continuity: The Zero-Trust Perimeter</h3><p>In the cloud, networking is often your most expensive line item and your largest security liability. We use <strong>Cloudflare Tunnels</strong> as a superior alternative to the broad-access model of traditional VPNs.</p><ul><li><strong>Granular Attack Surface Reduction</strong>: A VPN typically grants broad access to a collection of resources, requiring complex rules to manage. Cloudflare Tunnels are surgical: each tunnel defines exactly one endpoint for one consumer. This “per-endpoint” isolation encourages the team to keep the attack surface very small.</li><li><strong>Security for AI Workloads</strong>: In a multi-agent system, this isolation is a mandate. It prevents an accidental rule-say, granting a developer access to a test reranker-from exposing production inference endpoints.</li><li><strong>The Secure Bootstrap</strong>: This granular security allows a startup to run both Dev and Prod infrastructure on the same <strong>Sovereign Bootstrap</strong> cluster securely, until revenue permits a physical split.</li><li><strong>The Economic Reality</strong>: By using two different low-cost providers (e.g., Database Mart and Hetzner) connected via these tunnels, you can achieve a multi-region, multi-zone, active-active architecture for <strong>less than two-thirds the cost</strong> of a single-zone, single-point-of-failure cluster in AWS. You aren’t just buying reliability; you are buying it at a massive discount compared to the “convenience” of a single hyperscaler region.</li></ul><h3>Part 4: Choosing Your Cloud Substrate</h3><p>The biggest challenge is selecting a provider that balances <strong>sovereignty</strong> with <strong>scalability</strong>. To help you decide, we categorize the market into three tiers based on cost, complexity, and resilience.</p><h3>Tier 1: The Bootstrapper’s Haven (Database Mart / Hetzner)</h3><p><strong>Best for</strong>: Startups, R&amp;D labs, and teams prioritizing cash conservation and fixed opex.</p><ul><li><strong>The Strategy</strong>: Use dedicated nodes with fixed monthly costs.</li><li><strong>Costs</strong>: ~$1,500/month for a full cluster (3 control, 5 worker nodes).</li><li><strong>Pros</strong>: Predictable billing. No egress fees on internal data transfer. Full root access to the metal.</li><li><strong>Cons</strong>: Manual cluster setup. Hardware replacement is your responsibility (though the provider replaces it, you manage the failover).</li></ul><h3>Tier 2: The Pragmatic Middle (DigitalOcean / Akamai-Linode / Vultr)</h3><p><strong>Best for</strong>: Scaling companies that need a managed Kubernetes experience but want to avoid the hyperscaler complexity and “billing by ambush.”</p><ul><li><strong>The Strategy</strong>: Managed Kubernetes (DOKS/LKE/VKE) with hourly, transparent pricing for GPU worker nodes.</li><li><strong>Costs</strong>: ~$2,500-$3,500/month.</li><li><strong>Pros</strong>: One-click cluster scaling. Managed control planes. Predictable, flat-rate egress pricing.</li><li><strong>Cons</strong>: Less control over the underlying kernel. While Article 1 required deep kernel control for AMD NPUs, moving to the cloud means moving to the established, stable GPU standard. Giving up kernel control here is a rational trade-off for operational simplicity.</li></ul><h3>Tier 3: The Enterprise Standard (EKS / AKS / GKE)</h3><p><strong>Best for</strong>: Pre-IPO or Enterprise organizations where “on-demand everything” is the top priority, regardless of cost.</p><ul><li><strong>The Strategy</strong>: Full hyperscaler integration.</li><li><strong>Costs</strong>: $4,500-$8,000+/month.</li><li><strong>Pros</strong>: Maximum global footprint. Infinite on-demand GPU capacity.</li><li><strong>Cons</strong>: <strong>The Billing Ambush.</strong> Between egress fees ($0.09/GB+), NAT Gateway hourly costs, and per-token scaling, your bill can triple without warning. In our experience, moving a non-prod AI environment from EKS to Database Mart saved us over $3,000 per month per cluster.</li></ul><h3>Part 5: The Billing Ambush (The True Cost of “Convenience”)</h3><p>Before we migrated our Dev and QA environments to Database Mart, we were averaging <strong>$4,500/month</strong> for a basic EKS cluster (3 control plane nodes, 5 worker nodes)-and that was <strong>before</strong> the heavy AI load. Once we added GPU nodes and started running embedding pipelines, the costs didn’t just scale; they metastasized.</p><p>We had to put the entire AI project on hold. Not because the technology failed, but because the <strong>Billing Ambush</strong> made the project financially impossible.</p><h3>5.1 The Egress and NAT Gateway Tax</h3><p>In a hyperscaler environment, “Managed NAT Gateways” and “Data Transfer” are the silent killers of AI margins. An AI agent team is data-hungry. Every time an agent fetches a 1GB document set for embedding or replicates a shard across availability zones, the hyperscaler meter clicks. By the time you’ve built a robust RAG index, you’ve paid for that data multiple times over in transit fees.</p><h3>5.2 The Resilience Tax</h3><p>AWS and its peers have designed a billing model where <strong>resilience is a cost center.</strong> To build a system that won’t die if a single datacenter has a power blip, you must deploy across multiple Availability Zones (AZs). This immediately:</p><ol><li><strong>Triples your NAT Gateway costs.</strong></li><li><strong>Triples your storage replication costs.</strong></li><li><strong>Adds “Inter-AZ Data Transfer” fees</strong> for every byte of data synchronized between your nodes.</li></ol><p>You are paying 3x the price for the same level of compute, with no increase in revenue or business value. You are effectively being taxed for wanting your product to stay online.</p><h3>5.3 On-Demand Inefficiency</h3><p>The hyperscaler value proposition is “on-demand scalability.” But during the <strong>Build Phase</strong> of an AI startup, you don’t need infinite on-demand bursts; you need <strong>steady-state compute density.</strong> Paying $4.00/hour for an on-demand GPU instance that you use 24/7 is a fast-track to bankruptcy. In a Sovereign Stack, you pay for the hardware once (or a flat monthly fee for a dedicated node), and your marginal cost for running a 48-hour embedding job is <strong>zero.</strong></p><p>The hyperscalers have left entrepreneurs with a binary choice: build a <strong>single-point-of-failure</strong> for a reasonable price, or build a <strong>resilient system</strong> that consumes all your seed capital. We chose a third way.</p><h3>Part 6: The Convenience Trap — When Hyperscalers Stop Saving You Money</h3><p>The original attraction of the public cloud was lower cost and operational convenience. But as hyperscalers have matured, their business model has shifted from “helping you start” to “extracting your margin.” They are banking on businesses losing the technical skills and institutional knowledge required to defend their own technology.</p><h3>6.1 The Insight: AWS’s Own Playbook</h3><p>The secret to the Sovereign Stack is applying the hyperscalers’ own playbook against them. Most “magical” cloud services are simply rebranded versions of open-source software.</p><ul><li><strong>AWS Athena</strong> is built on <strong>PrestoDB</strong>.</li><li>The makers of PrestoDB went on to build <strong>Trino</strong>, which powers the enterprise-grade <strong>Starburst</strong>.</li></ul><p>By running <strong>Trino</strong> yourself in your private cluster, you gain an “Athena-class” query engine for your data lake without the per-query billing or the vendor lock-in. You aren’t just saving money; you are reclaiming the skill of infrastructure design. You are proving that you know how the magic works.</p><h3>6.2 The Case of the $4,500 Failure</h3><p>To illustrate the “Convenience Trap,” consider a real-world IoT workload we managed: 400 messages per second across four tables.</p><ol><li><strong>The RDS Attempt</strong>: MySQL on AWS couldn’t keep up with the write volume unless we scaled to massive 8x or 16xlarge instances. Adding multi-zone availability for resilience tripled our costs-largely due to hard-to-trace data transfer fees-without providing any new revenue. Failover is a cost center, but AWS billed it as a profit center for them.</li><li><strong>The DynamoDB Attempt</strong>: We moved to DynamoDB, which solved the engineering challenge but exploded the budget. The per-transaction billing for reads and writes quadrupled our costs. Even with a dedicated engineer focused on table optimization for two months, we saw no appreciable savings.</li></ol><p>We could solve the problem, but only by burning more capital with no appreciable business gain. AWS had left us with a binary choice: build a <strong>single-point-of-failure</strong> for a reasonable price, or build a <strong>resilient system</strong> that consumed all our margin. The larger an enterprise cloud gets, the more their business model must abandon customer cost savings and emphasize lock-in and fear.</p><h3>Part 7: The Cloud-Optimized Sovereign Stack</h3><p>In the cloud, we swap NPU efficiency for <strong>GPU-native throughput</strong>. While we are letting go of the NPU-focused Lemonade Server from Article 1, the core architectural pillars remain identical. We are simply optimizing the inference layer for a GPU-centric environment.</p><h3>7.1 Kubernetes: The Resilience Maximizer</h3><p>Kubernetes isn’t just for orchestration; it’s your insurance policy. If a GPU node fails or a provider has a regional issue, K8s automatically reschedules your agents to healthy nodes. More importantly, it allows you to maximize your expensive GPU resources by bin-packing embedding, reranking, and inference workloads onto the same hardware.</p><h3>7.2 Inference: vLLM (Pure GPU Optimization)</h3><p>We switch to <strong>vLLM</strong> for our production inference.</p><h3>7.3 The Data Lake Is Your AI Department</h3><p>If “your data is the moat,” then your storage architecture is your most important strategic asset. We use a <strong>two-tier data lake</strong> built on <strong>Rook-Ceph</strong>:</p><ol><li><strong>The Hot Tier (SSD)</strong>: Hosts your <strong>Qdrant</strong> vector store. Every agent “thought” involves a vector search; if this tier is slow, your AI team is slow.</li><li><strong>The Warm Tier (HDD)</strong>: Hosts your raw document corpus and logs. Using HDD here makes a 20TB data lake financially defensible.</li></ol><h3>7.4 The Supporting Pillars (Summary)</h3><p>While we have optimized the inference and networking for the cloud, the core “brain” of the stack remains powered by the open-source pillars we detailed in <a href="https://johnkjohansen.com/blog/sovereign-stack-private-ai-kubernetes-amd">Article 1</a>:</p><ul><li><strong>Qdrant</strong>: Your proprietary vector memory.</li><li><strong>Envoy Gateway</strong>: The secure “front door.” (Nginx Ingress was deprecated April 2025).</li><li><strong>Harbor</strong>: Your private model and image vault.</li><li><strong>Temporal + Kaigents</strong>: The engine for durable AI workflows.</li><li><strong>HashiCorp Vault</strong>: Programmatic secrets management for agents.</li></ul><h3>Part 8: The Operational Burden (The Skill Debt)</h3><p>Let’s be blunt: while you are letting go of the “screwdriver” by avoiding on-prem hardware, you are trading it for a higher <strong>DevOps skill debt</strong>.</p><p>To run this stack, your team needs more than just a passing familiarity with Kubernetes. They need:</p><ul><li><strong>Resilience Engineering</strong>: Understanding how to manage Rook-Ceph quorums during node maintenance.</li><li><strong>Data Promotion</strong>: Moving an embedding index from a “Build” cluster to “Prod” without causing “hallucination drift” (where the model in prod interpret chunking differently than in dev).</li><li><strong>Security Posture</strong>: Managing HashiCorp Vault so your agents consume secrets programmatically without human intervention.</li></ul><p>If your team is only comfortable with clicking “Deploy” on a Vercel dashboard, this stack will fail you. You are building an <strong>AI Department</strong>, not a web app. That requires engineering discipline.</p><h3>Part 9: Sovereignty as a Compliance Shortcut</h3><p>There is a massive hidden benefit to the Sovereign Stack that rarely gets mentioned: <strong>Compliance.</strong></p><p>If you are pursuing SOC2, HIPAA, or GDPR, every third-party SaaS you use (OpenAI, Pinecone, LangChain Cloud) is a new “sub-processor” that requires a BAA, a security audit, and a data-processing agreement.</p><p>When you build the Sovereign Stack, <strong>you are the sub-processor.</strong> Your customer data never leaves your cluster. Your model logs never enter a third-party training set. This architecture doesn’t just protect your IP; it potentially cuts months off your compliance audit cycles.</p><h3>Conclusion: Stop Building on Rented Land</h3><p>The Sovereign Stack isn’t about where the servers physically sit; it’s about who owns the logic, the memory, and the “secret sauce.”</p><p>Digital Sovereignty is about owning the logic and the memory. Whether you choose the NPU-powered on-prem stack from Article 1 or the GPU-enabled Private Cloud from this guide, the goal is the same: <strong>Digital Sovereignty.</strong></p><ol><li><strong>Own the Memory</strong>: Use Qdrant and Rook-Ceph so your data lake is an asset, not an egress liability.</li><li><strong>Own the Logic</strong>: Use vLLM and Kubernetes so your “inference engine” can be moved to any provider in 24 hours.</li><li><strong>Own the Future</strong>: Build on open-source pillars today so that when the next-generation hardware arrives, you aren’t waiting for a SaaS provider to grant you access.</li></ol><p>You don’t need to be a hardware engineer to own your AI future. You just need to stop paying rent on your own intelligence.</p><p><em>Originally published at </em><a href="https://johnkjohansen.com/blog/sovereign-stack-part-2-practical-private-cloud"><em>https://johnkjohansen.com</em></a><em> on June 16, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f555ea8369d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Sovereign Stack: Building a Private AI Department on AMD and Kubernetes]]></title>
            <link>https://medium.com/@johnkjohansen/the-sovereign-stack-building-a-private-ai-department-on-amd-and-kubernetes-5779ec290a31?source=rss-0f26fc68fc66------2</link>
            <guid isPermaLink="false">https://medium.com/p/5779ec290a31</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[sovereign-ai]]></category>
            <category><![CDATA[startup-ai-workflow]]></category>
            <category><![CDATA[intellectual-property]]></category>
            <dc:creator><![CDATA[John K. Johansen]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 00:00:55 GMT</pubDate>
            <atom:updated>2026-06-06T19:15:22.314Z</atom:updated>
            <content:encoded><![CDATA[<p>For the modern entrepreneur, the greatest threat to your “moat” isn’t a competitor-it’s your landlord. If your business intelligence depends entirely on OpenAI, Claude, or Gemini, you are building on rented land. Worse, you are paying your landlord in data, allowing them to train their next-generation models on your proprietary workflows.</p><p>To reclaim your digital sovereignty, you need to own the metal. This guide walks you through the implementation of the <strong>Sovereign Stack</strong>: a production-grade AI infrastructure built on <strong>AMD Ryzen AI NPUs</strong>, <strong>Kubernetes (K8s)</strong>, and a vetted suite of <strong>Open Source</strong> pillars.</p><p><em>This article is the synthesis of two earlier pieces in our series: </em><a href="https://johnkjohansen.com/blog/self-hosted-ai-2026"><em>Self-Hosted AI in 2026: The Case Has Never Been Stronger</em></a><em>, which established the business case for sovereign AI, and </em><a href="https://johnkjohansen.com/blog/amd-ryzen-ai-npu-enterprise-chip"><em>AMD Ryzen AI NPU: The Enterprise AI Chip Hiding in Plain Sight</em></a><em>, which made the hardware argument. If the “why” is still an open question for you, start there. This article starts where those left off — with the implementation.</em></p><h3>The Strategic Tier: Separating the Brain from the Body</h3><p>The common mistake in AI infrastructure is treating every workload the same. An LLM doing deep reasoning has fundamentally different hardware needs than the orchestration layer that routes work to it. Mixing them on the same machines means either overspending on inference hardware or starving your agents of the stability they need.</p><p>For a production-grade autonomous agent team, we must separate the <strong>Inference Engine</strong> (the heavy reasoning) from the <strong>Agent Substrate</strong> (the orchestration and memory). This separation also means a model upgrade or a cluster maintenance window never takes your entire AI department offline at once.</p><h3>Tier 1: The Brain (Bare-Metal MAX 395+ Hosts)</h3><p>We host our primary LLMs ( <strong>GPT-OSS 20B</strong> for reasoning and <strong>Qwen3 Coder 30B</strong> for implementation) on dedicated bare-metal nodes, completely outside the Kubernetes cluster.</p><ul><li><strong>OS: Ubuntu 25.10+</strong> — and this is a mandate, not a preference. AMD achieves their NPU optimizations through Linux kernel modules that they co-develop with Canonical and ships directly inside new Ubuntu releases. The business implication is stark: if you choose any other Linux distribution, or fall behind on Ubuntu releases, you are essentially volunteering your team to act as kernel engineers — building, signing, and maintaining custom driver packages. That is a full-time job. Staying current with Ubuntu is the only practical path.</li><li><strong>Inference: Lemonade Server</strong> (installed via <strong>Snap</strong>, not as a K8s pod). AMD’s support partnership is with Canonical’s Snap ecosystem, not with Kubernetes container runtimes. Running Lemonade in a pod sacrifices direct hardware access to the NPU — which is the entire point. Snap gives Lemonade Server the low-level system access it needs to use the NPU rather than falling back to the GPU. This delivers approximately <strong>5x the power efficiency</strong> of a GPU-based inference setup for supported models.</li><li><strong>The 128GB Advantage</strong>: Moving from 64GB to 128GB RAM is a direct business investment in <strong>agent concurrency</strong>. With 64GB, your agents must use small context windows, which forces you to architect every workflow around context limitations — a design constraint that shapes every business process you automate. With 128GB, you can hold large project architectures in memory simultaneously, allow multiple agents to share the same model concurrently, and stop making business decisions based on hardware limitations.</li></ul><h3>Tier 2: The Body (The Distributed Substrate)</h3><p>The orchestration, vector memory, and utility models (rerankers, embeddings) live in a high-availability Kubernetes cluster.</p><ul><li><strong>Why 4–6 Nodes, Not 1 or 2</strong>: This number isn’t about raw compute — it’s about the minimum viable resilience for a production system. Kubernetes distributed storage (Rook-Ceph) requires at minimum 3 nodes to maintain data quorums: if you have 3 replicas across 3 nodes and one fails, you still have 2 copies and the system heals itself. Add nodes for rolling updates (upgrading one node at a time without downtime), for hardware failure tolerance (RAM partially fails, a thermal event shuts a node down), and for the operational reality that commodity hardware <em>will</em> have issues. Four to six nodes gives you a system where a single failure is a non-event rather than an emergency.</li><li><strong>The “Node-a-Year” Economic Model</strong>: Mini-PCs are commodity hardware. Budget to replace approximately one per year as a cost of operations, not as a crisis. This is fundamentally different from enterprise server economics, where a failure is a catastrophic, unplanned expense. At ~$1,500-$2,000 per HX 370 node (with RAM and SSD), this is a predictable line item, not a fire drill.</li><li><strong>Distributed Resilience via Rook-Ceph</strong>: When a node goes down, Kubernetes automatically reschedules your <strong>Kaigents</strong> workers and <strong>Temporal</strong> workers to healthy nodes. But the critical piece is <em>data</em> — your vector database, agent memories, and model caches cannot live on a single disk. Rook-Ceph shards and replicates this data across the physical disks of all cluster nodes, so a node failure is invisible to your running agents.</li></ul><h3>The Sovereign OSS Stack: Your Technical Shopping List</h3><p>A private cluster is only as good as the software that governs it. Every tool below was chosen for a specific business reason. Here is the stack we use, and — critically — <em>why</em> we use it:</p><h3>1. Orchestration: Kubernetes (K8s) v1.31+ — Full, Not Lite</h3><p>We use full upstream Kubernetes, not the popular lightweight alternative K3s.</p><p><strong>Why this matters to your business</strong>: This is actually three separate guarantees converging on the same answer.</p><p>First, <strong>OSS compatibility guarantees</strong>: The enterprise tools in this stack — Rook-Ceph, MetalLB, Envoy Gateway, Harbor — publish their support matrices against full K8s. Rook-Ceph in particular has historically not certified K3s. When something breaks in production and you open a support issue, “we’re running K3s” ends that conversation. Running full K8s means you are always within the tested, supported envelope of every tool you depend on.</p><p>Second, <strong>AMD’s kernel module guarantee</strong>: AMD only certifies their NPU kernel modules against full Kubernetes. The modules are what give Lemonade Server its NPU access — they are the foundation of the efficiency story. AMD’s support commitment stops at the K8s boundary.</p><p>Third — and this is the insight that makes the whole debate largely academic — <strong>AMD’s kernel modules ship pre-built inside Ubuntu releases</strong>. You do not install them; they are already there. This is the result of AMD’s co-development partnership with Canonical. The implication is that your “driver management” strategy is simply: keep Ubuntu current. Full K8s running on Ubuntu means every layer of the stack — OS, kernel modules, NPU drivers, enterprise OSS — is within a supported, tested boundary. K3s would introduce a gap into that chain at the one point where AMD’s guarantee lives.</p><h3>2. Inference: Lemonade Server (AMD-optimized)</h3><p>Lemonade Server is the software layer that translates your LLM inference calls into instructions the AMD NPU actually understands. Without it, your inference runs on the GPU — which works, but forfeits the primary efficiency advantage of AMD silicon. The NPU was purpose-built for AI matrix operations and runs them with a fraction of the power draw of a GPU doing the same work.</p><p><strong>A critical nuance</strong>: Not every model is NPU-optimized. Lemonade Server currently has a curated subset of models (GPT-OSS 20B, Qwen3 Coder 30B, and others) with full NPU quantization. For image generation (ComfyUI), video models, and some reasoning models, the GPU remains the execution target — you still get the benefit of AMD’s efficient GPU architecture, just not the NPU’s additional efficiency layer. This is not a reason to avoid the stack; it is context for setting realistic expectations on power costs per workload type.</p><h3>3. Storage: Rook-Ceph</h3><p>Rook-Ceph is your distributed storage layer. It turns the individual SSDs across your cluster nodes into a single, shared, self-healing storage pool that your agents use like a reliable hard drive.</p><p><strong>The business case</strong>: Your agents’ intelligence lives in storage — their vector memories, the Qdrant database, the indexed versions of your proprietary documents. A traditional single-point NAS gives your AI department amnesia when it fails. Rook-Ceph replicates data across at minimum 3 physical nodes, so the storage system survives a node failure automatically, without human intervention, and without data loss. It also provides an S3-compatible object storage interface, meaning the same tools your team uses with AWS S3 work identically against your private cluster.</p><h3>4. Networking &amp; Discovery</h3><h4>Bind 9 — Installed on Bare Metal, Not in Kubernetes</h4><p>Bind 9 is our internal DNS server, hosting the ai-agent.private domain that all cluster services and bare-metal hosts use to find each other.</p><p><strong>Why bare-metal, not a K8s pod?</strong> If DNS lives inside the Kubernetes cluster and the cluster has a problem — a failed upgrade, a networking misconfiguration, a botched certificate rotation — you can’t resolve hostnames to fix it. You’re locked out of your own house with no key under the mat. Installing Bind on the Ubuntu OS of two dedicated nodes means the DNS “phone book” for your entire infrastructure is always reachable, even when K8s is unhealthy. It also allows non-K8s devices (dev laptops, NAS units, bare-metal LLM hosts) to use the same internal DNS seamlessly.</p><h4>External-DNS — Automated DNS Record Management</h4><p>External-DNS watches your Kubernetes cluster for new services and automatically creates the corresponding DNS records in Bind 9.</p><p><strong>Why this matters operationally</strong>: Without External-DNS, every time your team deploys a new agent service, someone must manually log into Bind and add a DNS record. At scale — when you’re running 20, 30, or 50 different agent services — this becomes a full-time maintenance burden and a constant source of human error. External-DNS turns DNS record management from a manual chore into an automatic consequence of deployment.</p><h4>MetalLB — Load Balancer for Bare Metal</h4><p>MetalLB gives your cluster the ability to assign stable IP addresses to services that need to be reachable from outside the cluster.</p><p><strong>Why you need it</strong>: In a cloud environment (AWS, GCP, Azure), when you create a Kubernetes LoadBalancer service, the cloud provider automatically assigns a public IP from their pool. On bare metal, there is no cloud provider. Without MetalLB, your LoadBalancer services stay in a permanent “pending” state — they request an IP that no one ever assigns. MetalLB fills that role, managing a pool of your local IP addresses and assigning them automatically, giving your internal services stable, reachable addresses exactly as they would have in a cloud environment.</p><h4>Squid — Installed on Bare Metal, Not in Kubernetes</h4><p>Squid is an HTTP proxy. We use it to route internet traffic for cluster nodes that have unreliable WiFi connectivity.</p><p><strong>The honest story</strong>: Some commodity mini-PC manufacturers (GMKTec, in particular) use Intel WiFi chipsets that have intermittent driver issues under Ubuntu’s generic kernel. Rather than returning hardware or waiting for driver fixes, we designate one node with a solid Ethernet connection as a “gateway” and install Squid on its Ubuntu OS. All other nodes route their package downloads and container pulls through the Squid proxy. The fix costs zero dollars and takes about 20 minutes. Like Bind 9, installing it on bare-metal Ubuntu (rather than as a K8s pod) means it remains available even when Kubernetes is being serviced, and it serves any device on the network — not just cluster nodes.</p><h3>5. Gateway: Envoy Gateway — Not Nginx</h3><p>Envoy Gateway is the front door to your cluster: it routes external requests (from your team’s browsers, API clients, or agent calls) to the right internal services.</p><p><strong>Why Nginx Ingress is no longer an option</strong>: As of April 2025, Nginx Ingress Controller was officially deprecated and removed from Kubernetes. This was not a quiet sunset — it was a lifecycle decision that means Nginx Ingress receives no further Kubernetes-native updates, compatibility patches, or security fixes. Building your private AI infrastructure on deprecated ingress software is equivalent to building your office on a lease that was just cancelled: it works today, but every month that passes increases your exposure. Envoy Gateway is the CNCF-graduated successor with active Kubernetes SIG backing, a roadmap aligned with the K8s Gateway API standard, and production-grade support for the traffic shaping and security policies a multi-agent system requires.</p><h3>6. Registry: Harbor — Your Private Container Vault</h3><p>Harbor is a self-hosted container image registry — think of it as your own private Docker Hub, running inside your cluster.</p><p><strong>Why not just use Docker Hub?</strong> Two reasons. First, Docker Hub rate-limits anonymous image pulls, which can silently cause your cluster to fail to pull images during deployments — a frustrating operational problem that is trivially solved by hosting your own registry. Second, and more importantly for a sovereign stack: your container images may contain proprietary model configurations, fine-tuning weights, or custom agent code. Every image pushed to a public registry is a potential IP leak. Harbor keeps everything inside your perimeter. It also provides image vulnerability scanning, so you know immediately when a base image has a security issue before it enters your cluster.</p><h3>7. Durable Execution: Temporal + Kaigents</h3><p>Temporal is a workflow orchestration engine. Kaigents is our AI agent framework that runs on top of Temporal to coordinate multi-agent tasks.</p><p><strong>Why “durable execution” is a business requirement</strong>: Consider an agent that has been running a complex multi-step task for 45 minutes — researching competitors, drafting a report, querying your internal knowledge base. Without Temporal, that agent’s state lives in memory on a single pod. If that pod’s node fails, all 45 minutes of work is lost. The agent starts over, consuming more tokens, more time, and producing inconsistency in outputs. Temporal persists every step of every workflow to durable storage as it happens, so when the pod is rescheduled to a healthy node, the agent picks up exactly where it left off. For a 24/7 autonomous AI department, this is the difference between a reliable team member and one who randomly loses their work.</p><h3>8. Secrets Management: HashiCorp Vault</h3><p>Vault is a secrets management platform. It stores, controls access to, and audits every secret in your infrastructure — API keys, database credentials, model endpoint tokens, agent identities, and inter-service certificates.</p><p><strong>Why this is non-negotiable for an AI agent stack</strong>: Human teams can manage secrets through password managers and discipline. AI agent teams cannot — they consume secrets programmatically, at scale, across dozens of concurrent workflows. Without a secrets manager, credentials end up in environment variables baked into container images, in plaintext config files on cluster nodes, or hardcoded into agent prompts. Any one of these is a catastrophic IP and security failure waiting to happen.</p><p>Vault solves this by issuing <strong>dynamic, short-lived secrets</strong> to agents at runtime. An agent requests a database credential from Vault, gets one that expires in 15 minutes, uses it, and the credential ceases to exist. There is no persistent secret to steal, no rotation schedule to manage manually, and a complete audit log of every secret access. For human team members, Vault provides a single controlled interface with role-based access — the same secret store serves both your developers and your autonomous agents, with full visibility into who or what accessed what and when.</p><h3>9. Vector Store: Qdrant</h3><p>Qdrant is your agents’ long-term memory — a database optimized for storing and searching vector embeddings, which are the numerical representations of your documents, code, and business knowledge.</p><p><strong>The sovereignty angle</strong>: Your agents need to “know” your proprietary content: your code patterns, your customer data, your internal SOPs. RAG (Retrieval-Augmented Generation) is the mechanism by which they do this — the agent queries Qdrant for relevant context before responding, giving it access to your institutional knowledge without baking that knowledge into the model itself. Running Qdrant inside your cluster means this entire knowledge retrieval loop happens on your hardware. Your proprietary documents are never sent to an external embedding API for indexing, and your queries never leave your perimeter. The model that answers remains a public open-source model; what makes it relevant to your business stays private.</p><h3>Practical How-To: Implementation Highlights</h3><h3>1. The “Anchor” Services Pattern</h3><p>The pattern of running Bind 9 and Squid on bare-metal Ubuntu (rather than as K8s pods) is worth naming explicitly, because it applies as a general principle: any service whose failure would prevent you from <em>fixing</em> the cluster must not live inside the cluster. We call these “anchor” services. They are the stable foundation on which everything else depends. Bind and Squid are our two anchors — they run on the Ubuntu OS of two dedicated nodes, survive cluster re-initializations, and serve any device on the network, including dev laptops and the bare-metal LLM hosts that sit outside K8s entirely.</p><h3>2. The “Inference Bridge” (ExternalService)</h3><p>Since our heavy LLMs live on bare-metal MAX 395+ hosts (for NPU performance) but our agents live in K8s, we create a Kubernetes ExternalName service to bridge the two worlds. This allows agent pods to call lemonade-brain-01.ai-models.svc.cluster.local using standard Kubernetes service discovery, while the actual request is routed to the bare-metal host by name.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: lemonade-brain-01<br>  namespace: ai-models<br>spec:<br>  type: ExternalName<br>  externalName: max395-node-01.ai-agents.private</pre><p>This pattern is important because it means you can replace or add bare-metal inference hosts without changing a single line of agent code — you update the DNS record, not the application.</p><h3>3. Keeping Ubuntu Current on LLM Hosts</h3><p>Plan a quarterly maintenance window to upgrade the Ubuntu version on your MAX 395+ bare-metal hosts. This is non-negotiable if you want to stay on the current AMD kernel modules. The process: bring the Lemonade Server down, run the Ubuntu upgrade, verify the NPU kernel modules loaded correctly, bring Lemonade back up. This typically takes 30–45 minutes per host. Stagger the two hosts so you always have one available during the maintenance window.</p><h3>The Hidden Cost: Skills and People</h3><p>The hardware and software costs above are the easy part to budget. The honest cost that most “build your own AI lab” articles skip is <strong>human capital</strong> — the skills required to build this stack and keep it running.</p><p>This is not a weekend project for a non-technical founder. It requires competence across three disciplines that are each a career in their own right:</p><p><strong>Infrastructure and Hardware</strong> Someone needs to rack the nodes, configure the network switch, set up VLANs, and troubleshoot hardware failures at 3am. The <strong>CompTIA A+</strong> certification covers the hardware fundamentals, and <strong>CompTIA Network+</strong> covers the networking layer — subnets, switching, the concepts behind MetalLB’s IP pool management. These are the baseline literacy requirements for anyone running physical infrastructure. If you are hiring for this role, these certs signal the right foundation.</p><p><strong>Linux Administration</strong> Every node in this stack runs Ubuntu. The NPU kernel module story, Snap package management, and Kubernetes node configuration all live at the Linux OS layer. <strong>CompTIA Linux+</strong> is a solid credential for this — it’s not glamorous, but it maps directly to the day-to-day work of keeping Ubuntu nodes healthy, managing system services, and debugging kernel-level issues when an NPU driver behaves unexpectedly after an OS upgrade.</p><p><strong>Kubernetes Operations</strong> This is the deepest skill requirement. Setting up a full K8s cluster with Rook-Ceph, MetalLB, Envoy Gateway, Harbor, and External-DNS is not a tutorial exercise — it requires genuine operational experience. The <strong>CNCF Certified Kubernetes Administrator (CKA)</strong> is the right credential here: it’s a hands-on, performance-based exam (not multiple choice) that tests exactly the skills needed to administer a production cluster. At $445, it is expensive for a certification exam — but it is from the same body that governs Kubernetes itself, and it is the credential that signals genuine operational depth rather than theoretical familiarity.</p><p><strong>Your Options as an Entrepreneur</strong></p><p>You have three realistic paths:</p><ol><li><strong>Develop the skills yourself</strong> — viable if you have an engineering background and 6–12 months to invest. The certifications above give you a structured learning path. YouTube videos and AI can help you get something going much faster, but you won’t know how to describe issues to your AI to keep it all working over time without a bit more experience.</li><li><strong>Hire a DevOps/Platform engineer</strong> — a mid-level hire with K8s experience and Linux background runs $90,000-$130,000/year in most markets, or $100-$150/hour as a contractor for the initial build. Global wages are much lower if you post a gig on Upwork.</li><li><strong>Use a managed bare-metal Kubernetes provider</strong> — the subject of Part 2 in this series, which trades the NPU efficiency advantage for a dramatically lower skills requirement. You still need Linux and K8s literacy, but the hardware layer disappears.</li></ol><p>The skills cost is real, and it belongs in your total cost of ownership calculation. It is also a one-time investment in organizational capability — once your team has these skills, they apply to every infrastructure project you build, not just this one.</p><h3>The Economics: ROI for the Sovereign Entrepreneur</h3><p><strong>The Bottom Line</strong>: For a startup processing high-volume agent workflows, the Sovereign Stack pays for itself in under 6 months. After that, you are not just saving money — you are building a proprietary infrastructure asset with a defensible operational moat: your competitors cannot replicate your workflows even if they wanted to, because your workflows never left your building.</p><p><em>Originally published at </em><a href="https://johnkjohansen.com/blog/sovereign-stack-private-ai-kubernetes-amd"><em>https://johnkjohansen.com</em></a><em> on June 6, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5779ec290a31" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>