All posts

Engineering a Digital Brain That Dreams

I studied computational cognitive science at Berkeley. Here's how we used the architecture of human memory to build Micro's AI agent memory system.

Brett Goldstein
Hero image for Engineering a Digital Brain That Dreams

It's crazy to say, but I use what I learned in college virtually every day. And it is what led us to create what appears to be one of the most advanced agentic memory systems in the industry right now. It all comes down to a simple idea:

Make AI remember like humans remember.

Late one night my freshman year I had an intrusive thought: how do you actually remember what someone looks like? Is it an average or just the most recent memory? I concluded it was something in between and excitedly told my CogSci 1 professor, Tom Griffiths. I was totally oblivious to the fact that I was describing a Bayesian approach to memory that researchers had been studying for decades, and that Tom was world-renowned for studying it.

Tom just said "we're studying this in our lab, you should come work with us" and that set off a lifelong obsession with computational cognitive science: the algorithms of thought.

Over the years I would get a legendary education on the topic. I took classes from Matt Walker on sleep and memory, George Lakoff on conceptual metaphors, and John Searle on philosophy of mind. I studied the neurochemical correlates of attention in Mark D'Esposito's lab and probabilistic language models in Tom's Computational Cognitive Science lab, culminating in research I co-authored with Tom and others.

After deciding against getting a PhD and going into tech instead, these ideas lay dormant for a decade. Then we started building the memory system for Micro, and everything came back.

Birds and planes

The first planes were designed to look like birds. Wings, tail feathers, the whole thing. Birds fly well, so if you want to build something that flies, it makes sense to start there.

Turns out it was better to use birds as scaffolding than to carbon copy them. Birds and planes have different constraints. Different superpowers. A bird can land on a wire. A plane can carry 200 passengers at 600 mph.

The same is true for AI and human cognition. They have a remarkable amount in common, but silicon and neurons are fundamentally different substrates. Modeling every neuron in the brain is just as much of a losing game as ignoring it. But the architecture of human memory, the way information flows between systems, is genuinely useful scaffolding that's underdiscussed in the industry today.

The human brain has brilliant prioritization but lossy storage. Silicon has perfect recall but no intuition about what matters.

The agentic memory system we built in Micro takes the prioritization architecture and pairs it with perfect recall.

Working memory

Your brain can hold about four things at once (Cowan, 2001). Information decays within seconds without active rehearsal. The prefrontal cortex, which I studied in D'Esposito's neuroscience lab, decides what gets in and what gets dropped. It's a scratch pad, not a hard drive.

In Micro, the equivalent is context injection. Every time you talk to the agent, the system assembles what it needs to know for this specific request. It detects what page you're on, what thread you're reading, what deal you're viewing, and pulls in relevant context automatically. Open a contact record and the agent already knows their recent emails, meeting history, and deal status. @mention someone and their full profile loads in.

But attention isn't just about what's in front of you. Micro also maintains a Current Priorities document: what you're most focused on right now. Buy a red car and suddenly you see red cars everywhere. Tell Micro you're focused on fundraising and it starts surfacing fundraise-related signals across everything, emails, meetings, contacts, that it would otherwise deprioritize. The more you think about something, the more the agent notices it.

Amygdala-dependent memory

The amygdala doesn't store memories. It tags them. When an experience is emotionally significant, the amygdala modulates consolidation so that memory gets stored more aggressively (McGaugh, 2004). These memories are the most persistent, not the most accurate. Flashbulb memories feel vivid and certain, but the details are often wrong (Talarico & Rubin, 2003). The evolutionary logic: organisms that remembered threats survived to reproduce.

In Micro, the equivalent is the remember tool. When you correct the agent, it notices. The system detects recurring corrections and asks: "I noticed you keep correcting X. Want me to remember this?" If you say yes, it writes to a persistent context document that's included in every future request.

Negative feedback is the strongest signal. Just like fear.

