Case study 02 · Agent systems

The AI OS

A second brain that works while I sleep. What I save during the day becomes structured, scored notes; an agent consolidates them every night; my other AI agents search it before they answer me.

Role
Design, build, operate
Runs
Five runs every day, across four systems
Stack
Python · Node · PowerShell · Claude Code · Obsidian
Status
In daily use · core open source

The problem

I learn a lot from short videos: a new tool, a prompt technique, a business idea. I saved hundreds of them and remembered almost none. Saving isn't learning, and a note nobody links to is a dead note.

I wanted my knowledge to compound on its own, and to be usable by my AI agents, not only by me.

The system

The night shift

At 00:30 a scheduled Claude Code agent reads the day's journal and changes, consolidates decisions and lessons into the right notes, and fixes links. It runs inside hard limits: an explicit time window, an 18-minute timeout, one retry and a lock file. If it fails, it leaves a failure trace in the next day's journal. The runner also checks for an explicit NIGHTLY_OK line, so in the morning “nothing to do” is never confused with “didn't run”.

Decisions worth telling

Numbers

8.3klines of Python, 22 scripts
1,080notes in the vault, 2026-09-26
820ideas captured, 715 scored
16stages in the pipeline
3.25links per note, 2026-09-26
682→3items left in the inbox

Vault counters dated 2026-09-26 are the night agent's own, published as last-run.json. The undated figures are point-in-time counts from the build and are not refreshed automatically.

It runs twice a day (09:00 and 21:00), the nightly agent at 00:30, the profile rebuild at 07:17 and the backup at 23:00 — five runs, four systems. The vault itself stays private. The reusable core is open source as nightshift: pipeline, contract-aware vault tools and the night-shift runner, with an offline demo that runs in under a minute.

← CortexNext: HAO →