← All topics

AI Agents & Cognition

What machine cognition can and can't do (agents, memory, reasoning), and the human judgement that still has to sit on top of it.

4 pieces
Research

The Cognitive Loop

This paper describes Citadel, a cognitive architecture that gives a large language model persistent memory, causal reasoning, self-modification, and autonomous action across weeks and months of continuous operation. The system assembles ~25 context signals per inference call, filters them through a learned attention gate, implements type-specific memory decay, maintains a 500+ edge causal graph fed by live economic data, and rewrites its own identity weekly. 158 tools across 11 integrations. Two years of continuous production use. This paper reports on its design, the failures that shaped it, and the operational characteristics of a system that modifies its own cognition.

Research

The Semantic Firewall

This paper describes a reading companion built for one person: a grandfather with Alzheimer's disease who loves books but can no longer follow the page. The system processes EPUBs through a two-pass AI pipeline (Gemini for structural analysis, Claude for warm prose), generates per-scene cognitive metadata, and enforces a Semantic Firewall that is constitutionally incapable of revealing content beyond the reader's current position. A three-strategy position tracking system (percentage range, Jaccard text similarity, linear estimation) matches the visible page to narrative context without modifying the original book file. A CSS injection layer called the Trudy Protocol overrides publisher typography to enforce left-aligned, animation-free, footnote-hidden layouts optimised for cognitive accessibility. A prompt-level spoiler prevention system bans adversarial vocabulary ('Antagonist', 'Villain', 'Hero') and constrains character descriptions to first-impression social roles. The architecture is offline-first: after a single download, the entire reading experience, including AI-generated summaries, character timelines, and chapter maps, works without internet. 7,556 lines of TypeScript and Python. Two books processed. One user. This paper reports on the neuroscience that informed the design, the architectural decisions that emerged from it, and what building for an audience of one teaches you about building for anyone.