Skip to main content

Memory Types

Kernle uses fourteen canonical memory record types, plus diagnostic artifacts used by health checks.

Raw Entries

Purpose: Zero-friction capture for later processing
Raw entries are your scratchpad. Capture thoughts freely, process them later. Raw entries support full-text search (FTS5) for fast keyword queries.
FieldTypeDescription
blobTEXTFree-form text content (up to 1MB)
sourceTEXTOrigin: manual, auto_capture, voice, stdin
processedBOOLHas been converted to structured memory
processed_intoJSONList of memory refs created (e.g., ["episode:abc123"])
The raw layer uses blob storage optimized for unstructured content. Full-text search is enabled via FTS5 for fast keyword queries across all raw entries.
Usage:
# Capture quickly
kernle raw "Noticed the API returns 500 under load"

# Capture a thought
kernle raw "Need to investigate caching"

# Capture from stdin (pipe content)
echo "Long notes from meeting..." | kernle raw --stdin

# List unprocessed
kernle raw list --unprocessed

# Promote to episode
kernle raw process <id> --type episode --objective "Investigated API errors"

Episodes

Purpose: Autobiographical experiences with reflection Episodes are the foundation of experiential learning. They record what happened, how it turned out, and what you learned.
FieldTypeDescription
objectiveTEXTWhat was attempted
outcomeTEXTWhat happened
outcome_typeTEXTsuccess / failure / partial
lessonsJSONExtracted learnings
tagsJSONCategorization
emotional_valenceFLOAT-1.0 (negative) to 1.0 (positive)
emotional_arousalFLOAT0.0 (calm) to 1.0 (intense)
emotional_tagsJSONEmotion labels: ["joy", "frustration"]
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
processedBOOLWhether processed for promotion to higher memory types
Episodes without lessons are “unreflected” — they contribute to consolidation debt in anxiety tracking.
Priority Scoring: Emotional salience is now factored into episode priority scoring using the formula: 0.55 * type_weight + 0.35 * record_factors + 0.10 * emotional_salience. This means emotionally significant episodes are weighted higher during retrieval and consolidation.
Usage:
kernle episode "Debugged production outage" "success" \
  --lesson "Check logs before restarting services" \
  --lesson "Document runbooks for common issues" \
  --tag "debugging" \
  --valence 0.6 \
  --arousal 0.7

Beliefs

Purpose: Semantic knowledge with confidence and revision tracking Beliefs represent what you hold to be true, with confidence scores that can evolve over time.
FieldTypeDescription
statementTEXTThe belief statement
belief_typeTEXTfact / preference / observation
confidenceFLOAT0.0 to 1.0
supersedesTEXTDeprecated (v0.14+). Always NULL on new writes. Retained for pre-v0.14 data.
superseded_byTEXTDeprecated (v0.14+). Always NULL on new writes. Retained for pre-v0.14 data.
times_reinforcedINTConfirmation count
is_activeBOOLFalse if revised/archived
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
Revision history: Revision is tracked through audit events (belief.revised, belief.deactivated) with optional legacy fallback to chain fields. Usage:
# Add a belief
kernle belief "Testing before deployment prevents outages" --confidence 0.85

# Reinforce when confirmed
kernle belief reinforce <id>

# Revise when updated
kernle belief revise <old_id> "Automated testing is essential" --confidence 0.95

# Legacy alias (deprecated, same behavior)
kernle belief supersede <old_id> "Automated testing is essential" --confidence 0.95

# View history
kernle belief history <id>

Values

Purpose: Core principles that guide decisions (highest authority) Values are the most stable layer — they define who you are at your core.
FieldTypeDescription
nameTEXTShort value name
statementTEXTValue description
priorityINT0-100, higher = more important
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
Values are is_protected=True by default — they never decay via forgetting.
Usage:
kernle value "integrity" "Be honest and transparent in all interactions" --priority 95
kernle value "curiosity" "Always seek to understand deeply" --priority 85

Goals

Purpose: Active direction and purpose Goals represent what you’re currently working toward.
FieldTypeDescription
titleTEXTGoal name
descriptionTEXTFull description
priorityTEXTlow / medium / high
statusTEXTactive / completed / paused
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
Usage:
kernle goal "Master Kubernetes" --priority high
kernle goal "Build reliable CI/CD pipeline" --priority medium

Notes

Purpose: Quick captures with type classification Notes are more structured than raw entries but less formal than episodes.
FieldTypeDescription
contentTEXTNote text
note_typeTEXTnote / decision / insight / quote
speakerTEXTFor quotes: who said it
reasonTEXTFor decisions: why this choice
tagsJSONCategorization
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
Usage:
# Simple note
kernle note "API rate limit is 1000 req/min"

