Docs

Thermodynamic Engine

The Thermodynamic Engine is the core of Sulcus — it governs how memories gain heat, lose heat, spread warmth to neighbors, and eventually cool into consolidation. Every parameter is tunable from the settings panel at /dashboard/account.

Sulcus · Thermodynamic Engine Reference · 2026

The Decay Formula

The single equation that governs all memory heat

Every memory in Sulcus has a heat value between 0.0 and 1.0. Heat determines visibility — hotter memories surface first in recall, appear in the active index, and influence the graph. Cold memories fade toward silence.

Heat decays continuously using a half-life model. The formula incorporates stability — a multiplier that grows each time a memory is recalled, implementing spaced repetition at the engine level.

H(t) = H₀ × 2^(-Δt / (half_life × stability))

Where:
  H(t)      = heat at time t
  H₀        = initial heat (1.0 on creation)
  Δt        = elapsed time since last update
  half_life = base half-life for the memory type
  stability = cumulative multiplier from recalls (starts at 1.0)

Example — a fact with half_life=12mo, stability=2.5 after one recall:
  Effective half-life = 12 × 2.5 = 30 months
  After 12 months: H = 1.0 × 2^(-12/30) ≈ 0.76  (still hot!)
formula

Key insight: Stability is the mechanism behind spaced repetition. Each recall multiplies stability by the Stab+ value for that memory type. A fact recalled three times with Stab+ of 2.5× has an effective half-life of 12 × 2.5³ = 187.5 months — it will effectively never decay. This is how Sulcus makes frequently-used knowledge permanent without manual pinning.

Decay Profiles

Each memory type decays at its own rate — ephemeral events vanish quickly, core facts persist

Not all memories are equal. An episodic memory of a conversation should fade within days unless reinforced. A factual record should persist for a year or more. Decay profiles let you control this per memory type.

TypeHalf-LifeFloorStab+Behaviour
episodic1 day0.011.5×Fast decay. Conversations, events, and moments fade quickly unless recalled. Recalls extend the half-life by 1.5× each time.
semantic1 month0.052.0×Moderate decay. Knowledge and concepts persist for weeks. Two recalls double the effective half-life.
procedural6 months0.052.0×Slow decay. How-to knowledge and workflows are inherently sticky. Meant to last through project lifecycles.
preference3 months0.101.8×Medium decay with a higher floor. User preferences stay visible longer even when not recalled — the floor of 0.10 ensures they never fully vanish.
fact12 months0.152.5×Near-permanent. Facts have the longest half-life, the highest floor, and the strongest stability multiplier. Recalling a fact even once extends its half-life to 30 months.
Half-Lifetime to 50% heat

The time it takes for a memory's heat to drop to 50% of its current value. Shorter half-lives mean faster forgetting. This is the base rate before stability modifies it — the effective half-life is half_life × stability.

Floor (min_heat)decay minimum

The minimum heat a memory can decay to. Heat will never drop below this value, even after years of no interaction. Facts have a floor of 0.15 — they always retain some visibility. Episodic memories floor at 0.01 — nearly invisible, but technically still in the graph.

Stability (Stab+)spaced repetition

The multiplier applied to a memory's stability score on each recall. This is spaced repetition. A fact with Stab+ of 2.5× recalled once has its effective half-life extended from 12 months to 30 months. Recalled twice: 75 months. The more your agent uses a memory, the longer it persists — automatically, with no configuration required.

Resonance

How heat spreads through the graph when a memory is recalled

When a memory is recalled, its heat doesn't just stay local. Resonance causes heat to bleed outward through the graph edges — warming related memories, strengthening clusters, and keeping entire knowledge neighborhoods alive.

This is how Sulcus implements associative memory. Recalling "deployment procedure" warms "Docker configuration" and "Azure credentials" if they're linked — because related knowledge should surface together.

ParameterDefaultDescription
Spread Factor0.3030% of the recalled memory's heat bleeds to each directly-connected neighbor. At heat 0.80, each neighbor receives 0.24 heat units.
Damping0.50Each hop reduces the spread by 50%. First hop gets full spread, second hop gets half, and so on. Prevents heat from flooding the entire graph.
Depth2 hopsHow far heat propagates from the recalled memory. At depth 2, neighbors-of-neighbors are warmed. Deeper values create wider activation but risk noise.
Thermal Gate0.05Memories below this heat threshold don't participate in resonance — they don't receive or propagate heat. Prevents cold, forgotten memories from being reanimated by distant echoes.

Tuning tip:If you notice too many irrelevant memories surfacing after recall, reduce the spread factor or depth. If related memories aren't staying warm enough, increase the spread factor. The thermal gate is your safety valve — raise it to prevent cold memories from participating in resonance chains.

Consolidation

Garbage collection for cold memories — keeping the graph lean

Memories that cool below a threshold become candidates for consolidation. When enough cold memories accumulate, the engine runs a sweep — archiving, merging, or removing the coldest entries to keep the active graph performant.

