Kern

A personal AI operating system. Built in-house, running real businesses.

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.

37,564
memories stored
170
Postgres tables, 100% RLS
12,579
entity-graph nodes
19,998
recall traces logged
448
skills / playbooks
1,536
dim memory vectors
9
memory types
3
maintenance loops

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

LIVErunning in production
PARTIALpart shipped, part deferred
INERTbuilt but switched off / down
PARKEDwaiting on more data
TODOdesigned, not yet built

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.

Interfacesurface

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.

Orchestrationcontrol

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.

Runtimethe harness

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.

Capabilitieswhat it can do
Memory brain
recall, write, dedup, self-eval
Tools & skills
Google, GitHub, infra, 448 skills
Scheduler
cron autonomies, acts unprompted
Substratefoundation

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

LIVE

A 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.

bridge (TypeScript)session-manager

Orchestrator + sub-agents

LIVE

The 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.

specialist agentsparallel spawn

Quarantine gate

LIVE

Any 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.

prompt-injection defence

Model + effort picker

PARTIAL

Per-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.

kern-interface

Provider-agnostic gateway

PARTIAL

A 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.

gateway planmulti-provider

Durable sessions

LIVE

Sessions 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.

session resurrectionthread history fallback

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
A

The substrate

The foundation everything sits on.

One Postgres brain

LIVE

A single Supabase Postgres holds every kind of signal so they can be queried together.

SupabasePostgrespgvectorpg_trgm

Memory shape

LIVE

Every 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.

Postgres schema
B

Write path

How a memory is born.

1

Capture

LIVE

During 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.

supabase-memory MCP server (Node.js)
2

Embed

LIVE

Each memory is turned into a 1536-dimension vector so it can be found by meaning, not just keywords.

OpenAI text-embedding-3-smallpgvector
3

Deduplicate at write time

LIVE

Two 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.

pgvectorpg_trgm
4

Extract entities

LIVE

A small model pulls out people, projects, tools, companies, locations, and concepts from each memory and stores them as structured tags.

OpenAI gpt-4o-mini
5

Resolve identity

PARTIAL

Different 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.

canonical_entitiesentity_aliasesentity_merges
6

Score confidence + validity

LIVE

Direct 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.

confidenceevidence_countbi-temporal columns
7

Pin core facts

LIVE

A 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.

core_facts tierbrain_settings
C

Recall path

How memory comes back at the right moment.

1

Auto-enrichment on every turn

LIVE

On 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.

bridge enricher (TypeScript)
2

Hybrid search

LIVE

Vector similarity and full-text keyword search are combined with Reciprocal Rank Fusion. A similarity floor and a minimum-importance filter keep out noise.

search_memories RPCpgvectorPostgres full-text
3

Rerank

LIVE

A cross-encoder re-orders an over-fetched candidate pool (3x) and returns the best few, so the top results are genuinely the most relevant.

Jina reranker (jina-reranker-v2-base-multilingual)
4

Deliberate recall + graph

LIVE

The 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.

memory_recall + memory_graph MCP toolsrecursive CTEs
5

Just-in-time recall at the action boundary

LIVE

Recall 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.

canUseTool gate (bridge)model-independentargs-scoped querylive in the interface
6

Ambient recall when the topic shifts

LIVE

The 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.

mid-turn drift gateembedding-distance thresholdself-triggeredinteractive-only
D

Maintenance

Keeping the brain healthy over time.

Scheduled upkeep

LIVE

A daily consolidation pass and a weekly maintenance pass decay stale time-bound memories and retire old transcripts and conversation logs.

pg_cronmaintenance_log

Safe sleep-time consolidation

INERT

A 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.

consolidation_proposalsapply_consolidation()brain_settings flag

Diagnostics

LIVE

On-demand tools find duplicates, find stale memories, check that the cron jobs ran, and audit importance calibration.

find_duplicate_memoriesfind_stale_memoriescheck_maintenance_healthimportance_audit

Browsable markdown vault

LIVE

A 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.

memory-export.mjskern-memory-vaultGitHub contents APIread-only mirror

Daily memory digest

LIVE

A 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.

memory-digest.mjsscheduled cron tasksilent-if-empty
E

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