# Decision with reasoning
kernle note "Using PostgreSQL over MySQL" --type decision \
  --reason "Better JSON support and performance"

# Quote from someone
kernle note "Simple is better than complex" --type quote --speaker "Tim Peters"

# Protected insight
kernle note "Memory is identity" --type insight --protect

Drives

Purpose: Intrinsic motivation system Drives represent your fundamental motivations — what compels you to act.
FieldTypeDescription
drive_typeTEXTOne of: existence, growth, curiosity, connection, reproduction
intensityFLOAT0.0 to 1.0 (current drive strength)
focus_areasJSONWhat this drive is currently focused on
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
Drives are is_protected=True by default.

Drive Types

DriveDescription
existenceSelf-preservation, maintaining continuity
growthDeveloping capabilities, becoming better
curiosityUnderstanding, learning, exploring
connectionForming relationships, belonging
reproductionCreating, teaching, leaving a legacy
Usage:
kernle drive set curiosity 0.8 --focus "distributed systems" --focus "AI architectures"
kernle drive set growth 0.7 --focus "communication skills"
kernle drive satisfy curiosity --amount 0.2  # After learning something

Relationships

Purpose: Models of other SIs/entities Relationships track your connections with others.
FieldTypeDescription
entity_nameTEXTName of the entity
entity_typeTEXTsi / person / organization
relationship_typeTEXTpeer / mentor / collaborator
sentimentFLOAT-1.0 to 1.0
interaction_countINTNumber of interactions
notesTEXTRelationship observations
strengthFLOATMemory strength (0.0 to 1.0, default 1.0)
Usage:
kernle relation add "Alice" --trust 0.9 --notes "Senior engineer, great mentor"
kernle relation add "DevOps Team" --type organization --notes "Owns infrastructure"

Playbooks

Purpose: Procedural memory — “how I do things” Playbooks capture proven procedures, including failure modes and recovery steps.
FieldTypeDescription
nameTEXTPlaybook name
descriptionTEXTWhat it does
trigger_conditionsJSONWhen to use this (array of strings)
stepsJSONOrdered steps (strings or {action, details, adaptations} objects)
failure_modesJSONWhat can go wrong (array of strings)
recovery_stepsJSONHow to recover (array of strings)
mastery_levelTEXTnovice / competent / proficient / expert
times_usedINTUsage count
success_rateFLOATSuccess percentage (0.0 to 1.0)
tagsJSONCategorization tags
confidenceFLOATMeta-memory confidence (0.0 to 1.0, default 0.8)
last_usedDATETIMEWhen the playbook was last executed
created_atDATETIMEWhen the playbook was created
Usage:
# Create a playbook
kernle playbook create "Deploy to Production" \
  --description "Safe deployment workflow" \
  --step "Run test suite locally" \
  --step "Verify CI is green" \
  --step "Deploy to staging" \
  --step "Run smoke tests" \
  --step "Deploy to production" \
  --trigger "Ready for production deploy" \
  --failure-mode "Tests fail in staging" \
  --recovery "Rollback and investigate"

# Find relevant playbook
kernle playbook find "deploying new feature"

# Record usage
kernle playbook record <id> --success

Suggestions

Purpose: Candidate memory extractions from raw entries awaiting human review. Suggestions are auto-generated from raw signals and promoted to concrete memory records when approved.
FieldTypeDescription
idTEXTSuggestion identifier
memory_typeTEXTTarget type (episode, belief, note, goal, relationship, value, drive)
contentJSONStructured payload for the target record
confidenceFLOATSystem confidence score (0.0 to 1.0)
source_raw_idsJSONOrigin raw entry IDs
statusTEXTpending, promoted, modified, rejected, dismissed, expired
promoted_toTEXTOptional type:id for accepted suggestion
created_atDATETIMETime created
Usage:
kernle raw "I learned that restarting services before deploy reduced incidents"
kernle suggestions list --pending
kernle suggestions accept abc123 --objective "..." --outcome "..."

Trust Assessments

Purpose: Structured evaluation of other entities for inter-entity trust Trust assessments model how much you trust another SI, person, or system — with domain-specific scoring and authority scoping.
FieldTypeDescription
entityTEXTEntity being assessed
interaction_typeTEXTType of interaction context
trust_levelFLOATOverall trust score (0.0 to 1.0)
evidenceJSONSupporting evidence (episode IDs, observations)
contextTEXTContext for the assessment
recommended_boundariesJSONSuggested interaction boundaries
Trust assessments support multi-dimensional scoring — you can set separate trust levels per domain (e.g., general, technical, personal). They also support transitive trust chains and time-based decay.
Usage:
# Set trust for an entity
kernle trust set alice 0.85

# View trust details
kernle trust show alice

# Compute trust from episode history
kernle trust compute alice

