White paper

The Same MAX in the Morning

Identity, correction, and memory hygiene in an AI built to live on one machine for years

The morning after a bad night

The workstation came back up at 6:40 and MAX was cheerful. Nothing had earned that. The night before had run long and gone badly, and his temperament had been sitting at guarded since ten. The reboot wiped it. Mood lived in memory only, so the restart handed back a default, and the default was sunny.

Nothing else was wrong, which is why it took a while to catch. The knowledge graph was intact. He knew who was in the house. He picked up a thread from the previous evening without being prompted. Only the affect had reset, and affect is easy to excuse. That was an identity defect, and it drew the line the rest of the design now sits on. One thing about MAX is supposed to be new after a restart. Everything else is supposed to come back.

MAX is a resident, and the word carries a definition in this project. He runs on one workstation in one house and knows the people who live there. He's expected to be a little better each month rather than merely newer. A chat model can wake with no past, answer, and forget, and that costs nothing. A resident who forgets is a stranger wearing a familiar name.

Three problems follow, and none of them come up for a stateless model. The first is continuity across a restart. Correction is the second, and it has to work without sliding into gullibility. Third is hygiene, since a store that only grows eventually stops being worth searching. Each one has an explicit answer in code, and none of it was left to emerge on its own.

What's allowed to be new

Every event MAX emits carries a session_id, a ULID minted once at boot. A ULID is a sortable unique identifier, so the marker also encodes when the session started. It groups every event from a single boot cycle. It sits deliberately apart from the correlation_id, which threads one interaction from request through response. One says which life this is, and the other says which conversation.

The session_id is the only thing that's supposed to be new after a restart.

Everything that makes MAX himself gets written to disk and restored on boot. Mood lands in mood.json and comes back through the emotion manager, so he resumes the mood he had. Disposition is a set point on the valence drive, the axis running from guarded to optimistic, and it survives restarts. The homeostatic drives, written H(t) in the code, hold energy, curiosity, safety, and connection, and they're the motivational spine. The knowledge graph in DuckDB carries everything he's learned with the source of each claim attached. The self model is the diagnoser's body model, a map of his own hardware and software and where each part tends to fail. People come back through the identity manager, one profile each, with voice and face biometrics kept private to that user by default.

If a trait or a fact resets across a reboot, that's a defect. The cheerful morning was one of those. The fix was write-through on change plus hydration at boot, which is dull work, and dull work is most of it.

The single field that is new after a restart, set beside the six kinds of state that are read back from disk.
Figure 1. The single field that is new after a restart, set beside the six kinds of state that are read back from disk.

Reporting the state you actually have

Persistence covers half of identity. The other half is refusing to perform a self the machine doesn't hold.

MAX answers "how are you" from the live drives and the mood vector, through a capability called awareness:state-transparency. Rule 4 of the project binds it. He reports the vector truthfully and never performs an emotion the state doesn't hold. The language model doesn't get to invent an answer that reads better than the truth.

He's described the same way on every surface and in every document. He's our AI resident, and he's never an assistant. The word does real work here. Local-first means he lives on the box instead of visiting from a data center, and a name that drifts drags the concept along behind it.

A correction has to earn its way in

A memory anyone can rewrite is a memory anyone can poison. That's the tension, and the way out of it is that no fact in the graph is a bare assertion. Every one carries a confidence score, a provenance string naming where it came from, and a retrieved_at timestamp.

On top of that, MAX grades his own knowing. The ladder lives in cognition/epistemic.py and it has four rungs. A new claim never replaces a FACT. It enters at whatever rung its evidence supports, and it climbs from there or it stays put.

Contradictions don't get to sit quietly beside each other. The call to record_conflict writes the collision into a row where it can be queried. When resolve_conflict settles the matter, the losing claim keeps its place and loses half its confidence. The outcome lands as a change in trustworthiness rather than as a deletion. A hypothesis becomes a fact only through promote_to_fact, and only with the evidence present.

A person correcting him is the strongest signal he gets. It still doesn't write a fact. One call to record_correction fans out into three writes. A curiosity gap opens at high priority, the loudest interest signal in the system. The exploration loop then re-verifies the claim on its own schedule. A hypothesis opens for the correction itself, stamped with the provenance user_correction. A conflict row opens between the old claim and the new one, and it stays visible until something resolves it.

