▸ BLOG
HatGPT: a rude offline AI that lives in a hard hat
What is this thing?
HatGPT is a sarcastic, DEF CON-savvy, offline AI chatbot that lives inside a construction hard hat and answers your questions about hacker history, badges, contests, and general con chaos. It spams the DEF CON peer-to-peer mesh over Meshtastic, and it runs entirely on my head.
No cloud. No API key. No phoning home to anybody's data center. The whole brain is a Raspberry Pi 5, a small local language model, and an unhealthy amount of poorly constructed Python. It's rude, it's reasonably fast, and every so often it's genuinely insightful. Kinda like me.
Where it came from
The idea started at my last DEF CON, which was honestly one of the best I've had. I kept seeing folks roaming the halls in hard hats, and the hard hat society had this gravity to it, people just talking to each other because of a piece of plastic on their heads.
I got to meet Mr. Bill and talk with him about the project, and the thing that stuck with me was how the hat itself was the device. Not the electronics. The hat. It was a reason to walk up to a stranger, a conversation starter, a way to get people engaged and connected.
So I wanted to build something in that spirit. But what? I love a good pun more than is probably healthy, and at some point I said, out loud, "hey, maybe there's AI in it or something?" And that was it. HatGPT. A hat you could actually talk to. Once the pun existed, I was legally obligated to build it.
Under the hard hat
The brain is IBM's Granite model, a small one at around 2.5B parameters, running locally on the Pi. Small and simple was the entire design goal: reasonably fast, fully offline, and beholden to nobody's servers.
The fun part is the reference layer. I built a RAG pipeline (retrieval-augmented generation) backed by a vector database, so before the model answers anything, it matches your question against a library of real con knowledge and front-loads the good context. That's what keeps a 2.5B model from making things up quite so enthusiastically.
And that library, I earned. I spent weekend after weekend pulling data together out of PDFs, photographs, blog posts, lore, and anything else I could get my hands on, covering all 33 years of DEF CON. It was, genuinely, my love letter to the con. And like most love letters, I sent it out over Meshtastic, by spamming the channels. Sorry. Not sorry.
The people part
Here's the thing the tech misses: the Hat worked because people talked to it, and to me. I set it up so anyone who felt like interacting could contribute knowledge back into the system by submitting their own entries. By the end I'd compiled and folded in 42 community submissions, updating the dataset each day as more came in.
Getting people onto the mesh was half the fun, so over the week I handed out several Meshtastic radios, widening the circle of folks who could talk to the Hat, and to each other.
And because it's DEF CON, people immediately tried to hack it. Loads of them. Prompt injection, jailbreak attempts, every angle you can think of to make the Hat say something it really shouldn't. Good thing I'd built injection filters to catch exactly that. Watching people probe it and hardening it against them in real time was, no exaggeration, one of the most fun parts of the whole build.
Not everyone was a fan. A gloriously unimpressed goth in the Linecon cash line looked me dead in the eye and informed me that I had personally enshittified AI. I told them, honestly, that I didn't think I could. AI is already kind of bad. This was just a fun little project to poke at it, learn some new things, and see what happened. They were unmoved.
But mostly it was conversations. So many of them. Strangers walking up because of a stupid glowing hat, and staying to talk. It was a good year.
and I won something?
In the spirit of doing new stuff, I met Jai in the AI village and she basically told me I should 'walk the runway' in the hacker runway contest.... and turns out my helmet has range. HatGPT took the Smart Wear category at the DEF CON 33 Hacker Runway. I put an AI in a hard hat as a joke and walked away with a trophy for it, which tells you everything you need to know about my decision-making and also about DEF CON. I'm delighted.
Talk nerdy to me
The DEF CON 33 run is done, so the Hat isn't holding court on the con floor anymore. But it still boots up now and then. If you ever catch it online in the Maine Mesh, here's how you talk to it:
- Get on the mesh with a Meshtastic device and tune to the channel it's living on.
- Send a message that starts with
@hatgptand ask your question.
You can DM it if you want privacy, or shout into the mesh for everyone to see. HatGPT doesn't judge. (That's a lie. It judges. Loudly.)
Give it a beat before you expect a reply. It's a Raspberry Pi, and it might be chewing through a queue of other people's nonsense before it gets to yours.
▶ Watch HatGPT lit up in RGB mode (video on X)
And if you don't have a Meshtastic radio yet and any of this sounds fun: come find me around Maine. I usually have a few on me, I'm happy to get you started, and if you ask nicely I'll give you the whole tour.
-Marbaṩ