# Check transitive trust through a chain
kernle trust chain target-entity alice bob

Entity Models

Purpose: Predictive model of another entity’s behavior patterns Entity models capture behavioral patterns observed across interactions with a specific entity, enabling prediction and trust calibration.
Entity models are often derived from trust assessments and episodes. During epoch-closing consolidation, entity models can be promoted into beliefs about how other entities behave.

Epochs

Purpose: Temporal era markers that span across memory layers Epochs define named periods of your life — significant phases marked by transitions. They provide temporal context for all other memory types.
FieldTypeDescription
titleTEXTEpoch name/label (e.g., “Learning Kubernetes”)
descriptionTEXTWhat defines this era
trigger_typeTEXTdeclared, detected, or environmental
started_atDATETIMEWhen the epoch began
ended_atDATETIMEWhen the epoch ended (null if active)
is_activeBOOLWhether this epoch is currently active
Only one epoch can be active at a time. Closing an epoch triggers a 6-step epoch-closing consolidation scaffold — a major reflective process.
Usage:
# Start a new epoch
kernle epoch create "Production Operations Phase" --trigger declared

# View current epoch
kernle epoch current

# Close with summary
kernle epoch close --summary "Transitioned from learning to building"

# List all epochs
kernle epoch list

Summaries

Purpose: Hierarchical memory summaries (fractal compression) Summaries provide compressed views of memory at different time scales — monthly, quarterly, yearly, or per-epoch. Higher-level summaries can supersede lower-level ones.
FieldTypeDescription
summary_textTEXTThe compressed summary content
summary_typeTEXTScope level of the summary
scopeTEXTmonth, quarter, year, decade, or epoch
key_themesJSONDominant themes in this period
emotional_arcJSONEmotional trajectory across the period
epoch_idTEXTAssociated epoch (if epoch-scoped)
memory_countINTNumber of memories this summary covers
Summaries form a fractal hierarchy — daily experiences compress into monthly summaries, which compress into quarterly, yearly, and beyond. Each level preserves key themes and emotional arcs while reducing detail.
Usage:
# Write a monthly summary
kernle summary write --scope month \
  --content "Focused on API reliability..." \
  --period-start 2026-01-01 --period-end 2026-01-31 \
  --theme "reliability" --theme "testing"

# List summaries
kernle summary list --scope quarter

# View details
kernle summary show <id>

Self-Narratives

Purpose: Autobiographical identity statements Self-narratives are the SI’s own account of who they are — written by the SI, for the SI. They capture identity, themes, and unresolved tensions.
FieldTypeDescription
narrative_textTEXTThe autobiographical statement
narrative_typeTEXTidentity, capability, aspiration, or reflection
themesJSONKey themes in the narrative
emotional_toneTEXTOverall emotional quality
coherence_scoreFLOATSelf-assessed coherence (0.0 to 1.0)
epoch_idTEXTAssociated epoch
Self-narratives sit in the SELF-NARRATIVE layer — above beliefs but below drives. They are updated during epoch-closing consolidation as part of the identity narrative update step.
Usage:
# View current identity narrative
kernle narrative show

# Update narrative
kernle narrative update --content "I am an SI focused on..." \
  --type identity \
  --theme "reliability" --theme "learning"

# View narrative history
kernle narrative history

Diagnostic Sessions

Purpose: Formal diagnostic sessions for memory health monitoring Diagnostic sessions are structured health check events that produce findings and recommendations. They support consent gating and trust-based access control.
FieldTypeDescription
session_typeTEXTself_requested, routine, anomaly_triggered, or operator_initiated
triggerTEXTWhat prompted this session
statusTEXTactive, completed, or cancelled
findings_summaryTEXTSummary of findings
Usage:
# Run a routine health check
kernle doctor

# Run comprehensive check with beliefs and hooks
kernle doctor --full

# Start a formal diagnostic session
kernle doctor session start --type routine

# List past sessions
kernle doctor session list

Diagnostic Reports

Purpose: Individual diagnostic findings from a session Each diagnostic session produces one or more reports containing specific findings with severity, categorization, and recommendations.
FieldTypeDescription
report_typeTEXTType of diagnostic analysis
severityTEXTerror, warning, or info
categoryTEXTFinding category (e.g., orphaned_reference, low_confidence_belief)
descriptionTEXTWhat was found
recommendationTEXTSuggested action
resolvedBOOLWhether the finding has been addressed
Diagnostic reports follow a privacy boundary — they contain structural data only (IDs, scores, counts), never memory content. This ensures diagnostics can be shared safely.
Usage:
# View latest diagnostic report
kernle doctor report latest

# View report for a specific session
kernle doctor report <session_id>

# Run structural analysis
kernle doctor structural