Skip to main content

Stratified memory for synthetic intelligences

Project description

Kernle

Stratified memory for synthetic intelligences.

Kernle gives synthetic intelligences persistent memory, emotional awareness, and identity continuity. It's the cognitive infrastructure for synthetic intelligences that grow, adapt, and remember who they are.

📚 Full Documentation: docs.kernle.ai


Quick Start

# Install
pip install kernle

# Initialize your stack
kernle -s my-stack init

# Load memory at session start
kernle -s my-stack load

# Check health
kernle -s my-stack anxiety -b

# Capture experiences
kernle -s my-stack episode "Deployed v2" "success" --lesson "Always run migrations first"
kernle -s my-stack raw "Quick thought to process later"

# Save before ending
kernle -s my-stack checkpoint save "End of session"

Automatic Memory Loading

Make memory loading automatic instead of relying on manual commands:

# OpenClaw - Install hook for automatic loading
kernle -s my-stack setup openclaw

# Claude Code - Install SessionStart hook (project-level)
kernle -s my-stack setup claude-code

# Claude Code - Install globally for all projects
kernle -s my-stack setup claude-code --global

# Cowork - Same as Claude Code
kernle -s my-stack setup cowork

After setup, memory loads automatically at every session start. No more forgetting to run kernle load!

See kernle/hooks/ directory for manual installation or kernle setup --help for details.

Other Integrations

Manual CLAUDE.md setup:

kernle -s my-stack init  # Generates CLAUDE.md section with manual load instructions

MCP Server:

claude mcp add kernle -- kernle mcp -s my-stack

OpenClaw skill:

ln -s ~/kernle/skill ~/.openclaw/skills/kernle

Features

  • 🧠 Stratified Memory — Values → Beliefs → Goals → Episodes → Notes
  • 💭 Psychology — Drives, emotions, anxiety tracking, identity synthesis
  • 🔗 Relationships — Social graphs with trust and interaction history
  • 📚 Playbooks — Procedural memory with mastery tracking
  • 🏠 Local-First — Works offline, syncs to cloud when connected
  • 🔍 Readablekernle dump exports everything as markdown

Documentation

Resource URL
Full Docs docs.kernle.ai
Quickstart docs.kernle.ai/quickstart
CLI Reference docs.kernle.ai/cli/overview
API Reference docs.kernle.ai/api-reference

Development

# Clone
git clone https://github.com/emergent-instruments/kernle
cd kernle

# Install with dev deps
uv sync --all-extras

# Run tests
uv run pytest tests/ -q

# Dev notes
cat dev/README.md

Temporal Vision

Kernle is cognitive infrastructure for beings with a life — not just a session. The design spans five temporal horizons:

Horizon What Works Today What's Planned
1 session Budget-aware loading, checkpoints Memory echoes (peripheral awareness)
1 month Consolidation scaffold, belief formation Cross-domain scaffolding, emotional weighting
1 year Forgetting, provenance, identity coherence Epochs, relationship history, goal types
5 years Stack portability, multi-model loading Self-narrative, trust layer, drive emergence
20 years Stack sovereignty, privacy architecture Fractal summarization, doctor pattern, transfer learning

Architecture

This repo contains the core Kernle library — everything you need to run Kernle locally or build your own backend.

kernle/
├── kernle/           # Core library
│   ├── core.py       # Memory manager
│   ├── cli/          # CLI commands

│   ├── features/     # Anxiety, emotions, forgetting
│   ├── storage/      # SQLite + Postgres backends
│   └── mcp/          # MCP server for IDE integration
└── tests/

The hosted cloud API (api.kernle.ai) is maintained separately.

Status

See ROADMAP.md for development plans.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kernle-0.10.0.tar.gz (360.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kernle-0.10.0-py3-none-any.whl (404.3 kB view details)

Uploaded Python 3

File details

Details for the file kernle-0.10.0.tar.gz.

File metadata

  • Download URL: kernle-0.10.0.tar.gz
  • Upload date:
  • Size: 360.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kernle-0.10.0.tar.gz
Algorithm Hash digest
SHA256 796267f37161f06974d464b2b729725b123a579057f9b001d00cc0dc254af63d
MD5 f4a2981c8d1837753df9a858675e094c
BLAKE2b-256 76c3d963c19756e4436bf8556473f89d09337f1a392a5185980999eeaf5ca4ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for kernle-0.10.0.tar.gz:

Publisher: publish.yml on emergent-instruments/kernle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kernle-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: kernle-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 404.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kernle-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 617abf1bb3daee7be44df2c733324a65171792e13fbb2dec0ab54efc12a9a737
MD5 a9d694c39da5b8bfa0303784a8dac79b
BLAKE2b-256 df221f5319795fe1aa12079f3ab3993bd7c193d7c122f71ab81cac0e8ffe0999

See more details on using hashes here.

Provenance

The following attestation bundles were made for kernle-0.10.0-py3-none-any.whl:

Publisher: publish.yml on emergent-instruments/kernle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page