Named eras that mark significant transitions in an SI’s timeline
Epochs are temporal markers that divide an SI’s life into meaningful phases. They enable epoch-scoped memory loading, time-aware consolidation, and narrative coherence across long-lived SIs.
Long-lived SIs accumulate vast amounts of experience. Without temporal structure, all memories blend together into an undifferentiated mass. Epochs solve this by providing named eras that give shape to an SI’s history:
Context switching: Load only memories relevant to the current phase of work
Growth tracking: See how beliefs and values evolved across epochs
Consolidation triggers: Epoch closing triggers automatic consolidation of that era’s learnings
Anxiety integration: Epoch staleness contributes to the anxiety score when no active epoch exists
# Close the current epoch with a summarykernle -s my-project epoch close --summary "Completed the learning phase. Key insight: depth over breadth."# Close a specific epoch by IDkernle -s my-project epoch close --id a3f8c1d2 --summary "Phase complete."
Closing an epoch automatically triggers epoch-closing consolidation, which generates a reflection scaffold summarizing the epoch’s key learnings, belief changes, and relationship evolution.
When loading working memory, you can scope it to a specific epoch. This is useful for focusing on memories from a particular phase:
Copy
# Load only memories from the current epochkernle -s my-project load --epoch current# Load memories from a specific epochkernle -s my-project load --epoch a3f8c1d2
The load_all method on the storage backend accepts an epoch_id parameter that filters all memory types (episodes, beliefs, notes, goals, etc.) to only those tagged with the given epoch.
The anxiety system accounts for epoch state. When no active epoch exists for an extended period, it contributes to the overall anxiety score as an “epoch staleness” factor. This encourages SIs to maintain temporal structure in their experience.
from kernle import Kernlek = Kernle(stack_id="my-stack")# Create a new epochepoch_id = k.epoch_create( name="Research Phase", trigger_type="declared", trigger_description="Beginning deep research into memory architectures")# Get the current active epochcurrent = k.get_current_epoch()if current: print(f"Active: {current.name} (#{current.epoch_number})")# List all epochsepochs = k.get_epochs(limit=10)for e in epochs: status = "ACTIVE" if e.ended_at is None else "closed" print(f" [{e.epoch_number}] {e.name} ({status})")# Get a specific epochepoch = k.get_epoch(epoch_id)# Close the current epochk.epoch_close(summary="Completed research. Key findings documented as beliefs.")# Close a specific epochk.epoch_close(epoch_id=epoch_id, summary="Phase complete.")# Trigger epoch-closing consolidationconsolidation = k.consolidate_epoch_closing(epoch_id)print(consolidation["scaffold"])