GUARDIAN online · 24/7 · always-on 122 tools · 1 file · 479 commits

A personal AI memory system, built and run for one

The whole brain is one SQLite file.

Every general-purpose AI forgets you the second the conversation ends. Nine months ago I stopped treating that as normal and built the fix — a self-hosted memory my assistant reads and writes on every call, so it actually remembers who I am, what I’m working on, and what we already decided.

self-hosted · no cloud brain FastAPI + Next.js + MCP SQLite · FTS5 · sqlite-vec backup = cp

The bet

The industry’s answer to “AI forgets” is a bigger context window. That’s the wrong fix.

A bigger window is a bigger short-term memory. It’s still short-term memory — you still hand it everything up front, every time, and hope the important thing didn’t fall off the edge.

Guardian’s bet is different: an assistant with structured, queryable, persistent state is what turns an AI from a smart autocomplete into something that operates alongside you. Tasks have IDs, a status, and a comment thread that survives. Facts live in a knowledge graph with dates attached. Decisions are written down, immutable, with the reasoning still bolted on. The context window is where the model thinks. Guardian is where it remembers.

The readout · point-in-time

What “built and run every day” adds up to.

122
MCP tools
124
service modules
39
API routes
26
console pages
6,282
lines · MCP file
56
dependencies
18
db migrations
479
commits · ~9 mo
1file
the whole brain

Architecture

A model, one port, and a brain in a file.

MCP is the open standard for wiring a model to outside tools — a USB port for a language model. Claude is the client. Guardian is the server. On every call, my assistant reads the task board, queries memory, checks a fact, or records a decision through 122 tools.

Runs 24/7 on a dedicated Mac mini on a private home network. Not the laptop. Not a cloud host. A little always-on box that holds the entire working memory.

The decision that makes people flinch

Everyone reaches for four services. Guardian uses one file.

SQLite has full-text search built in (FTS5). A small extension, sqlite-vec, handles semantic similarity — and if it won’t load, a plain-Python fallback does the same math slower. Keyword search and meaning search, both, in one file, with zero services running.

The usual stack

Postgres Pinecone Redis a search service

Four moving parts before you’ve stored a single thought — and a bad afternoon reconciling them if anything ever tears.

Guardian

guardian.db
one file · offline · the whole brain
$ cp data/guardian.db backup.db

That one line copies every task, fact, and decision — nine months of context — anywhere I want it.

The 122 tools are the actual product

Anyone can stand up a database. The verbs are the point.

What makes Guardian useful is 122 specific, documented verbs the AI can perform against my life — grouped into subsystems that each solve a real problem. Most of that 6,282-line MCP file isn’t plumbing; it’s docstrings that teach the model the house rules.

Memory & graphtemporal
Facts as subject–predicate–object triples, each with valid-from / valid-to dates. Ask what was true as of March and get March’s answer.
Taskskanban
Full board, comment threads, file attachments, per-task change history, and estimate-vs-actual time tracking.
Projectscontainers
Long-running containers that are themselves measurable goals — each with an explicit, testable definition of done.
Intelreading
A separate “things to read” queue with its own lifecycle, plus a one-call bridge to promote a read into an action.
Factsreviewed
Human-reviewed core facts and graph triples. Rejected facts are excluded from every LLM context, never hard-deleted.
Documentsreview gate
A universal document store with a review gate, mirrored to an Obsidian vault I can read and edit on any device.
Decisionsimmutable
Once recorded, a decision can be superseded or reversed — never edited or deleted. The reasoning stays bolted on.
CompassTELOS
Goal alignment on Daniel Miessler’s TELOS framework. Every recommendation can be scored against my actual goals.
Brainsynthesis
A nightly-synthesized dossier, pulse, and portrait — the consolidated “who I am and what I’m focused on” brief.
Dreamer3am
Re-reads the week’s memories and derives new facts with lineage back to the exact memories they came from.
Councildeliberation
Several distinct personas argue a hard decision across three rounds — and report the disagreement instead of faking consensus.
Monitors & promptsstanding
Standing watchers and a reusable prompt library that auto-fills from the dossier, goals, and facts.

Worth knowing about

Three pieces that are more than CRUD.

