For Solo Chiefs—creatives, solopreneurs, and lone leaders orchestrating AI, humans, and chaos with no one to save their ass. Your AI Agent Stack Is Spaghetti—It Should Be LasagnaI'm building a three-layer AI agent architecture for my one-person businessI’m a founder, intrapreneur, and former CIO rethinking governance for the one-person business, navigating sole accountability in the age of intelligent machines—informed by plenty of scar tissue. All posts are free, always. Paying supporters keep it that way (and get a full-color PDF of my book Human Robot Agent plus other monthly extras as a thank-you)—for just one café latte per month. Most Claude Code projects are just tents. I’m slowly building a city.Your overnight agentic hackathon is probably not a viable AI agent architecture. A few weeks ago, I realized my AI infrastructure sucked. After a year of experimenting with LLMs, I had ChatGPT, Claude, and Gemini all cross-contaminating each other’s project contexts. My data looked as if it had been distributed by a hand grenade across file systems and cloud services. I used Claude, Cowork, NotebookLM, and Perplexity like a five-year-old uses a box of crayons. And I had workflows and business processes flowing and connecting like noodles in a bowl of ramen someone dropped from the tenth floor. If I ever wanted to scale my business, I needed to stop treating my architecture like a junkyard. Does that sound familiar? The Lasagna Principle: Why Your AI Agent Architecture Needs LayersHere’s what I’ve learned from years of building software and months of wiring AI agents together: when you’re the only one responsible for the whole stack, sloppy wiring isn’t just a nuisance. It’s a liability you carry alone. Every solo operator I know who’s tried building an AI agent orchestration stack hits the same wall. They start with one automation. It works. They add a second. Still fine. By the fifteenth or sixteenth, they’re staring at a clump of Christmas tree wiring where a Slack message somehow triggers a scraper that writes to a database that kicks off another workflow that occasionally emails a client the wrong welcome email. Software engineers addressed this problem decades ago with the N-tier architecture. The idea is old and boring, which is exactly why it works: you separate your system into layers, and each layer only talks to the one directly above or below it. Your interface doesn’t know how you store your data; your data doesn’t care how your workflows run. Each layer minds its own business. I think of it as lasagna instead of spaghetti. Similar ingredients, completely different structure. And when something breaks (because it always will), you know exactly which layer to open up and poke around in. You separate your system into layers, and each layer only talks to the one directly above or below it. For my AI agent orchestration stack, I keep it simple and use just three layers: a UX layer where I interact with the system, a workflow layer where automations orchestrate the work, and a persistence layer where state lives and persists. The Scenario: One Request Through Three AI Automation LayersLet me walk you through what happens in each of these three layers when I add a new publication to my Substack tracking system. UX LayerEverything starts with a human doing something simple. In this example, I paste the URL of a Substack publication I discovered into a Slack channel. That’s it. I don’t configure anything, don’t fill out a form, don’t open a dashboard. I just drop a link and go back to whatever I was doing. Five seconds. |