Mosaic
A framework for AI that advises. Humans still decide.
Inspiration
A senior leader once told me AI is the new TCP. I think he was right. It is that foundational, and we are still arguing about it on the internet.
There is a lot of negativity around AI right now. Some of it is fair. Most of it misses the point. AI is not here to replace the human in the chair. It is here to supplement us, to take the noise off our plate so we can do the part that actually needs a human. That belief is the whole reason Mosaic exists.
I work in cyber security, so "high stakes" is my day job. But I wanted to build something with stakes you can feel, something that touches lives rather than dashboards. Emergency operations became the reference domain. The framework does not care about the domain. The pain of getting it wrong is universal.
What it does
Mosaic is a framework for building multi-agent systems where the AI proposes and a human disposes.
Three agents do the work:
- Luna reads raw, messy incoming events and interprets them.
- Terra analyzes what is happening.
- Sol briefs the operator.
They feed a single, live operating picture. Every handoff is recorded as intent, never fired off silently. The AI never executes on its own. That is not a promise in a README. It is baked into the architecture.
It runs live on OpenAI when a key is present, replays banked responses deterministically when it is not, and falls back to fixtures offline. So you can demo it on a plane and not get a surprise bill.
How I built it
Solo. I sat on the idea for a bit, started coding on Saturday, and had it running four days later.
- Go for the backend, with extensibility as the first design constraint rather than an afterthought.
- A pluggable event spine built on Postgres, with the seams deliberately shaped so Kafka can drop in later without a rewrite.
- OpenAI for the three agents, using strict structured output.
- A record and replay cassette layer so demos are deterministic and cheap.
- A Svelte reference UI, because the contracts deserve a face.
- Deployed on Cloud Run and Supabase, with Playwright end to end.
The goal was never a one-off demo. It was a framework other people could pick up and adapt without fighting me for it.
Challenges
The event spine was the big one. I rewrote it to sit solidly on Postgres while leaving deliberate room for Kafka. Doing that properly, so it is a foundation and not a demo prop, took real thought.
OpenAI's strict schema mode had its moments. Type inference on const and enum leaves did not behave the way I first expected, and Luna kept quarantining perfectly reasonable events because they lacked the identifiers it wanted. The fix was to enrich the fixtures, then re-record the whole cassette bank.
The model documentation was hard to read. I burned real time just trying to pin down API shapes and response formats. It genuinely drove home how much a great technical writer is worth. (I say this as a technical writer of nearly twenty years. OpenAI, my inbox is open.)
What I learned
Good documentation is not a nicety. It is the difference between shipping on Tuesday and shipping next week. I already believed this. This project made me feel it.
And designing for extensibility up front costs you a little on day one and saves you everything after.
What's next
More pluggability. I want the domain seam clean enough that someone can bring their own high-stakes problem, wire in their agents, and have Mosaic just work. Kafka transport is next.
AI should make our lives better. Mosaic is my small argument for how.## Inspiration
Built With
- claude
- codex
- docker
- gcr
- go
- grok
- postgresql
- supabase
- svelte
- vite

Log in or sign up for Devpost to join the conversation.