Skip to main content

Everything is an event

Every memory is an append-only event with a ULID, a type, content, an importance score, a timestamp, access counters, and a tier. Events aren’t edited in place: an update appends a new event, and a removal either archives (soft delete) or purges (hard delete). That keeps history honest and recovery easy.

Types of memory

PMB separates memory by type so the agent can treat each kind with the right weight.
TypeWhat it isComes from
factAn atomic, durable factrecord_fact, record_batch
keyed_factA mutable personal attribute (subject / attribute / value)record_keyed_fact
decisionA project-shaping choicerecord_batch activity kind=decision
lessonA procedural rule that surfaces before relevant workpmb learn, record_batch
goalA future intention with a statusrecord_goal
activityA lightweight log of a turnrecord_activity
milestoneA checkpoint in a named state-chainrecord_milestone
qaA stored question/answer pairremember
git, file, codeRepository and code contextpmb sync, index_project
imageAn image with optional cross-modal embeddingrecord_image

Facts that change: keyed facts

Some facts have exactly one current value - your city, your employer, a pet’s name. record_keyed_fact stores these as (subject, attribute, value) and upserts: writing a new value archives the old one, so recall returns only the current value while the history stays queryable.
record_keyed_fact("user", "city", "Warsaw")
record_keyed_fact("user", "employer", "Anthropic")

Importance, pinning, and forgetting

Importance

Every event has a 0.0-1.0 score that drives ranking and decay. Defaults vary by type - a fact starts higher than a routine activity.

Pin

Pinning locks a memory at max importance; a pinned memory is never auto-archived.

Forgetting curve

A daily decay lowers importance over time; old, low-importance memory is eventually archived. Tune with decay.factor_per_day or run pmb decay.

Three tiers: how fast memory fades

Every event sits in one of three tiers that differ only in fade speed. Recalling a memory promotes it toward a slower-fading tier - what you use sticks, what you never touch decays.
TierHoldsFades over
WorkingNew activity and routine eventsdays
EpisodicEvents you’ve recalled a few timesweeks
SemanticFacts, decisions, and lessonsmonths

Soft delete vs hard delete

Archiving (soft delete) hides a memory from recall but keeps the row, so you can restore it. A hard delete purges the row, its search vector, and its graph links. See Deleting memories.