DHH · 2026-08-26 · source ↗ · whole document (10)
Programming setup for AI Agents
`1:34:57`
I love the fact that this agent revolution was kicked off in the terminal because I was already a huge fan of TUIs, terminal user interfaces, and the terminal in general. That feels like a, a really nice place to be. It's a beautiful place to be. The modern terminal is just a good-looking place to work. So I like that. And then this fact of having multiple agents, especially once it's not just multiple agents running on your own machine, but you start running multiple machines. Now tmux alone is not enough to keep track of it, and that's why as of late I've switched to this thing called Herdr. And Herdr is essentially tmux plus agent notifications. So whenever your agent is done and needs something for you, it goes ding, a little bell telling you it's ready for its human, uh... Is it master or servant? I'm not quite sure always. But it is ready for a decision, and it also keeps track of these is it in working mode or not. So I have this Herdr set up. I have multiple Herdr setups actually running on individual machines. I went on this crazy phase just about a month ago realizing that doing this work on a single machine is not fast enough. It's like I've discovered multi-core programming, but I only have two cores. I'm like, "What if I had 16 cores? What if I had 32 cores? What if I had 64 cores?" So I instantly went out and I bought these amazing KVMs called GL.iNet Comets. And what they do is it's this little box.
You plug in HDMI, you plug in USB and connect it to the computer. It's like a KVM. So a KVM is a remote way of controlling a computer, but what's special about this is just how easy it was. You connect this thing in, you go to a webpage, log in once, set one password. Now this thing can hop on your tailnet. This has been the other revolution of the last year for me, is discovering these WireGuard networks. Uh, Tailscale is essentially turning all the computers you have into a local network wherever you are. Like right now on my phone, I have direct access to all the computers in my Malibu office. I also have access to all my computers in my Copenhagen office. And I can treat them as though I sat right next to them without having to punch holes in a firewall or set up complicated VPNs. And what this does is it just decreases the friction it takes to get new compute online. So as soon as I discovered this, I looked at my closet, and I realized I had a bunch of mini PCs from prior experiments, and I just said, "What if I just connected all of them?" And I just connected four of the computers-... in a closet. They all had their little Comet, and suddenly I could run agents on more computers at the same time, and I could control them all with Herdr. And it did get to a point where I maxed out my own processing power. That I think at about... What do we want to put it? About four to five machines running, I don't know, three agents. I have about 16 threads. That's what I can run.
And the faster the agents run, of course, the fewer threads I can run, but at the current pace, I can run about 16 threads-
`1:38:53`
I'm writing my lines. And over the course of, like, an hour, I will have written one beautiful controller, one beautiful model. Like, that's one file. And I've really worked on it, right? So maybe there's 60 lines left. So maybe my bandwidth at this moment is, like, 30 lines an hour. I think that's even high. Maybe it's 20 lines an hour. Now I'm running 16 threads. I'm producing at some times hundreds of lines of hour or hundreds of lines of code per hour. Now, let me pause myself there for a hot moment. I hate that metric, right? Like, lines of code is a stupid metric in general to measure these things, and I think it's right from some in the programming community to ridicule the AI psychosis when everyone talks about the number of lines of code they're writing, and then you ask them, "What did you build?" And they're like, "Well, I..." And then no good answer comes out, right?
`1:39:49`
It is a nice shorthand. It is a representation or encapsulation of how much output that's coming out. Now, whether the output is good or bad-... is not a referendum on that. But I was producing and producing so much more now, right? And therefore I'm able to keep all these threads going. So that's the setup. It's still Neovim, but at this point, I'm not writing a lot of code, so I'm using Neovim as a project browser and then as a way to kick off Lazy Git to see the change log for what's there. And even that, I'd say if GitHub was a little faster at showing you your pull request, the web is probably actually a nicer place to do that. I don't know. There's also this other tool I've been playing with a bit called Hunk, which just produces Diffs in a really nice way. So you could look at that too. But I find that when I look at Hunk, I only see the change set, and when I'm reviewing output from an agent, I often want to see the surrounding context. Oh, yeah, so it changed this file, but actually, what do we have in this other file that wasn't touched but maybe should've been touched? So that's why I still like Neovim as a way of doing it. But it's all happening, by the way, of course, in Amachi. So it's all happening on Linux. And this was the other major breakthrough with agents. Agents love the Unix philosophy.
It loves individual tools that it can invoke through the command line, and there is no operating system on Earth of the majors, I'm counting three here, Mac, Windows, Linux, that works as well with that mechanism as Linux. Everything in Linux is either a config file or a CLI tool. Now, that was its main drawback five minutes ago. This was the reason people didn't like Linux. It's like it's all config files and CLI tools. What great irony that the universe has played it upon us that now the drawbacks of Linux five minutes ago are now its major selling points. This was one of the things I thought I was stuck for a weekend with a Mac four months ago. I thought I had a computer at the place I was going that was a Linux machine, so I didn't bring my laptop, and I found out when I arrived I only had a Mac Mini. So I was gonna make the best of a bad situation here and, Set up my Mac in some of the ways I've been thinking about with, With Linux. And you can actually do a lot now. Homebrew has gotten really quite good. Homebrew is the missing package manager for the Mac, and no one has done more to move the Mac forward in terms of ease of setup. But still something as simple as Raycast, I don't know if you've used that. That's the- There's no config file that you can just access. You have to go into the GUI, export a file, then take that file, I don't know, in your freaking backpack on a USB key. And then you can import it somewhere else.