The agent that got told "never email investors before 10am" will never do it again. Not because it was retrained. Because the correction lives in persistent memory and gets consulted every single time. Most AI assistants repeat the same mistakes because every conversation starts fresh. Micro's doesn't.

Long-term memory

Everything else gets compressed and stored. Information loss is inevitable. Memory is reconstructive, not reproductive (Bartlett, 1932). You don't replay a recording. You reconstruct a plausible version based on context and what you expect.

My honors thesis with Tom Griffiths studied exactly this. We ran a web-based telephone game and tracked how sentences evolved as they passed from person to person. Lower-probability sentences drifted toward higher-probability ones over generations. People don't faithfully copy what they hear. They reconstruct it based on what they expect to hear.

Retrieval depends on context. Ask "what happened with that bug last week?" and an engineer recalls something completely different than a child would. The context at recall has to match the context at encoding (Tulving & Thomson, 1973).

In Micro, long-term memory lives in a knowledge graph we call Prism. Every person, company, email, meeting, document, task, and deal is an object. Properties and references connect them.

Brett works at Micro. Micro raised from Flybridge. Flybridge invested in 40 other companies. One of those companies has a founder you emailed last week. That's four hops. The graph knows all of them.

The agent retrieves long-term memory through two phases. First, semantic search constrains the search space, just like context constrains human recall. Then the agent traverses the graph for specifics.

In practice: you say "follow up with Sarah about the deck." The agent pulls Sarah's context document. Checks your last email thread. Finds the meeting where the deck was discussed. Reads the notes. Drafts a follow-up referencing the specific feedback she gave.

Not a generic "just following up!" email. A real one. Because the graph has the full picture.

Retrieval also strengthens over time. Frequently accessed relationships and documents get prioritized. The paths you use most become the paths the agent reaches for first. And like human memory, older information doesn't get deleted, it just sinks in the rankings. Still there if you need it, but it doesn't crowd out what's current.

External memory

Humans offload memory constantly. Todo lists, notepads, spreadsheets, significant others. Clark and Chalmers (1998) called this the extended mind thesis. It's under-discussed, but it's how most real memory works.

Micro's equivalent is context documents and skills. Context documents are the "what": the agent proactively writes notes about you, your company, your writing style, your meeting preferences, your fundraise context, your sales process. Fifteen categories, each a living document. Like a student taking notes in a lecture.

Skills are the "how." Procedural memory. Step-by-step instructions for recurring workflows: morning email summaries, pipeline updates, lead research, meeting prep.

Both are included in every request. Like a stack of papers on a desk, ready to be pulled whenever relevant.

Innate cognition

Humans are born with evolved neural architectures for language, number sense, and threat detection (Spelke & Kinzler, 2007). These aren't memories. They're the cognitive baseline everything else builds on.

In Micro, the foundation model is the equivalent. Griffiths' lab at Berkeley (before he moved to Princeton in 2018) was modeling next-word prediction as a window into human cognition. The same math, predicting what comes next given what came before, now powers every large language model.

My thesis was literally about how humans do next-word prediction through probabilistic priors. Same mechanism, different substrate.

How Micro sleeps

Matt Walker's research at Berkeley showed that memory consolidation depends heavily on sleep. During NREM slow-wave sleep, the brain replays the day's memories and integrates them into long-term storage. Sleep isn't downtime. It's when the brain makes sense of what happened.

AI models don't sleep. But the equivalent exists in Micro.

Consolidation agent. Each night, a scheduled workflow reviews the day's conversations, emails, and meeting notes. It updates every relevant context document with new information. Days with nothing new produce no changes. Quiet days mean quiet nights.

Orchestrator. A few hours later, a separate process looks at the day and week ahead. It surfaces relevant memories, prepares context for upcoming meetings, and handles proactive tasks. It also updates its own instructions based on accumulated feedback.

When you open Micro on Monday morning, the agent already knows what happened last week and what's coming this week. It didn't ask you. It consolidated overnight.

Does it dream?

John Searle would say no. His Chinese Room argument says symbol manipulation isn't comprehension, no matter how sophisticated.

