Skip to main content

Utility Commands

Commands for managing memory state, searching, analysis, and maintenance.

load

Load and display working memory at session start. Uses priority-based budget allocation to fit the most important memories within token limits.
kernle -s <stack> load [--json] [--sync] [--no-sync] [--budget TOKENS] [--no-truncate]
OptionDescription
-j, --jsonOutput as JSON (includes _meta with budget metrics)
-s, --syncForce sync (pull) before loading
--no-syncSkip sync even if auto-sync enabled
-b, --budget TOKENSToken budget for memory loading (100-50000, default: 8000)
--no-truncateDisable content truncation (may exceed budget)
Use --budget to prevent context overflow. A budget of 6000-8000 tokens is recommended for most sessions. See Context Overload Recovery for details.

Priority Ordering

Memories are loaded by priority until the budget is exhausted:
PriorityMemory TypeSorting
1.00CheckpointAlways loaded first
0.90ValuesBy priority (descending)
0.70BeliefsBy confidence (descending)
0.65GoalsBy recency
0.60DrivesBy intensity (descending)
0.40EpisodesBy recency
0.35NotesBy recency
0.30RelationshipsBy last interaction

Budget Metadata (_meta)

When using --json, the response includes a _meta object with budget metrics:
{
  "_meta": {
    "budget_used": 5200,
    "budget_total": 8000,
    "excluded_count": 12
  }
}
FieldDescription
budget_usedTokens consumed by loaded memories
budget_totalOriginal budget requested
excluded_countNumber of memories that could not fit

Token Estimation

Tokens are estimated at approximately 4 characters per token, with a 1.3x safety margin for JSON serialization overhead.

Access Tracking

Loading memories automatically records access for salience-based forgetting. Frequently accessed memories maintain higher salience and are less likely to be forgotten.
# Standard load
kernle -s my-project load

# Force sync from cloud first
kernle -s my-project load --sync

# Load with token budget (recommended)
kernle -s my-project load --budget 6000

# Get JSON with budget metrics
kernle -s my-project load --json --budget 8000

checkpoint

Save and restore session state.

checkpoint save

kernle -s <stack> checkpoint save TASK [options]
OptionDescription
-p, --pending PENDINGPending item (repeatable)
-c, --context CONTEXTAdditional context
--progress PROGRESSCurrent progress on the task
-n, --next NEXTImmediate next step
-b, --blocker BLOCKERCurrent blocker if any
-s, --syncForce sync after saving
--no-syncSkip sync
Use --progress, --next, and --blocker for better context recovery. These structured fields help your SI resume work more effectively.
kernle -s my-project checkpoint save "Working on user authentication"

checkpoint load

kernle -s <stack> checkpoint load [--json]

checkpoint clear

kernle -s <stack> checkpoint clear

Search memory using vector similarity.
kernle -s <stack> search QUERY [--limit LIMIT]
OptionDescription
-l, --limit LIMITMaximum results (default: 10)
kernle -s my-project search "authentication"
kernle -s my-project search "database performance" --limit 5

status

Show memory status overview.
kernle -s <stack> status
Example output:
Memory Status for my-project
========================================
Values:     3
Beliefs:    12
Goals:      2 active
Episodes:   45
Raw:        8 (5 unprocessed)
Notes:      23
Checkpoint: Yes (2 hours ago)

when

Query memories by time period.
kernle -s <stack> when [PERIOD]
PeriodDescription
todayToday’s memories (default)
yesterdayYesterday’s memories
this weekThis week’s memories
last hourLast hour’s memories
kernle -s my-project when yesterday
kernle -s my-project when "this week"

anxiety

Memory anxiety tracking and management.
kernle -s <stack> anxiety [options]
OptionDescription
-d, --detailedShow detailed breakdown
-a, --actionsShow recommended actions
--autoExecute recommended actions
-c, --context TOKENSCurrent context token usage
-l, --limit LIMITContext window limit (default: 200000)
-e, --emergencyRun emergency save immediately
-s, --summarySummary for emergency save
-j, --jsonOutput as JSON
kernle -s my-project anxiety
# Output: Memory Anxiety: 45/100 (Aware)

identity

Identity synthesis operations.

identity show