This is not deletion. Consolidated memories can be recovered. Think of it as moving boxes to the attic — they're still there, just not on the kitchen table.

Cold Thresholddefault: 0.10

Memories with heat below this value are flagged as cold candidates. They won't be immediately removed — they accumulate until the count trigger fires. Lower this value to be more lenient with cooling memories; raise it to be more aggressive.

Cold Count Triggerdefault: 20

The consolidation sweep runs when this many cold memories have accumulated. At the default of 20, the engine waits until 20 memories are below the cold threshold before sweeping. This batching prevents constant garbage collection on every tick.

Active Index

What the LLM actually sees — the context window into your memory graph

The active index is the subset of your memory graph that gets injected into the LLM's system prompt. Not every memory can fit — models have finite context windows. These parameters control the boundary.

Max Nodesdefault: 200

The maximum number of memory nodes included in the active index. The hottest 200 memories (by heat score) are selected. If you have 1,000 memories, the top 200 make it into context. Increase this for agents that need broader recall; decrease it for precision or when using models with smaller context windows.

Context Budgetdefault: 50,000 chars

The character limit for the injected context block. Even if 200 nodes are selected, only as many as fit within 50,000 characters are included. Longer memories consume more budget. This is a hard cap — the engine serializes memories from hottest to coldest and stops when the budget is exhausted.

Balance matters:More nodes means broader context but diluted attention. A context budget of 50k characters is roughly 12,000–15,000 tokens depending on the model. For sharper, more focused recall, reduce max nodes first — it's more predictable than character limits since memory sizes vary.

Recall Quality

30-day performance metrics — how well your memory graph is serving your agents

The Recall Quality panel shows accuracy metrics per memory type over the last 30 days. It tracks how often recalled memories were marked as relevant (via feedback) versus irrelevant — giving you a signal on whether your thermodynamic parameters are tuned correctly.

Accuracy Per Type

Each memory type shows its recall accuracy as a percentage. High accuracy means the right memories are surfacing. Low accuracy for a specific type means either too many irrelevant memories of that type are hot, or the type's half-life is too long and stale memories are lingering.

Tuning Suggestions

The panel may surface suggestions based on patterns: "Episodic recall accuracy is 45% — consider reducing episodic half-life" or "Fact recall is 98% — current settings are optimal." These are heuristics, not commands. Use them as starting points for investigation.

How These Work Together

The full lifecycle of a memory — from creation to consolidation

The thermodynamic engine isn't a collection of independent features — it's a single system where every parameter influences the others. Here's how a memory moves through its entire lifecycle:

1. STORE    → Memory created at heat 1.0
                ↓
2. DECAY    → Tick runs: H(t) = H₀ × 2^(-Δt / (half_life × stability))
                ↓              Heat drops toward floor (min_heat)
3. RECALL   → Agent searches → memory found
                ↓              stability *= Stab+ multiplier
                ↓              Heat bumped, effective half-life extended
4. RESONATE → Heat spreads to neighbors
                ↓              spread_factor × heat → neighbors
                ↓              damping per hop, depth limit
5. REPEAT   → Steps 2-4 cycle continuously
                ↓
6. COLD     → Heat drops below cold_threshold (0.10)
                ↓              Memory becomes consolidation candidate
7. SWEEP    → cold_count ≥ trigger (20)
                ↓              Coldest memories archived/merged
8. FLOOR    → Heat never drops below min_heat
                               Memory persists at minimum visibility
lifecycle

Creation → Decay

A new memory enters at heat 1.0. Immediately, the decay clock starts. The half-life for its type determines how quickly heat drops. An episodic memory is at 0.50 after one day. A fact is still at 0.94 after a month.

Recall → Stability

When the agent recalls a memory, two things happen: the memory's heat is bumped, and its stability multiplier increases by the Stab+ value. This extends the effective half-life. Frequently recalled memories become effectively permanent — exactly like human spaced repetition.

Recall → Resonance

Simultaneously, resonance spreads heat outward. The recalled memory's neighbors receive a fraction of its heat (spread factor), damped by distance (damping per hop), up to the configured depth. The thermal gate prevents cold memories from participating.

Cooling → Consolidation

Memories that aren't recalled decay toward their floor. When enough memories fall below the cold threshold, consolidation sweeps. The floor guarantees that even the coldest memories retain a minimum presence — facts at 0.15, preferences at 0.10. Nothing truly disappears unless explicitly deleted.

Active Index → Context

The active index selects the hottest memories (up to max nodes / context budget) and injects them into the LLM's system prompt. The result: your agent always has the most relevant, most recently reinforced knowledge available — without any manual curation.

Memory that governs itself.

The Thermodynamic Engine runs continuously — decaying, reinforcing, resonating, and consolidating your agent's knowledge without any intervention. Tune the parameters to match your use case, or leave the defaults and let physics do the work.