He might be right.

But it consolidates memory overnight, surfaces relevant context proactively, and wakes up smarter than it went to sleep. Call it what you want.

The question isn't whether the agent "knows" Sarah. It's whether it can pull up the right context when you need it and do something useful. Right now, it can. Better than any human could, given the same volume of information.

From skeuomorphic to inspired

Micro already has superhuman retrieval fidelity. The accuracy and speed at which information can be found across thousands of relationships is orders of magnitude beyond what a human brain can do.

But this is chapter one.

The first planes looked like birds. Then we figured out jet engines. Memory architecture will evolve the same way. From brain-mimicking, to brain-inspired, to something entirely new.

We just happened to start with a pretty good blueprint.

Try Micro. The agent already knows more about your relationships than you remember.


Appendix: what I left out

This post simplifies things for readability. Here's what I skipped or condensed, for anyone who wants the full picture.

The standard memory taxonomy is more complex. Cognitive science typically divides long-term memory into declarative (episodic + semantic) and non-declarative (procedural, priming, conditioning). Amygdala-dependent memory isn't a standalone category in the textbook taxonomy. It's a modulation process that cuts across categories. I framed it as its own system because the Micro equivalent (persistent corrections) maps more cleanly that way.

Emotional memories are durable but distorted. I wrote "most persistent, not the most accurate." The full story: Talarico & Rubin (2003) showed that flashbulb memories (vivid recollections of emotionally charged events) feel highly certain to the person remembering them, but the factual details drift significantly over time. Confidence goes up while accuracy goes down. This is why eyewitness testimony is unreliable.

The Selfish Gene connection is philosophical, not empirical. Dawkins' gene-centric framework explains why emotional memory systems evolved (survival advantage), but Dawkins doesn't discuss the amygdala or memory consolidation directly. The connection is a reasonable inference, not a direct citation.

Working memory capacity is debated. I cited Cowan's ~4 chunks. Miller's classic "7 plus or minus 2" (1956) is the more famous number, but that includes chunking strategies. Cowan's 4 is the core capacity limit when rehearsal is controlled for. Both numbers are correct in their own context.

"Context-dependent retrieval" vs. "framing." My original draft used "framing," which is Lakoff's term for how language shapes cognition. The memory retrieval phenomenon I'm describing is more precisely called encoding specificity (Tulving & Thomson, 1973) or context-dependent memory (Godden & Baddeley, 1975). Lakoff's frames are about how conceptual metaphors structure thought, which is related but distinct.

Next-word prediction in humans vs. machines. When I say my thesis was about "how humans do next-word prediction," that's a simplification. The research studied inductive biases in serial reproduction, using probabilistic language models (n-grams) to characterize how people reconstruct sentences. The connection to modern LLMs is real but indirect: both use statistical regularities in language, but the mechanisms are very different (Bayesian inference over priors vs. transformer attention over training data).

The rehearsal analogy is approximate. In neuroscience, rehearsal involves long-term potentiation (strengthening of synaptic connections through repeated activation). Micro's version (frequently accessed items get prioritized) is functionally similar but mechanistically different. There's no synaptic equivalent in a database.

Sleep consolidation is more nuanced. Walker's work shows NREM slow-wave sleep is critical for declarative memory consolidation, while REM sleep may help with emotional processing and creative problem-solving. Whether dream content plays a functional role in consolidation or is an epiphenomenon of neural replay remains an open question in the field.

The reticular activating system. The Current Priorities analogy (red car effect) is more precisely attributed to selective attention and the frequency illusion (Baader-Meinhof phenomenon) than to the RAS specifically. The RAS primarily regulates arousal and wakefulness. I kept the example but dropped the neuroscience label to avoid overspecifying.

Tom Griffiths moved to Princeton. Griffiths ran the Computational Cognitive Science Lab at UC Berkeley from 2006 to 2018. He is now at Princeton. D'Esposito is still at Berkeley. Walker is still at Berkeley.