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:
# Claude Code - Setup hooks for automatic loading + checkpointing + write interception
kernle setup claude-code
# OpenClaw - Install plugin for automatic loading + checkpointing
cd integrations/openclaw && npm install && npm run build
openclaw plugins install ./integrations/openclaw
After setup, memory loads automatically at every session start. No more forgetting to run kernle load!
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
- 🔍 Readable —
kernle dumpexports 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
- Tests: 2971 passing
- Coverage: 63%
- Cloud API: api.kernle.ai (Railway + Supabase)
- Docs: docs.kernle.ai (Mintlify)
See ROADMAP.md for development plans.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kernle-0.11.8.tar.gz.
File metadata
- Download URL: kernle-0.11.8.tar.gz
- Upload date:
- Size: 346.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b54c23a8763da78c2fc543c78f64002b36d58036bcc01c4ecaf1084def01bf3
|
|
| MD5 |
e664e2ee79e53d5cbe2ce9ba1f7bfe07
|
|
| BLAKE2b-256 |
05b36ab5cdb010af9f8acc7af2a9181c411fa1c6cdd10f208a5916e4936228eb
|
Provenance
The following attestation bundles were made for kernle-0.11.8.tar.gz:
Publisher:
publish.yml on emergent-instruments/kernle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kernle-0.11.8.tar.gz -
Subject digest:
6b54c23a8763da78c2fc543c78f64002b36d58036bcc01c4ecaf1084def01bf3 - Sigstore transparency entry: 934978654
- Sigstore integration time:
-
Permalink:
emergent-instruments/kernle@c893ec4522e8531b559f0b4e4a5bc735e3abc716 -
Branch / Tag:
refs/tags/v0.11.8 - Owner: https://github.com/emergent-instruments
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c893ec4522e8531b559f0b4e4a5bc735e3abc716 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kernle-0.11.8-py3-none-any.whl.
File metadata
- Download URL: kernle-0.11.8-py3-none-any.whl
- Upload date:
- Size: 404.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d1df2610d023a19cf81d03e3743111a89142c37bde9c7ef855be60cea33c2a6
|
|
| MD5 |
ed1f56cb05f53dbfaaf5536723c4671d
|
|
| BLAKE2b-256 |
ec7542cfed64cd9e61de9862cb3212cda17461cb8ec98518d997acc67374c7d8
|
Provenance
The following attestation bundles were made for kernle-0.11.8-py3-none-any.whl:
Publisher:
publish.yml on emergent-instruments/kernle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kernle-0.11.8-py3-none-any.whl -
Subject digest:
4d1df2610d023a19cf81d03e3743111a89142c37bde9c7ef855be60cea33c2a6 - Sigstore transparency entry: 934978716
- Sigstore integration time:
-
Permalink:
emergent-instruments/kernle@c893ec4522e8531b559f0b4e4a5bc735e3abc716 -
Branch / Tag:
refs/tags/v0.11.8 - Owner: https://github.com/emergent-instruments
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c893ec4522e8531b559f0b4e4a5bc735e3abc716 -
Trigger Event:
release
-
Statement type: