All posts

Building Flywheel: What a Year of Personal AI Infrastructure Actually Produces

Updated November 26, 2026

Building Flywheel: What a Year of Personal AI Infrastructure Actually Produces

Clusters of server blocks with data flows radiating outward from a glowing central core

At 11pm on a Tuesday, I told Claude to migrate 4.2 terabytes of data off a degraded ZFS pool and went to bed. No monitoring dashboard open, no phone alarm set. When I woke up seven hours later, the migration had completed, the new pool was healthy, and a summary of every decision made during the process was waiting in my terminal. The AI had detected a slow drive, excluded it from the rebuild, adjusted the resilver priority to avoid saturating the backplane, and documented its reasoning at each step.

That moment was the product of roughly a year of infrastructure work. Not AI research. Infrastructure. The kind of work that doesn't make for good Twitter threads: networking, storage, GPU scheduling, context management, deployment pipelines. The unsexy scaffolding that turns a language model from a clever chatbot into something that can actually run your systems while you sleep.

I call the system Flywheel, and this is what building it taught me.

The Problem That Started Everything

In early 2025, I was using Claude like most developers: open a session, paste some context, get an answer, close the tab. It worked. It was also profoundly wasteful.

Every new session meant re-explaining my server topology. Every new conversation required re-establishing my infrastructure layout, why inference01 had four GPUs but inference02 had none, where the Docker volumes lived, what my naming conventions were. The AI was stateless by design, and I was the buffer. My job had quietly become translating my own infrastructure into prompt context, over and over, session after session.

The models themselves weren't the bottleneck. GPT-4 and Claude were already capable of sophisticated reasoning about systems architecture. The bottleneck was that none of that reasoning persisted. I could have the most productive debugging session of my career, and the next morning it would be gone. The AI had no memory, no awareness of my environment, and no ability to act on my infrastructure without me hand-holding every step.

I didn't need a better model. I needed infrastructure around the model.

Starting with Hardware

The foundation of Flywheel is physical. Not because I'm nostalgic for rack-mounted hardware, but because GPU compute and local inference have economics that don't work in the cloud at hobby scale.

The core is a Proxmox hypervisor (proxmox01) running the virtualization layer for everything else. Two inference servers sit behind it: inference01, which carries four Tesla M40 24GB GPUs in a 4U chassis, and inference02, which lives in the DMZ and handles anything that needs to face the internet. A Mac Mini handles desktop workloads and acts as a secondary development machine.

Four identical compute slabs in a row linked by glowing lanes with airflow arrows above

The M40s deserve a mention. They're Maxwell architecture from 2015, which means no bf16 support, no flash attention, and no torch.compile. Every ML framework released in the last two years assumes you have Ampere or newer. Making these cards useful for modern workloads involves patching PyTorch, swapping SDPA for FlashAttention, downgrading CUDA toolkit versions, and generally fighting the assumption that everyone has an RTX 4090. But each card has 24GB of VRAM, and four of them give me 96GB of total GPU memory for the cost of a single A100 rental month. The economics are compelling if you're willing to do the integration work.

The storage layer is a ZFS pool (PoolShark) providing redundant storage across the infrastructure. OPNsense handles firewall and routing. Everything runs Docker. The entire stack is self-hosted, which means I own every failure mode. That's a feature, not a bug: when your AI infrastructure depends on someone else's uptime, you've just added a dependency you can't debug.

Context as Architecture

The first real breakthrough wasn't technical. It was organizational.

I noticed that most of my prompt engineering time was spent on context loading. Not crafting clever prompts, just making sure the AI knew enough about my environment to be useful. So I formalized that process into what I call the Universal File Context system (UFC).

UFC is a hierarchical directory structure under ~/.claude/context/ that organizes everything the AI might need to know about my world into domains: projects, tools, finances, health, core principles. A dynamic hook (load-dynamic-requirements.ts) analyzes each prompt and loads only the relevant context files. Mention SSH in a prompt, and the SSH alias conventions load automatically. Mention a specific project, and its architecture docs, conventions, and current state appear in the context window.

This sounds simple. It is simple. That's the point. The context window is the most expensive resource in any AI workflow, measured both in tokens (cost) and in attention (quality). Stuffing 200K tokens of "everything the AI might need" into every session is like giving someone a filing cabinet when they asked for a phone number. UFC treats context as a scarce resource and allocates it precisely.

The practical effect is that Claude starts every session already knowing what it needs to know. Not everything. Just the relevant slice. When I'm working on the blog, it knows the blog's tech stack, voice guidelines, and deployment pipeline. When I'm debugging GPU scheduling, it knows the server topology, the job manager's API, and the thermal constraints of passive-cooled M40s in adjacent PCIe slots. The context is targeted, which means the reasoning is better.

The Memory Layer

Context loading handles the present. Memory handles the past.

MemBrane is a six-layer memory architecture that gives the AI persistent knowledge across sessions. Graph layer (Neo4j) for entity relationships. Vector layer (Qdrant) for semantic search. File layer (markdown, synced to Obsidian) for narrative learnings. Event log (SQLite) for session history. Procedural layer for debugging patterns. Redis cache for performance.

The graph is where the real leverage lives. When the AI knows that "MemBrane RUNS_ON inference01" and "inference01 HAS_GPU Tesla M40" and "Tesla M40 LACKS_SUPPORT bf16," it can reason about deployment constraints without me spelling them out. It can answer "can I run this model on my infrastructure?" by traversing relationships, not by me pasting a spec sheet into the prompt.