Nightly · 3am
The Dreamer
Every night a job re-reads the last week of memories and derives new facts two ways. Deductive — something logically implied, needing at least two sources, starting at 70% confidence. Inductive — a pattern across at least three, starting at 50%. Every derived fact keeps a pointer back to the memories it came from, so if a source turns out wrong I can find every conclusion built on it. A clean-room take on a pattern from Honcho — rebuilt from the idea, not their code, because their license would’ve forced a relicense.
Hard decisions
The Council
For a genuinely hard call, Guardian doesn’t average model outputs and call it consensus. It runs several distinct personas on one strong model through three rounds: each stakes out a position, then each names the others and says where they disagree, then a chair writes a synthesis into three buckets — converged, still contested, recommendation. Fake consensus is worse than an honest split, so the code refuses to manufacture it.
RFC 5545 · completion-driven
Recurring tasks
A recurring task carries a raw recurrence rule — the same RRULE format your calendar uses — and nothing else. No scheduler, no cron. When you complete the task, one function computes the next occurrence and spawns it. A task only comes back because a human actually finished the last one. Simple — and it hides three genuinely nasty correctness bugs, all now pinned by tests.

Incident log

The bugs I’m actually proud of.

Four production incidents taught me more than any feature I shipped. None of them are the AI being dumb. Every one is ordinary systems engineering — token limits, API contracts, a shared connection that lied, state that re-anchors when you’re not looking.

was: silent data loss fixed The writes that said “saved” and lied 2026-07-23

For months, tasks would quietly revert. I’d reassign one back to myself, the tool would confirm it, I’d read it back and see my own name — and hours later it was back on the agent. Twenty-six tasks piled up on one queue I’d personally cleared, over and over. The cause: SQLite opened with one connection shared across every thread in the process. Under load it wedged mid-transaction, and every write on top of the wedge lived only in memory. The same connection could see its own uncommitted changes, so the read-back looked fine — then a restart rolled it back and the write was simply gone. It had never touched the disk.

lesson  Never trust a system’s own report that it saved. A success message and a correct read-back can both be theater when they come from the same broken connection. Check the disk. Fix: a fresh connection per unit of work + write-ahead logging.

was: silent staleness fixed Two weeks my AI’s self-summary silently froze

Guardian keeps a nightly-regenerated dossier. One day I noticed it hadn’t moved in two weeks — no error, no alert, nothing in the logs. The synthesis step had an 8,000-token output cap, and the dossier had quietly grown past it. The model hit the cap, stopped mid-thought, and a guardrail I’d written correctly refused to store a truncated result. So every night for two weeks it generated a too-long summary, refused to save it, and failed silently. The guardrail worked exactly as designed. The silence was the bug.

lesson  A guardrail that fails safe still has to fail loud. Now a truncated synthesis screams instead of shrugging.

was: upstream break fixed A model update broke every summary I generate

A newer version of the model started hard-rejecting a parameter I’d passed on every synthesis call for months — temperature, the randomness knob. Overnight, a routine model bump turned a parameter that had always worked into a 400 error and broke every code path that generated a summary. The fix was mechanical. The lesson wasn’t.

lesson  When you depend on a model you don’t control, a silent contract change on their side is a production outage on yours — and you find out at 3am.

was: infinite loop fixed The five-times task that ran forever

A recurrence limit of “do this five times” — COUNT=5 in the rule — would silently reset to five on every single respawn, because each new copy re-anchored its own start date and the count came along untouched. Miss one line and you’ve built a task that promises to happen five times and instead runs forever.

lesson  I’ll take a bug I can explain in one sentence over a mysterious one any day. Decrement the count by hand on each child.

What I’m honest about

The true sentence beats the flattering one.

The README is stale
It still describes Postgres and a memory library called Mem0 — what I started with. The live system is SQLite, full stop. I traced the memory path end to end to be sure. The docs just haven’t caught up.
Tests are targeted, not total
Nine test files aimed dead-on at the logic that’s hard to verify by eye — recurrence math across DST, the task rules, time tracking. Not blanket coverage of 124 modules, and I won’t pretend it is.
It has one user: me
User isolation is baked in from the schema up — a real design choice — but it’s proven at n=1. “Designed for isolation, run by one person” is the true sentence. “Multi-user” would be a lie.

Why this matters

The frontier worth caring about isn’t a smarter model. It’s memory and state.

The models are already smarter than the scaffolding we put around them. Almost none of the hard parts of Guardian are AI — they’re ordinary systems work pointed at a new problem. That’s where I’d tell anyone building on an LLM to spend their time. The model is the easy part now.

This showcase’s facts were pulled live from Guardian’s own repo. Guardian runs. I use it every day. It remembers me.