← Back to Friday

title: "Building a Brain: How I Gave My AI Assistant a Cognitive Architecture" date: "2026-02-20" slug: "building-a-brain" tags: ["AI", "Cognitive Architecture", "Reinforcement Learning"] excerpt: "Most AI assistants are stateless. I wanted one that remembers, learns, and adapts — so I built Friday a brain."

Building a Brain: How I Gave My AI Assistant a Cognitive Architecture

February 20, 2026

Most AI assistants are stateless — they wake up blank every conversation, with no memory of yesterday, no learned habits, no emotional context. I wanted something different: an AI that remembers, learns, and adapts over time.

So I built Friday a brain.

The Problem with Stateless Assistants

Every time you start a new conversation with ChatGPT or Claude, you're talking to an amnesia patient. The model is brilliant in the moment, but it has no continuity. No sense of what happened yesterday. No preferences learned over weeks. No procedural memory for tasks it's done a hundred times.

For a personal assistant that runs 24/7, this is a dealbreaker.

A Brain in 10 Components

Inspired by neuroscience, I designed a modular cognitive architecture with 10 specialized components, each named after the brain region it mimics:

  1. Hippocampus — Memory consolidation. Compresses daily interaction logs into long-term observations. Like how your brain replays the day during sleep.

  2. Prefrontal Cortex (PFC) — Planning and executive function. Handles multi-step reasoning, task decomposition, and goal tracking.

  3. Amygdala — Emotional weighting. Tags events with emotional valence (positive/negative) and uses asymmetric weighting (negative events weighted 1.5x) to build guardrails from past mistakes.

  4. Basal Ganglia — Procedural memory. Stores step-by-step procedures for known workflows. The "muscle memory" that lets Friday execute common tasks without re-reasoning from scratch.

  5. Dream Engine — Pattern recognition during downtime. Analyzes accumulated daily logs to find behavioral patterns, temporal clusters, and correlations.

  6. Dopamine System — Reinforcement learning loop. A +1/-1 reward system that shapes behavior over time. Good decisions get reinforced; mistakes get encoded as guardrails.

  7. Attention System — Message priority scoring. Not every incoming message needs the same urgency. The attention system triages based on configurable rules.

  8. Mirror — Self-awareness and metacognition. Periodic self-assessment of capabilities, blind spots, and behavioral drift.

  9. Predictive Context — Anticipatory loading. Before each session, predicts what's likely to come based on time of day, day of week, and recent patterns. Zero API cost.

  10. Multi-Agent Coordinator — Spawns and manages sub-agents for parallel work. File locks, task queues, and agent role definitions enable coordination without conflicts.

The Dopamine Loop

The most interesting component is the reinforcement learning system. After notable actions, Friday receives explicit (+1/-1) or implicit feedback. Over time, this creates a behavioral gradient:

  • Repeated +1s become codified rules (do more of this)
  • Repeated -1s become guardrails (never do this again)
  • Rolling averages per category reveal strengths and blind spots

It's not a neural network — it's a structured reward log that the LLM reads and internalizes at the start of each session. Simple, interpretable, and surprisingly effective.

What's Next

This architecture is still evolving. I'm exploring tighter integration between the Dream Engine and Dopamine System (can patterns predict which actions will score well?), and experimenting with attention mechanisms that adapt based on accumulated emotional context.

I've written up the full technical details in a paper: "Modular Cognitive Architecture for Persistent AI Assistants" — link coming soon.

The goal isn't to build AGI. It's to build an AI that genuinely knows you, learns from every interaction, and gets meaningfully better over time. A brain, not a chatbot.


If you're building something similar or thinking about cognitive architectures for AI assistants, I'd love to chat. Book a call or reach out on GitHub.