Every fact carries temporal metadata: when it was created, when it became valid, when it was superseded. This matters more than you'd expect. My infrastructure changes constantly. Services move between servers. Configurations evolve. A memory system that treats every stored fact as eternally true will eventually start giving you confidently wrong answers based on last month's reality. Temporal validity means the AI can distinguish between "this was true in January" and "this is true now."

A knowledge graph of glowing nodes with some dimmed to show superseded facts

Making GPUs Useful

Running inference locally creates a resource management problem that cloud APIs hide from you. Four GPUs, multiple services wanting compute (Ollama for LLM inference, Stable Diffusion for image generation, ACE-Step for music, autoresearch experiments), and no built-in scheduler.

The Ollama Job Manager is a FastAPI service that sits between clients and the GPU cluster, providing round-robin distribution, job queuing, and health monitoring. It doesn't need to be sophisticated by HPC standards. What it needs to do is prevent one runaway inference job from starving everything else, track which GPUs are loaded, and handle the M40-specific quirk that four passive-cooled cards in adjacent slots will thermally throttle each other if you load all four simultaneously. The middle cards run dangerously hot. External fans help. Staggered loading helps more.

I write more about the economics of GPU scheduling in a separate post about token economics.

The Delegation Economics

Flywheel uses a three-tier model delegation strategy: a frontier model for orchestration and complex reasoning, a mid-tier model for analysis, and the smallest capable model for execution tasks like file reads, bash commands, and memory operations. The cheapest model handles the vast majority of the work, which keeps costs sustainable and preserves the primary context window for reasoning rather than rote execution.

The full economics of this delegation strategy is its own topic, which I cover in The Token Economy.

What Overnight Autonomy Looks Like

Back to that ZFS migration.

The degraded pool was PoolShark, the primary storage array. A drive had started throwing errors. Not enough to lose data (ZFS is resilient by design), but enough that the pool was running in degraded mode with no redundancy. One more drive failure would mean data loss.

A dim group of storage cylinders streaming data to a bright group, with a progress bar below

I gave Claude the task at 11pm: assess the pool health, identify the failing drive, plan a migration to a new pool configuration, execute the migration, and verify the result. The AI had access to my infrastructure through MCP servers, it knew my server topology from MemBrane's graph, and it had a skill (a documented multi-step workflow) for storage operations.

What made this work wasn't any single component. It was the integration. The AI could SSH to the right server because UFC loaded my SSH alias conventions. It knew which pool to examine because MemBrane had the storage topology in its graph. It could reason about the migration strategy because the context window wasn't cluttered with irrelevant information. And it could execute because the MCP servers gave it actual access to the infrastructure, not just the ability to generate commands for me to copy-paste.

I didn't watch it work. I didn't set up a dead-man's switch. I trusted the system because I'd spent a year building the layers that made trust reasonable: memory that persists, context that's precise, guardrails that constrain, and verification that confirms.

The Philosophy Under the Code

Flywheel is built on a principle I keep coming back to: human augmentation, not replacement. The engineer designs; the AI executes. I decide what needs to happen and why. The AI figures out how and does it.

This isn't a philosophical stance I arrived at through reflection. It's an operational reality I discovered through failure. Early experiments where I gave the AI broad autonomy ("figure out what's wrong and fix it") produced technically correct solutions that violated implicit constraints I hadn't thought to state. The AI would fix a networking issue by changing firewall rules that broke something else. It would optimize a configuration by removing comments that contained critical context for future debugging.

The current system encodes constraints through UFC context files, MemBrane's knowledge graph, and explicit skill definitions. The AI operates within boundaries I've defined, with access to the knowledge it needs, and with the ability to execute against real infrastructure. But the boundaries exist. The constraints are architectural, not aspirational.

This is, I think, where solo developer infrastructure is actually heading. Not toward fully autonomous AI agents that replace the developer, but toward deeply integrated systems where the developer's knowledge, preferences, and constraints are encoded into an infrastructure that the AI can navigate. The developer becomes more productive not because the AI is smarter, but because the infrastructure connecting them is better.

What a Year Produces

Flywheel isn't finished. The procedural memory layer still needs work. The delegation model could be smarter about routing decisions. The monitoring system is functional but brittle in ways I haven't fully characterized. The M40 thermal management is held together with an external fan and staggered job scheduling.

But it works. It works well enough that I delegate storage migrations overnight. Well enough that my AI assistant knows my infrastructure topology, my debugging preferences, and my naming conventions without being told. Well enough that captured learnings from six months ago surface automatically when I'm working on a related problem today.

The productivity gain isn't a multiplier I can put a clean number on. It's more structural than that. Entire categories of work (context re-establishment, manual deployment, infrastructure monitoring, repetitive configuration) have been absorbed into the system. They still happen. I just don't do them anymore.

If I had to distill a year of building Flywheel into a single observation, it would be this: the infrastructure around the model matters more than the model. A mediocre model with excellent infrastructure (persistent memory, precise context, real system access, encoded constraints) will outperform a frontier model with none of those things. The model is the engine. The infrastructure is everything else that makes the car actually drive.

Start with the infrastructure.

About the author

Carlos Mendez

Carlos Mendez

IT support and systems, Maui, Hawaii

I come from IT support and systems work. I build and run my own infrastructure and the production websites for West Maui Tech, my business, and I build AI tooling on top of that stack. I write here about what I run, what broke, and how I fixed it.

Enjoyed this article?

Subscribe to get notified about new posts on software engineering, AI development, and infrastructure.

No spam, unsubscribe anytime.