Generate a coherent identity narrative.
kernle -s <stack> identity show [--json]
# or just:
kernle -s <stack> identity

identity confidence

Check identity coherence score.
kernle -s <stack> identity confidence [--json]

identity drift

Detect identity drift over time.
kernle -s <stack> identity drift [--days DAYS] [--json]
OptionDescription
-d, --days DAYSDays to look back (default: 30)

emotion

Emotional memory operations.

emotion summary

kernle -s <stack> emotion summary [--days DAYS] [--json]
Search by emotional characteristics.
kernle -s <stack> emotion search [options]
OptionDescription
--positiveFind positive episodes
--negativeFind negative episodes
--calmFind low-arousal episodes
--intenseFind high-arousal episodes
-t, --tag TAGEmotion tag to match
-l, --limit LIMITMaximum results (default: 10)
kernle -s my-project emotion search --positive --limit 5
kernle -s my-project emotion search --negative --intense

emotion tag

Add emotional tags to an episode.
kernle -s <stack> emotion tag EPISODE_ID [--valence V] [--arousal A] [--tag TAG]...

emotion mood

Get mood-relevant memories.
kernle -s <stack> emotion mood --valence V --arousal A [--limit LIMIT]

meta

Meta-memory operations.

meta confidence

Get confidence for a memory.
kernle -s <stack> meta confidence TYPE ID

meta verify

Verify a memory (increases confidence).
kernle -s <stack> meta verify TYPE ID [--evidence EVIDENCE]

meta lineage

Get provenance chain.
kernle -s <stack> meta lineage TYPE ID [--json]

meta uncertain

List low-confidence memories.
kernle -s <stack> meta uncertain [--threshold T] [--limit L]

meta knowledge

Show knowledge map.
kernle -s <stack> meta knowledge [--json]

meta gaps

Detect knowledge gaps.
kernle -s <stack> meta gaps QUERY [--json]

meta boundaries

Show competence boundaries.
kernle -s <stack> meta boundaries [--json]

meta learn

Identify learning opportunities.
kernle -s <stack> meta learn [--limit LIMIT]

forget

Controlled forgetting operations for memory maintenance. Kernle uses salience-based forgetting to help memories gracefully fade while preserving core identity.
Salience Formula: Kernle calculates memory salience as:
salience = (confidence × reinforcement_weight) / (age_factor + 1)
where:
  • reinforcement_weight = log(times_accessed + 1)
  • age_factor = days_since_last_access / half_life (half_life = 30 days)
Lower salience = more likely to be forgotten. Protected memories and memories above the threshold are never forgotten.

forget candidates

Show forgetting candidates (low-salience memories eligible for forgetting).
kernle -s <stack> forget candidates [--threshold T] [--limit L]
OptionDescription
-t, --threshold TSalience threshold (default: 0.3)
-l, --limit LMaximum candidates (default: 20)

forget run

Run forgetting cycle.
kernle -s <stack> forget run [--dry-run] [--threshold T] [--limit L]
OptionDescription
--dry-runPreview what would be forgotten without actually forgetting
-t, --threshold TSalience threshold (default: 0.3)
-l, --limit LMaximum memories to forget (default: 10)
# Preview what would be forgotten
kernle -s my-project forget run --dry-run

# Actually forget low-salience memories
kernle -s my-project forget run --threshold 0.2 --limit 5
Forgetting is reversible via forget recover, but run with --dry-run first to review candidates.

forget protect

Protect a memory from forgetting. Protected memories never decay and cannot be forgotten.
kernle -s <stack> forget protect TYPE ID [--unprotect]
OptionDescription
--unprotectRemove protection from the memory
Values and Drives are protected by default and excluded from forgetting candidates.

forget recover

Recover a forgotten (tombstoned) memory. Forgotten memories are not deleted - they can always be recovered.
kernle -s <stack> forget recover TYPE ID

forget list

List all forgotten (tombstoned) memories.
kernle -s <stack> forget list [--limit L]
OptionDescription
-l, --limit LMaximum results (default: 50)

forget salience

Check the salience score of a specific memory. Useful for understanding why a memory is or isn’t a forgetting candidate.
kernle -s <stack> forget salience TYPE ID
Shows:
  • Current salience score with visual bar
  • Component breakdown (confidence, access count, protection status)
  • Status interpretation (critical/low/moderate/high salience)