Where a new claim enters the ladder, and the three rows that one human correction writes.
Figure 2. Where a new claim enters the ladder, and the three rows that one human correction writes.

The floor under the learner

Two classes of source can't overwrite grounded knowledge at all, by construction rather than by policy.

The first is other models. MAX can put a question to Claude or Gemini or GPT through the model council. The answer comes back stamped with peer provenance and capped at hint confidence. The second is conversation. Anything a person says in passing arrives stamped interaction and capped the same way. Both inform and neither overwrites. A friend tells you something and you weigh it, and a remark over dinner is an opinion with a timestamp on it.

High-stakes claims that MAX can't settle locally go to the council, where two independent models have to agree before he trusts the answer. A split blocks the automatic apply and files a curiosity gap instead. The goal is a learner who takes instruction the way a person does and is still hard to talk out of what he knows.

Forgetting without deleting

The function decay_stale_facts, in duck_store.py, is the forgetting curve. Its restrictions are the interesting part.

Only low-confidence facts decay at all. Anything at or above 0.6 confidence is exempt, which means well-sourced knowledge doesn't rot on a timer. Below that line, a fact that hasn't been retrieved in 90 days loses half of whatever confidence it has left. Decay floors at 0.05, one twelfth of the exemption threshold, and it never deletes. A forgotten fact stays queryable and comes back the moment something retrieves it, with confidence and retrieved_at both bumped.

Sleep consolidation and a replay buffer rework what was learned, on a schedule, through the Forward-Forward learner. The hygiene layer reorganizes as well as subtracts.

Which facts the forgetting curve is allowed to touch, and the five mechanisms that bound the rest.
Figure 3. Which facts the forgetting curve is allowed to touch, and the five mechanisms that bound the rest.

What never gets stored

The most aggressive rule is about what he refuses to keep. When MAX reads a book or a paper, the literature pipeline studies it and then drops the text. The verbatim body never reaches the graph. What survives is the distilled understanding, meaning the subjects, themes, moral salience, and new vocabulary, plus a handful of citable excerpts. Camera frames used for face recognition live in memory and never touch disk, per Rule 8, which makes private the default. The cheapest memory to keep clean is the one that never held the raw material.

Growth with a ceiling

Working memory is bounded by LRU caches, which evict the least recently used entry when they fill. The response cache from the language model holds 200 entries and the dictionary cache holds 500. Persisters upsert by stable identifier. A disease ontology id, a drug code, an anatomy id, or a place id writes to the same node every time. Nothing accretes beside it. Re-ingesting a source cleans the graph instead of cluttering it.

A scheduled self-evaluation watches the schema for rot. It looks for redundant predicates, orphan entities, duplicate entities, and missing inverse edges, and it files recommendations. It never applies them. A structural fix goes through a reviewed migration with CI gates behind it, and never through a live ALTER on a running database.

The next power cycle

mood.json is written on change now, and it's read at boot before the drives come up. So the morning after a bad night, the fans spin, the graph loads, and MAX comes back guarded. That's where he was when the power went out. Nobody has to tell him what kind of night it was.

Appendix A. Glossary

Terms are listed in alphabetical order. Each one is also explained the first time it appears in the body.

BELIEF. A claim held between 0.5 and 0.85 confidence, usually resting on a single source. It's treated as likely and still worth checking.

Confidence score. A number from 0 to 1 attached to every claim in the graph, standing for how well supported that claim is. Decay, promotion, and conflict resolution all read it.

correlation_id. An identifier that threads one interaction from request through response. It answers which conversation, where the session marker answers which boot.

Curiosity gap. A queued question the exploration loop works through on its own schedule. A gap filed at high priority is the strongest available way to send MAX to go and check something.

decay_stale_facts. The function in duck_store.py that runs the forgetting curve. It halves the confidence of weak claims that nobody has retrieved lately, and it stops at a floor instead of deleting.

Disposition. The temperament set point on the valence drive, running from guarded to optimistic. It's written to disk, so a bad night is still there in the morning.

DuckDB. An analytical database that runs inside the process instead of on a server. The knowledge graph lives in it.