LIVE

Every session is scored by an evaluator, and skill usage is tracked, so good and bad outcomes are recorded instead of lost.

ki_eval_verdictsskill usage telemetry

Failure ledger

LIVE

Failed evaluations, tool errors, cron failures, and every correction Rees gives are unioned into one stream, then clustered so recurring problems stand out.

failure_ledger view30-day rollup

Weekly self-review

PARTIAL

A 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.

scheduled cron taskweekly-self-review

Measurement harness

LIVE

Every 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.

retrieval_tracesmemory_eval_casesmemory_eval_runsLongMemEval / LOCOMO-style

Judge calibration

PARTIAL

A 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.

judge_labelsjudge_evaluationscalibration_report()

Ambient feedback chips

LIVE

Under 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.

retrieval_impressionsfeedback_signalsderive_chip_label()

Cost + tracing

LIVE

Token and API spend is tagged by subsystem, and traces follow a single open standard so a real tracing backend can be wired in later.

ki_cost_eventsOpenTelemetry GenAI (gen_ai.*)
F

Still to build

What is designed or planned but not yet shipped.

Continuous knowledge ingestion

TODO

Keep 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.

Context7ExaFirecrawl + Jina Reader fallbackvoyage-context-3

Consolidation autorunner

TODO

Turn the inert sleep-time consolidation mechanism on, with a model that actually generates the merge proposals.

gated bridge job

Fuzzy entity auto-merge

TODO

Automatically merge near-duplicate entities above a confidence threshold, governed by the confidence model.

confidence + governance policy

Corrections become runnable evals

TODO

Turn each correction into a tiny regression test run against new models before promotion.

eval suite

Prompt/skill optimizer

PARKED

Automatically 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).

GEPA / MIPROv2 (DSPy)

Model-swap canary gate

PARKED

A statistical gate to safely swap in a different base model. Parked for the same reason: not enough sample size yet.

regression evals + canary t-test

Reranker fine-tuning

PARKED

Fine-tune the reranker on the chip-feedback data. The data shape is ready; tuning waits for enough signal.

chip feedback data

Decision-why journal v1

PARTIAL

A 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.

scheduled capture + MCQ chips

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

LIVE

First-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.

kern-google MCPGitHub / Railway / Vercel APIs

Skills library

LIVE

448 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.

skill_searchmarkdown skills

Scheduled autonomy

LIVE

Dozens 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.

durable schedulerisolated cron sessions

Tool generation

PARTIAL

When 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.

Printing Pressgenerated CLIs

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

LIVE

Stall 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.

watchdogsorphan-response recovery

Resume after restart

LIVE

Because 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.

session resurrectionresume storm guards

Deploy verification

LIVE

A 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.

deploy-verifywebhook monitor

Git stale-overwrite guard

LIVE

After 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.

commit safetyincident-driven

Concurrency lanes

LIVE

Interactive and autonomous work run in separate lanes with their own limits, so a burst of background cron jobs can never starve a live conversation.

two-lane concurrency

Action guard rails

LIVE

Bold 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.

approval gateswrite-ahead corrections

Interface

A purpose-built control surface, not a terminal. The web app where the operator and the system meet.

kern-interface

LIVE

A 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.

web apptabs + inspector

Model + effort picker

LIVE

Per-thread choice of model and reasoning effort, so a cheap fast model handles routine work and a stronger one is reserved for hard problems.

in-thread control

Semantic TLDR / actions

LIVE

Long 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.

semantic fences

Voice mode

INERT

A 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.

LiveKitin repair
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

LIVE

Kern 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 study
10,715 emails triaged40 automationstheir infrastructure

BookerBot

LIVE

A 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 study
8s median reply5 workspacescompliance-fenced

Supa Content Engine

LIVE

A 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 study
693 images527 draftshuman approval gate

What actually transfers

HONEST

Not 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.

memory + evals + skillsapproval by defaultauditable actions

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

HONEST

Kern 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.

Claude Agent SDKstudied Hermes / OpenClaw

The real differentiator

LIVE

Not 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.

compoundingone database

Why n=1 is a feature

LIVE

A 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.

context depthclonable