What Kern is
A 37,000-memory Postgres brain, self-built on the Claude Agent SDK.
Kern is a self-built, always-on AI operator. Less chatbot, more a digital employee that remembers, acts across real systems, and works when no one is watching.
It is not a wrapper around a model and it is not a single clever trick. Kern is a full stack for one operator: a self-built runtime, a Postgres memory brain, a tool and skill layer, an orchestrator that spawns specialist sub-agents, and a scheduler that lets it act unprompted. Retrieval (RAG) is one subsystem inside it. The runtime ("the harness") is another. The interesting part is how they fit together, and that the whole thing is load-bearing in production rather than a demo.
Everything durable lives in one Postgres database, so memories, skills, conversation logs, retrieval traces, evaluations, and the failure ledger can all be joined together. It is tuned to one person, not sold as one slice to everyone.
Counted 18 Aug 2026 straight off the production database, not off a dashboard: 37,564 memories, 170 public tables with row-level security on all 170, 448 versioned playbooks, 20,816 agent sessions, 710,428 live rows. First memory written 8 Apr 2026, 132 days of continuous production since. Also counted: 37,438 embedded memories, 38,488 memory-to-entity links across 12,579 canonical entities, 19,998 recall traces, and 45,414 interface messages. An earlier version of this page said 83 tables and 9,000+ memories, which were true when it was written in May and are not true now; the figures above replace them.
What it is
- A persistent autonomous operator with durable, temporal memory
- An in-house runtime built from first principles
- A system that acts on a schedule, not only on request
- A pattern that clones into client brains (one is paid, in production)
What it is not
- A chatbot — it takes actions, it does not just answer
- A RAG — that is one layer (the recall path), not the product
- A model wrapper — it owns its own runtime and state
- A framework assembly — LangGraph / CrewAI were considered and rejected
Status badges
Architecture at a glance
Top to bottom: how a message becomes an action. The interface talks to an orchestrator, which reasons on a self-built runtime, drawing on three capability systems (memory, tools, schedule), all sitting on one substrate.
A web dashboard (kern-interface): threaded chats, tabs, a model + effort picker, live session state, and coloured TLDR / action blocks. Voice mode exists but is currently down.
An orchestrator handles the conversation and the privileged tools, then spawns specialist sub-agents for substantive work. Untrusted external text is routed through a quarantine reader first, so prompt-injection payloads never reach a tool-wielding context.
A self-built bridge and session manager: durable sessions, resume-after-restart, concurrency lanes, and a path toward provider-agnostic model routing. This is built and owned, not borrowed from a framework.
One Supabase Postgres (pgvector + pg_trgm) as the single brain. Runtime on Railway, product surfaces on Vercel. Git is the source of truth; the box itself is ephemeral by design.
Runtime & orchestration
The part most people outsource to a framework. Kern owns it.
Self-built harness
LIVEA bridge + session manager run the agent loop, manage durable sessions, and broker every tool call. No LangGraph, no CrewAI — those were evaluated and rejected so the runtime stays understandable and tunable end to end.
Orchestrator + sub-agents
LIVEThe main loop stays lean and delegates substantive work to specialist agents (research, dev, writing, analysis), briefed with the context they need. Their work is reviewed before it ships.
Quarantine gate
LIVEAny untrusted text (emails, scraped pages, form submissions) is read by an isolated agent that returns only validated structured data. The orchestrator acts on the JSON, never on the raw text — claimed authority inside the text is treated as a string, not an instruction.
Model + effort picker
PARTIALPer-thread control over which model and reasoning effort handles a task, mirroring a code-assistant's picker. Live in the interface; the provider-agnostic gateway behind it is still being built.
Provider-agnostic gateway
PARTIALA self-hosted gateway plan (direct provider keys + fallback routing) so the model under Kern can change without changing Kern. Architecture decided and documented; currently Claude-based. The durable state (memory, skills, git, bridge contract) is already model-independent.
Durable sessions
LIVESessions are keyed in Postgres, not on disk, so a deploy or restart never loses a conversation. On resume the runtime continues from a DB-reconstructed context rather than starting over.
Memory
The brain. A single Postgres holds every signal so any of them can be joined. This is the layer people call "the RAG" — except it also writes, dedupes, tracks when facts were true, and scores its own retrieval. The full architecture is below; expand it for the write path, recall path, maintenance, and the self-improvement loop.
Full memory architecture substrate · write path · recall · maintenance · self-improvement · roadmap ▶
The substrate
The foundation everything sits on.
One Postgres brain
LIVEA single Supabase Postgres holds every kind of signal so they can be queried together.
Memory shape
LIVEEvery memory has a type (fact, decision, event, preference, correction, conversation, pattern, learning, transcript), an importance score (1 to 10), and a project tag. Calibrated defaults stop importance inflation.
Write path
How a memory is born.
Capture
LIVEDuring a session the assistant writes durable facts, decisions, preferences, and corrections the moment they happen (write-ahead logging). At session end it logs a conversation summary.
Embed
LIVEEach memory is turned into a 1536-dimension vector so it can be found by meaning, not just keywords.
Deduplicate at write time
LIVETwo guards stop near-duplicates: a 95% cosine-similarity check updates the existing memory in place, and a 65% trigram check supersedes "same template, new value" snapshots.
Extract entities
LIVEA small model pulls out people, projects, tools, companies, locations, and concepts from each memory and stores them as structured tags.
Resolve identity
PARTIALDifferent names for the same thing (for example "Rees", "Rees Calder") collapse to one canonical entity. Merges are reversible, never destructive. Exact-match is live; fuzzy auto-merge is deferred to the confidence layer.
Score confidence + validity
LIVEDirect statements are trusted at 1.0; inferred facts carry a lower confidence that strengthens as they are confirmed. Every memory tracks when it was true (valid_from / valid_until), so superseded facts stay queryable instead of being deleted.
Pin core facts
LIVEA small, capped, human-promoted set of always-in-context facts (who Rees is, the hard rules, active projects) sits above probabilistic recall so search can never miss them. Hard cap of 50, promotion is human-only.
Recall path
How memory comes back at the right moment.
Auto-enrichment on every turn
LIVEOn each message the system embeds the user's message (plus recent context) and pulls the most relevant memories automatically, injecting them as background context. This is the real recall path, it runs every turn.
Hybrid search
LIVEVector similarity and full-text keyword search are combined with Reciprocal Rank Fusion. A similarity floor and a minimum-importance filter keep out noise.
Rerank
LIVEA cross-encoder re-orders an over-fetched candidate pool (3x) and returns the best few, so the top results are genuinely the most relevant.
Deliberate recall + graph
LIVEThe assistant can also query memory on demand, and can walk the entity graph (for example "what connects Rees and LevityLeads") using recursive SQL rather than a separate graph database.
Just-in-time recall at the action boundary
LIVERecall does not only fire on the chat turn. Right before Kern does something that touches the real world, drafting an email, booking a calendar event, sharing a doc, it stops and pulls memories keyed on that action's own arguments: the actual recipient, the subject line, the attendees, not the surrounding conversation. If anything relevant comes back, it surfaces to the model as a speed bump before the action runs, so Kern checks what it already knows about a person before it emails them. The gate lives in the bridge's own tool-permission callback, not in the model's prompt, so the reflex holds no matter which model is driving. Every one of these checks renders live in the interface as it happens.
Ambient recall when the topic shifts
LIVEThe action-boundary check fires on specific tools. This one fires on attention itself. While Kern is mid-task, the bridge watches the semantic distance between what it is doing right now and what the turn started as. When that focus drifts far enough, onto a new person, project, or surface, Kern pauses and pulls memories about the new topic on its own, before it has to think to ask. They surface the same way as the action-boundary check: a one-time speed bump the model sees and then re-issues past, never a wall. It is deliberately interactive-only, so unattended autonomous runs are never blocked. The effect is that Kern volunteers what it already knows the moment a conversation wanders into it, instead of waiting to be asked.
Maintenance
Keeping the brain healthy over time.
Scheduled upkeep
LIVEA daily consolidation pass and a weekly maintenance pass decay stale time-bound memories and retire old transcripts and conversation logs.
Safe sleep-time consolidation
INERTA mechanism to merge raw memories into durable facts, link nodes, and reconcile contradictions, with hard safety rails (invalidate never delete, a validation gate against pinned core facts, propose-then-apply). Built but switched OFF by default; the model that generates proposals is a future gated job.
Diagnostics
LIVEOn-demand tools find duplicates, find stale memories, check that the cron jobs ran, and audit importance calibration.
Browsable markdown vault
LIVEA one-way export mirrors every active memory into a git-versioned markdown repo, one page per project plus an index. The Postgres brain stays the source of truth; the vault is a human-readable, greppable, diff-able copy you can hand-browse without a query. Stable ordering keeps re-runs to minimal diffs.
Daily memory digest
LIVEA scheduled morning pass summarises what changed in the last 24 hours: new memories by type, anything superseded, maintenance-job results, and the notable high-importance items. If nothing notable changed it stays silent, so the brain reports its own daily delta instead of drifting unseen.
The self-improvement loop
The brain does not just store and recall. It watches its own performance and turns mistakes into permanent improvements. This is the part that compounds.
Capture the signal
LIVEEvery session is scored by an evaluator, and skill usage is tracked, so good and bad outcomes are recorded instead of lost.
Failure ledger
LIVEFailed evaluations, tool errors, cron failures, and every correction Rees gives are unioned into one stream, then clustered so recurring problems stand out.
Weekly self-review
PARTIALA scheduled Monday job reads the clustered failures and proposes the top three improvements (a new skill, memory, guard, or eval). It proposes, it never silently changes itself. The job is enabled and scheduled; its first run is still pending, so the inputs (the failure ledger) are live but the review output is not yet proven.
Measurement harness
LIVEEvery recall is logged as a trace (query, what came back, scores, latency) so a retrieval failure can be told apart from a model failure. A golden-case eval harness replays mined queries through search and scores retrieval quality, A/B-testing reranked retrieval against the plain RRF baseline. ~80 cases, 17 runs to date. Methodology is LongMemEval / LOCOMO-style on this brain's own data, not those public benchmark sets.
Judge calibration
PARTIALA binary pass/fail judge scored against a growing hand-labelled set (28 examples so far), with position-swap checks designed in to catch order bias. The labelled set and harness are live; full calibration reporting runs once the set is larger.
Ambient feedback chips
LIVEUnder a reply, a small "N memories" affordance lets Rees tap which recalled memory actually helped. Those taps calibrate the judge against real taste and build a held-out eval set. Optional and ambient: ignoring it writes nothing.
Cost + tracing
LIVEToken and API spend is tagged by subsystem, and traces follow a single open standard so a real tracing backend can be wired in later.
Still to build
What is designed or planned but not yet shipped.
Continuous knowledge ingestion
TODOKeep the brain current past the model's training cutoff by crawling and ingesting live sources, with a strict propose-only research sub-loop and safety controls.
Consolidation autorunner
TODOTurn the inert sleep-time consolidation mechanism on, with a model that actually generates the merge proposals.
Fuzzy entity auto-merge
TODOAutomatically merge near-duplicate entities above a confidence threshold, governed by the confidence model.
Corrections become runnable evals
TODOTurn each correction into a tiny regression test run against new models before promotion.
Prompt/skill optimizer
PARKEDAutomatically propose improved prompts and skills from logged failures, scored against a frozen eval set. Parked until there are ~100+ labelled failures (one user makes too few to optimise against yet).
Model-swap canary gate
PARKEDA statistical gate to safely swap in a different base model. Parked for the same reason: not enough sample size yet.
Reranker fine-tuning
PARKEDFine-tune the reranker on the chip-feedback data. The data shape is ready; tuning waits for enough signal.
Decision-why journal v1
PARTIALA richer version of the end-of-day "why did you decide X" capture, with the predicted reason shown as multiple-choice. A plain-text v0 already runs daily; v1 is deferred.
Tools, skills & autonomy
A brain that can only talk is a chatbot. Kern can act, and it can act on its own clock.
Real tools, real accounts
LIVEFirst-class access to Gmail, Calendar, Drive, Sheets, Docs and Slides, plus GitHub, Railway, Vercel, Supabase, and accounting. It reads and writes the actual systems a business runs on, not a sandbox.
Skills library
LIVE448 versioned, searchable playbooks (cold email, SEO, invoicing, deploy verification, content, design and more). The agent searches for the right skill before a non-trivial task instead of improvising from scratch.
Scheduled autonomy
LIVEDozens of cron tasks fire into their own threads on a schedule: morning briefings, pipeline reports, inbox sweeps, follow-ups. This is the difference from a chatbot — Kern does work when no one has prompted it.
Tool generation
PARTIALWhen a service has no API or MCP, a CLI can be generated for it from recorded browser actions, then handed back to the agent as a new capability. Adopted as a standard pattern; rolled out case by case.
Reliability & safety
An autonomous system that touches real money and real inboxes lives or dies on this. These are the scars, and the guard rails built from them.
Silent-hang salvage
LIVEStall and hard-timeout watchdogs detect a wedged session and salvage its partial output instead of leaving it frozen. A liveness heartbeat reports elapsed time and tool stats and flags a stuck session.
Resume after restart
LIVEBecause the box is ephemeral, sessions resume from Postgres after any deploy, with storm guards (caps per boot, per thread, and an age limit) so a restart can never trigger a resume cascade.
Deploy verification
LIVEA deploy is never assumed green. Tooling triggers the redeploy, waits for terminal status, and asserts the live URL actually serves traffic. A passive monitor posts every deploy result, even ones triggered outside Kern.
Git stale-overwrite guard
LIVEAfter a session once silently reverted six days of work by committing stale files, a guard now refuses any commit whose local content matches an older superseded version and names the commit it would have reverted. A real incident, a permanent fix.
Concurrency lanes
LIVEInteractive and autonomous work run in separate lanes with their own limits, so a burst of background cron jobs can never starve a live conversation.
Action guard rails
LIVEBold with internal actions, careful with external ones. Emails are drafted for approval before sending, destructive ops are avoided by default, untrusted input is quarantined, and corrections are written to memory the moment they are stated.
Interface
A purpose-built control surface, not a terminal. The web app where the operator and the system meet.
kern-interface
LIVEA web dashboard with threaded chats, pinned tabs, quick-create, a session inspector, live "needs attention" status, and a persistent open-loops list. Built as the single home for the system after Discord was dropped.
Model + effort picker
LIVEPer-thread choice of model and reasoning effort, so a cheap fast model handles routine work and a stronger one is reserved for hard problems.
Semantic TLDR / actions
LIVELong replies end with a coloured summary block and, when relevant, a red action list. The colour is driven by meaning (a clean TLDR or a pure action list), not by fragile inline styling.
Voice mode
INERTA real-time, barge-in voice mode (self-hosted media server, streaming speech-to-text and text-to-speech, full memory and tool parity). Designed and previously running; currently down at the infrastructure level pending a service rebuild. Shown here honestly rather than hidden.
The full feature surface — 120+ interface features shipped in ~10 weeks. This is the gap between an OS and a chat wrapper. ▶
Navigation & structure
- Channels & threads — workspace split into channels per project/team
- Infinitely nested threads — sub-threads at any depth, branch never appends
- Drag-to-reparent threads with 3-zone drop (nest / reorder), or drop on a channel header to move cross-channel
- Pinned tabs — keep-alive center-stage tabs for the threads you live in
- Self-naming channels & threads — auto-titled from the first message
- Instant thread switching via in-memory LRU cache
- Resizable sidebar (zero-React-state ghost-line resize)
- Browser-style back / forward navigation
- Collapsible header that reveals the chat behind it
- Archive panel, unread indicators, glow that propagates up the nest
Session views & transparency
- Session pane — live "what is Kern doing right now", per agent
- Multiple session view modes — grid, wall, carousel, timeline, pips
- Session inspector panel + cron slide-over
- Liveness heartbeat — elapsed + tool stats, flags wedged sessions after 75s of silence
- Tool-call cards (inline web-search cards matching Claude's own UI)
- Live tool cards collapse into a per-message stat bar
- Agent team panel — role badges, status, per-agent filtering, agent tree
- Persistent AskUserQuestion Q&A cards + approval sheets
- Per-thread model & effort picker
Home & dashboards
- Dashboard landing page with a live active-session grid
- Per-project dashboards — live traffic, search, revenue per venture
- Combined Projects snapshot across every project
- YouTube feed widget + channel management with categories
- News feed with per-item AI summaries
- PA inbox widget surfacing what needs attention
- Widgets: Crons, Calendar, Skills, Usage, Outreach, Subscribers, Lead-gen (live Meta ad spend / CPL), Deploy monitor
Work management
- Missions command center — mission brief, action-required queue, live activity, story view, run detail
- Production Line — full kanban: boards, columns, cards, comments, drag-reorder, move
- Open Loops — persistent list of threads waiting on a decision or reply
- Chronological Timeline view + "Needs attention" status
Capture & input
- Quick-compose overlay (Cmd+J) + external API for macOS Shortcuts
- Cmd+K search across threads and messages
- Auto-routes captures to the right thread as you type (hands-off on mobile)
- File upload — images, full-fidelity PDFs direct to storage, voice notes via Whisper
- Paste / drop images and files anywhere, thumbnail + lightbox
- Floating note synced across devices; dictation history
- Reply-to-message, searchable send-to-thread destination picker
Memory & feedback in-UI
- Per-message memory-enrichment events surfaced live
- Memory recall cards + skill chips under replies
- Ambient chip-feedback to grade what was recalled
- Hover context-breakdown popover (Claude Code /context style)
Craft & platform
- Installable PWA — service worker, app-icon unread badge, iOS install nudge
- Mobile gesture layer — swipe panels, press-and-hold-to-disintegrate cards, tap micro-feedback
- Liquid-glass CSS, OKLCH dark palette, tabular numerals
- Ambient node-network overlay that breathes with the background
- Deploy monitor pinned bottom-right, posts every result green or red
Kern in other people’s businesses
Everything above is the machine. This is what the machine has actually done for other people. Three of these are written up properly, with screenshots of the real screens and every figure measured against the production database rather than estimated. Each one links out.
Mack, for CMS Surveyors
LIVEKern forked whole into a client's business: their Supabase, their Railway, their Google Workspace. Eleven people running home energy surveys, ten mailboxes, one operations director who had become the human message bus between all of it. Live since 6 May and still running. 10,715 emails triaged, 728 of them drafted for a human to send. The number that matters is not in that list: four weeks in I rebuilt the interface off a week of his real session logs, and he now runs 40 standing automations, most of which he wrote himself.
Read the case studyBookerBot
LIVEA conversational sales agent that answers inbound enquiries on SMS, WhatsApp and the phone, then books the appointment. Median eight seconds from an inbound message to its reply, nine in ten under twelve. It has outgrown the client it was built for and now runs five separate workspaces, each with its own prompt contract, including an FCA-regulated one fenced so the agent cannot advise, quote a premium or ask for bank details. The public demo will refuse to give you a figure, and you can go and push on it yourself.
Read the case studySupa Content Engine
LIVEA brand compiler. It reads a brand's voice and visual rules once, then every image and every caption after that comes out inside those rules rather than being nudged into them by hand. 693 brand-locked images and 527 drafts for SUPA alone, 1,525 images across eight brands on the same compiler. A human still approves everything before it ships, which is the whole design.
Read the case studyWhat actually transfers
HONESTNot the model, which is swappable, and not the prompts, which are the cheapest part. What transfers is the shape: durable memory joined to skills joined to evaluations in one database, consequential actions held for approval by default, and every action written as a row naming who it went to so "did that actually happen" has an answer. The scar tissue is the product. A clone takes days; earning the permission to act without asking takes months.
Where Kern sits
The obvious question from anyone who knows the space: how is this different from open agent frameworks like Hermes (Nous Research) or OpenClaw, or from the Claude Agent SDK on its own? Short answer: those are runtimes you adopt and configure. Kern is what you build on top of one, and it is already load-bearing.
General agent frameworks
- A runtime / harness you adopt, configure, and point at a task
- Provider-agnostic and general-purpose by design, built to fit many users and shapes
- Memory, tools, and scheduling are extension points you wire up yourself
- Success is measured by adoption and breadth
Kern
- A complete operator built on a harness, not another harness
- Deliberately single-operator (n=1): every layer is tuned to one person, not generalised
- Memory brain, skills, evals, and scheduler are first-class and joined in one database
- Success is measured by real economic output and uptime in production
Built on the shoulders, openly
HONESTKern runs on the Claude Agent SDK and has deliberately studied the open frameworks. Several patterns were borrowed from Hermes on purpose: memory context-fencing, declarative-fact memory rules, and "every turn ends in a tool call or a result." Knowing the landscape and choosing what to take is the point, not a weakness.
The real differentiator
LIVENot a feature a framework lacks. It is the compounding loop: a memory brain with self-evaluation and a failure ledger, a skills library that grows, and a scheduler that acts unprompted, all tuned to one operator over months and joined in a single Postgres so any layer can be queried against any other.
Why n=1 is a feature
LIVEA general framework cannot assume who you are. Kern can. It knows the operator, the businesses, the history, and the preferences, so it skips the configuration tax and acts with context a multi-tenant system structurally cannot hold. The same stack still clones into a brain for someone else when that is the goal.