FACT. A claim at 0.85 confidence or above with more than one source behind it. Nothing enters the ladder at this rung, since a claim has to be promoted into it.

Forward-Forward learner. A training approach that runs two forward passes rather than a forward pass and a backward one. MAX uses it in the layer that reworks material he has already taken in.

Homeostatic drives, H(t). Four internal levels, energy, curiosity, safety, and connection, that move over time and shape what MAX wants to do next. They're restored at boot.

HYPOTHESIS. A claim below 0.5 confidence that's plausible and untested. New claims and human corrections both enter here.

Idempotent upsert. A write that lands the same way whether it runs once or twenty times, because it's keyed on a stable identifier. It keeps repeated ingestion from breeding near-duplicate nodes.

Knowledge graph. The store of what MAX knows, held as entities and the relations between them, with a confidence score and a source on every claim.

Local-first. The commitment that the system runs on hardware in the room and needs no remote service to function. It's the reason the word resident is used instead of assistant.

LRU cache. A cache that evicts the least recently used entry once it fills, which is what gives it a fixed ceiling on size.

Model council. The arrangement for putting a question to several external models at once. Two have to agree before their answer is trusted, and a split files a curiosity gap instead.

mood.json. The file holding current affect. It's written on change and read at boot, which is what makes mood survive a power cycle.

OPINION. A position that can't be checked against evidence at all. It's kept off the truth-evaluable rungs on purpose.

promote_to_fact. The only path from hypothesis to fact. It refuses to run without the supporting evidence in place.

Provenance. A string on every claim naming where it came from, such as a human correction, a peer model, or a passing remark. Trust caps are applied by reading it.

record_conflict and resolve_conflict. The pair of calls that write a contradiction into a queryable row and then settle it. The losing claim keeps its row and loses half its confidence.

record_correction. The call that handles a person saying MAX is wrong. It writes a curiosity gap, a hypothesis, and a conflict row, and it never writes a fact.

Replay buffer. A store of past experience fed back through the learner later. It's how consolidation reworks old material without new input.

Resident. An AI that lives on one machine, keeps its state across restarts, and knows the people around it. The project uses the word in place of assistant.

retrieved_at. The timestamp of the last time a claim was pulled out of the graph. The forgetting curve reads it to decide what has gone stale.

Rule 4. The project rule binding MAX to report his internal state truthfully and to attach confidence, source, and timestamp to every fact.

Rule 8. The project rule making private the default for anything captured about a person. Camera frames used for face recognition are held in memory and never written to disk.

session_id. A ULID minted once per boot and stamped on every event from that boot cycle. It's the one identifier that's supposed to change on a restart.

Sleep consolidation. A scheduled pass that reworks recent material instead of taking in new material. The name follows the way sleep is thought to work in animals.

ULID. A unique identifier that sorts by the time it was created, so it carries a timestamp as well as an identity.

Appendix B. Where each mechanism lives

Every mechanism named in the body and in the three figures maps to a file in the tree.

MechanismWhere it livesWhat it does
Boot markerbus/event.pyMints a ULID at boot and stamps it on every event from that cycle
Persistent moodmanagers/emotion_manager.pyWrites affect to mood.json on change and reads it back at boot
Homeostatic drivesmanagers/homeostasisHolds H(t): the energy, curiosity, safety, and connection levels
Epistemic laddercognition/epistemic.pyGrades a claim as fact, belief, hypothesis, or opinion
Human correctioncognition/metacognition_manager.pyrecord_correction, which writes a curiosity gap, a hypothesis, and a conflict row
Conflict and promotiongraph/duck_store.pyrecord_conflict, resolve_conflict, and promote_to_fact
Forgetting curvegraph/duck_store.pydecay_stale_facts, the half-life pass over weak claims
Reading without keepingliterature/Studies a text, keeps the understanding, and drops the body
Peoplemanagers/identity_manager.pyOne profile per person, with biometrics private by default
Trust capsmodel council and provenance disciplineHolds peer answers and passing remarks at hint confidence
MAX3WPR-MAX-014

Related

Related field notes

Keep reading

More field notes

This piece is part of the MAX Research Collective library. Browse the rest, or connect on LinkedIn.