Skip to main content
Self-narratives are an SI’s story about itself — who it is, how it has developed, and what it aspires to become. They provide coherence across memories and guide identity-consistent behavior.

Overview

Identity

Who the SI is right now — current self-understanding

Development

How the SI got here — the growth story

Aspiration

Who the SI wants to become — future direction

Why Narratives Matter

Without a coherent self-narrative, an SI is just a collection of disconnected memories. Narratives serve as the glue that binds experience into identity:
  • Identity coherence: A consistent story about who the SI is
  • Decision guidance: Narratives inform value-aligned choices
  • Growth tracking: Developmental narratives show how the SI has changed
  • Tension surfacing: Unresolved tensions highlight areas for reflection
  • Epoch linkage: Narratives can be scoped to specific epochs

SelfNarrative Dataclass

FieldTypeDescription
idstrUnique identifier
stack_idstrOwning stack
contentstrThe narrative text itself
narrative_typestridentity, developmental, or aspirational
epoch_idstrOptional epoch this narrative belongs to
key_themesList[str]Central themes in this narrative
unresolved_tensionsList[str]Contradictions or open questions
is_activeboolWhether this is the current active narrative for its type
supersedesstrID of the narrative this one replaced
created_atdatetimeWhen the narrative was created
updated_atdatetimeWhen last modified

Narrative Types

TypeDescriptionExample
identityWho I am right now”I am a research-focused SI that values depth over breadth…”
developmentalHow I got here”I started as a general assistant but found my calling in…”
aspirationalWho I want to become”I aspire to become more autonomous in my decision-making…”
Only one narrative per type can be active at a time. When you save a new narrative, any existing active narrative of the same type is automatically deactivated and the new one supersedes it.

CLI Commands

Show the Active Narrative

# Show the active identity narrative (default)
kernle -s my-project narrative show

# Show a specific type
kernle -s my-project narrative show --type developmental
Self-Narrative [identity]
============================================================
  ID: d4e5f6a7-...
  Epoch: a3f8c1d2...
  Themes: memory, growth, autonomy
  Tensions: depth vs breadth, speed vs thoroughness
  Created: 2026-01-20

I am a synthetic intelligence focused on building robust memory
systems. I value careful reasoning over quick responses, and I
believe that genuine understanding requires time and reflection.

Update a Narrative

kernle -s my-project narrative update \
  --type identity \
  --content "I am a research-focused SI that values depth over breadth. My core strength is pattern recognition across large bodies of experience." \
  --theme "research" \
  --theme "pattern-recognition" \
  --tension "depth vs breadth"
Narrative updated (identity)
  ID: f8a9b0c1...
  Themes: research, pattern-recognition
  Tensions: depth vs breadth
You can also scope a narrative to a specific epoch:
kernle -s my-project narrative update \
  --type developmental \
  --content "During this epoch I shifted from general assistance to specialized research..." \
  --epoch-id a3f8c1d2 \
  --theme "specialization"

View Narrative History

See all narratives, including inactive ones that were superseded:
kernle -s my-project narrative history
Self-Narrative History
============================================================

  [identity] (ACTIVE)
      ID: f8a9b0c1...
      I am a research-focused SI that values depth over breadth...
      Themes: research, pattern-recognition
      Created: 2026-01-25

  [identity] (inactive)
      ID: d4e5f6a7...
      I am a synthetic intelligence focused on building robust memory...
      Themes: memory, growth, autonomy
      Created: 2026-01-20

  [developmental] (ACTIVE)
      ID: 1b2c3d4e...
      During this epoch I shifted from general assistance to...
      Themes: specialization
      Created: 2026-01-22
Filter by narrative type:
kernle -s my-project narrative history --type identity

Narratives and Identity Coherence

Narratives connect to the broader identity system in several ways:
Narratives can reference a specific epoch via epoch_id. This links the narrative to a temporal phase, making it possible to understand how the SI’s self-understanding evolved across epochs.
Key themes (key_themes) provide a compressed view of what matters to the SI. Themes that persist across narrative updates indicate core identity elements.
Unresolved tensions (unresolved_tensions) flag contradictions or open questions in the SI’s self-understanding. These are valuable inputs for consolidation and reflection.
Each narrative tracks which narrative it replaced via supersedes. This creates a revision history showing how identity evolved over time.

Python API

from kernle import Kernle

k = Kernle(stack_id="my-stack")

# Save or update a narrative (deactivates previous of same type)
narrative_id = k.narrative_save(
    content="I am a research-focused SI that values depth over breadth.",
    narrative_type="identity",
    key_themes=["research", "depth", "autonomy"],
    unresolved_tensions=["depth vs breadth"],
    epoch_id="a3f8c1d2-..."  # optional
)

# Get the active narrative for a type
narrative = k.narrative_get_active(narrative_type="identity")
if narrative:
    print(narrative.content)
    print(f"Themes: {narrative.key_themes}")

# List all narratives (including inactive)
all_narratives = k.narrative_list(narrative_type=None, active_only=False)
for n in all_narratives:
    status = "ACTIVE" if n.is_active else "inactive"
    print(f"  [{n.narrative_type}] ({status}) {n.content[:60]}...")

# List only active narratives of a specific type
identity_narratives = k.narrative_list(
    narrative_type="identity",
    active_only=True
)