kernle -s my-project forget salience episode abc12345

dump

Dump all memory to stdout.
kernle -s <stack> dump [--format {markdown,json}] [--include-raw] [--no-raw]
OptionDescription
-f, --formatOutput format (default: markdown)
-r, --include-rawInclude raw entries (default: true)
--no-rawExclude raw entries
kernle -s my-project dump | less
kernle -s my-project dump --format json

export

Export memory to a file.
kernle -s <stack> export PATH [--format {markdown,json}]
Format is auto-detected from file extension if not specified.
kernle -s my-project export backup.md
kernle -s my-project export memory-snapshot.json --format json

export-full

Export complete agent context (all memory layers) to a single file. Unlike export (full memory dump), export-full assembles all memory layers — boot config, values, beliefs, goals, episodes, notes, drives, relationships, self-narratives, trust assessments, playbooks, and checkpoint — into one comprehensive file.
kernle -s <stack> export-full [PATH] [--format {markdown,json}] [--include-raw] [--no-raw]
OptionDescription
PATHOutput file path (default: stdout)
-f, --formatOutput format (auto-detected from extension if not specified, default: markdown)
-r, --include-rawInclude raw entries (default: true)
--no-rawExclude raw entries
# Export to file
kernle -s my-project export-full context.md

# Export as JSON
kernle -s my-project export-full context.json --format json

# Print to stdout
kernle -s my-project export-full

process

Run or check automated memory processing (model-driven layer promotion). Processing uses a bound model to automatically promote memories across layers (e.g., raw entries to episodes, episodes to beliefs).

process run

Run memory processing transitions.
kernle -s <stack> process run [--transition TRANSITION] [--force] [--json]
OptionDescription
-t, --transition TRANSITIONSpecific transition to process (omit to check all)
-f, --forceProcess even if quantity thresholds are not met
-j, --jsonOutput as JSON
Available transitions:
TransitionDescription
raw_to_episodePromote raw entries to episodes
raw_to_notePromote raw entries to notes
episode_to_beliefExtract beliefs from episodes
episode_to_goalDerive goals from episodes
episode_to_relationshipDetect relationships from episodes
episode_to_driveIdentify drives from episodes
belief_to_valuePromote beliefs to values
kernle -s my-project process run
process run and process exhaust auto-bind a model from environment variables (CLAUDE_API_KEY / ANTHROPIC_API_KEY) if none is already bound. You can also bind one explicitly with kernle model set claude.

process status

Show unprocessed memory counts and whether each transition’s quantity threshold has been met.
kernle -s <stack> process status [--json]
OptionDescription
-j, --jsonOutput as JSON
kernle -s my-project process status
Example output:
Memory Processing Status
========================================
Unprocessed raw entries:  12
Unprocessed episodes:    8
Unprocessed beliefs:     3

Trigger Status:
  raw_to_episode: 12/5 (READY)
  raw_to_note: 12/5 (READY)
  episode_to_belief: 8/3 (READY)
  episode_to_goal: 8/10 (waiting)
  episode_to_relationship: 8/5 (READY)
  episode_to_drive: 8/10 (waiting)
  belief_to_value: 3/5 (waiting)

process exhaust

Run processing cycles repeatedly until convergence (no more promotions possible).
kernle -s <stack> process exhaust [--max-cycles N] [--no-auto-promote] [--dry-run] [--json] [--batch-size N] [--verbose]
OptionDescription
--max-cycles NMaximum processing cycles (default: 20)
--no-auto-promoteCreate suggestions instead of directly promoting
-n, --dry-runPreview what would run without making changes
-j, --jsonOutput as JSON
-b, --batch-size NOverride batch size for processing
-v, --verboseEnable verbose logging
# Run until convergence (auto-binds model from env vars)
kernle -s my-project process exhaust

# Preview only
kernle -s my-project process exhaust --dry-run

# With verbose logging
kernle -s my-project process exhaust --verbose

model

Show, bind, or unbind inference models. Model binding is session-only (not persisted to disk). Process commands auto-bind from environment variables, but model set lets you bind explicitly.

