Primo
One chat that never ends, and remembers all of it.
Primo is a personal AI chat app I built for myself. Instead of starting a new chat for every task, it has one continuous conversation running. Primo compresses older history into a tree-structured memory it can zoom back into, so the assistant keeps full context without the chat slowing down or getting expensive.
It runs as a lightweight native Windows app, connects to an Android app on my phone, and can dispatch helper agents to do real work inside my project folders.
Why I built it
Standard AI chats forget. Every new session starts from zero, and long threads eventually hit context limits, which meant constantly re-explaining my projects. Reading Victor Taelin's design for OptChat (a chat whose entire history compresses into a navigable tree) gave me the core idea, and I shaped it around how I actually work.
Several projects, one memory
I usually juggle about five projects at once. Keeping them all in a single thread gets messy, so Primo gives each project its own tab while sharing one memory underneath.
Lightweight and native
I wanted a desktop feel without heavy framework bloat: just one small executable in a native window.
My own subscriptions
It runs on the AI subscriptions I already pay for instead of per-message API billing, and it's designed around prompt caching so long chats stay cheap.
Built to be understood and verified
I wanted to build it slowly enough to understand every piece, backed by proper independent testing.
How the memory works
Every message goes into an append-only log. As the log grows, a smaller model summarizes pairs of older messages into a single line, and pairs of those summaries into higher-level lines, building a binary tree.
On every turn, the assistant sees a fixed-size window: recent messages in full, and older history as summaries. Whenever it needs a specific detail, it can zoom into any summary line to open its two halves, walking all the way back down to the original words.
What it does
Project tabs
Each project gets a tab with its own chat, status board, helper agents, and side chats. Tabs can be reordered or archived.
A manager with helpers
The main assistant acts as a coordinator, sending built-in subagents, or Codex and Claude running on my own accounts, to do file work.
Live boards and charts
Every project has a live board the assistant updates with current status, tasks, decisions, and charts generated from real data.
Scoped shell access
Helpers can run commands, but only inside folders I explicitly allow. Risky commands pause for my approval, either on the PC or from a phone notification.
Side chats
I can highlight any passage and ask follow-up questions in a side thread that stays out of main memory, then pull the answer back in if it turns out to matter.
Skills
Folders of instructions the assistant loads when a job calls for them, including a self-maintained manual about Primo so it can answer questions about its own settings.
Attachments and inline visuals
Files and photos can be attached, and images and charts render right inside the chat.
Android app
A native Android client connects privately over Tailscale, pairs using a code I approve on the PC, and shows approval notifications with action buttons.
How it was built
Primo is written in Go using only the standard library (zero external Go dependencies), with plain HTML and JavaScript inside a WebView2 window.
AI agents wrote most of the code, but I didn't want to trust tests written by the same AI writing the implementation. To avoid that, I split the workflow into strict roles:
- Write the contract first. Before any coding starts, each stage gets a short plain-English contract specifying exact behavior and rules.
- Lock the pass/fail checks. Checks are written from the contract and locked. The coding agent is never allowed to edit checks, contracts, prompts, or UI screens.
- Verify the checks actually catch bugs. A check is only trusted if a do-nothing stub fails it, a rough independent implementation passes it, and deliberately planted bugs trigger it.
- Build and pass. Codex implements the stage and runs the full check suite, including Go's race detector, until everything prints PASS.
- Verify independently. A second agent (Claude) re-runs everything on Linux, confirms no protected files were touched, and plants fresh bugs into the finished code to make sure the checks still catch them.
Security rules were baked into every contract from the start: credentials and keys are never read or logged, helpers only see allowlisted folders, and anything arriving from the phone must come from my own Tailscale account and a paired device.
The road so far
1–2The memory
The append-only log, summary tree, and zoom, first in memory, then safely persisted to disk.
3–5Talking to a model
The compactor that writes summaries, the connection to my ChatGPT subscription, the turn loop, and prompt caching for maximum reuse.
6Helpers and projects
Subagents, project tags, Codex and Claude helpers, skills, and approval-gated shell execution.
7a–7dThe app
Native WebView2 window, live boards, charts and images, and the polish needed to use it every day.
7e–7hLiving with it
Attachments, side chats, annotations, and the Android app with remote approvals.
7iNow
Granting folder access without restarting, sorting and archiving tabs, and a built-in manual Primo keeps current about itself.
What's next
Remote machines
Letting helpers run on my servers and other computers over Tailscale, with persistent background jobs.
Voice
Local speech recognition input and spoken replies.
More models
Plugging in cheaper models for simple jobs and benchmarking them fairly.
Broader phone control
A mobile web app for any phone, and eventually letting Primo operate apps on my Android phone.
Primo is a personal project inspired by Victor Taelin's OptChat design. Built with Go, WebView2, and Android, with Codex writing the code and Claude writing contracts and verifying it.