model show

Show the currently bound model.
kernle -s <stack> model show [--json]
OptionDescription
-j, --jsonOutput as JSON
kernle -s my-project model show
# Output: Model: anthropic / claude-haiku-4-5-20251001

model set

Bind a model provider.
kernle -s <stack> model set <provider> [--model-id MODEL_ID]
Argument / OptionDescription
providerProvider to use: claude, openai, or ollama
--model-idOverride the default model name
Default models per provider:
ProviderDefault ModelEnv Var
claudeclaude-haiku-4-5-20251001CLAUDE_API_KEY or ANTHROPIC_API_KEY
openaigpt-4o-miniOPENAI_API_KEY
ollamallama3.2:latest(local server, no key)
kernle -s my-project model set claude
# Bound model: anthropic / claude-haiku-4-5-20251001

model clear

Unbind the currently bound model.
kernle -s <stack> model clear

init

Initialize Kernle by generating a CLAUDE.md/AGENTS.md health check section.
kernle -s <stack> init [options]
OptionDescription
-s, --style {standard,minimal,combined}Section style (default: standard)
-o, --output PATHOutput file path (auto-detects CLAUDE.md/AGENTS.md)
-p, --printPrint to stdout instead of writing
-f, --forceOverwrite/append even if Kernle section already exists
--no-per-messageSkip per-message health check section
-y, --non-interactiveUse defaults (no prompts)
--full-setupFull setup: instruction file + seed beliefs + platform hooks
# Interactive
kernle -s my-project init

# Non-interactive
kernle -s my-project init -y --style minimal

suggestions

Manage memory suggestions (auto-generated recommendations from the processing pipeline).

suggestions list

kernle -s <stack> suggestions list [options]
OptionDescription
--pendingShow only pending suggestions
--approvedShow only approved (promoted) suggestions
--rejectedShow only rejected suggestions
--dismissedShow only dismissed suggestions
--expiredShow only expired suggestions
--type TYPEFilter by memory type
--min-confidence CMinimum confidence threshold
--max-age-hours HMaximum age in hours
--source SOURCEFilter by source raw entry ID
-l, --limit LMaximum results (default: 50)
-j, --jsonOutput as JSON

suggestions show

Show details for a specific suggestion. Supports partial ID matching.
kernle -s <stack> suggestions show ID [--json]

suggestions accept

Accept a suggestion and promote it to structured memory. Supports all 7 memory types (episode, belief, note, goal, value, relationship, drive).
kernle -s <stack> suggestions accept ID [--objective O] [--outcome O] [--statement S] [--content C]
OptionDescription
--objective OOverride objective (for episodes)
--outcome OOverride outcome (for episodes)
--statement SOverride statement (for beliefs)
--content COverride content (for notes)

suggestions dismiss

Dismiss a suggestion with an optional reason.
kernle -s <stack> suggestions dismiss ID [--reason R]

suggestions expire

Expire stale pending suggestions older than a threshold.
kernle -s <stack> suggestions expire [--max-age-hours H]
OptionDescription
--max-age-hours HAge threshold in hours (default: 168 / 7 days)

suggestions extract

Extract new suggestions from unprocessed raw entries.
kernle -s <stack> suggestions extract [--limit L]
OptionDescription
-l, --limit LMaximum raw entries to process (default: 50)

stack

Manage local stacks.

stack list

List all stacks in ~/.kernle/.
kernle stack list

stack delete

Delete a stack and all its data.
kernle stack delete NAME [--force]
OptionDescription
--forceSkip confirmation prompt
This permanently deletes the stack’s database records and directory. Cannot be undone.

doctor

Validate boot sequence compliance and system health.
kernle -s <stack> doctor [--json]
Checks:
  • Memory system initialization
  • Storage accessibility
  • Required tables exist
  • Embedding provider availability
  • Sync credentials (if configured)

stats

Usage statistics and health check tracking.

stats health-checks

Show health check compliance over time.
kernle -s <stack> stats health-checks [--days DAYS] [--json]
OptionDescription
-d, --days DAYSDays to look back (default: 30)

mcp

Start MCP server (stdio transport).
kernle -s <stack> mcp
Used for integration with MCP-compatible tools. See MCP Integration.