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
Coverage policy is configured in pyproject.toml and enforced in both local make test-cov and CI coverage runs.
Audit tracking submodule (private)
The full audit corpus is kept in a private submodule: audits/ (repo emergent-instruments/kernle-audits).
# Initialize / refresh submodules on a fresh clone
git submodule update --init --recursive
# Update local submodule pointer to latest commit in audits/main
git submodule update --remote audits
To edit audits:
# Work inside the private repo
cd audits
git pull
git status
# Make edits, commit, and push in the private repo
git add .
git commit -m "Update audit pass findings"
git push
# Return to main repo and record the new pointer
cd ..
git add audits
git commit -m "chore: bump audits submodule pointer"
CI checks out submodules during test/release jobs. If private access fails in CI, set SUBMODULE_PAT in repository secrets with read access to kernle-audits.
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-first storage + stack interfaces
│ └── mcp/ # MCP server for IDE integration
└── tests/
The hosted cloud API (api.kernle.ai) is maintained separately.
Status
- Coverage Gate: branch coverage must remain at or above
85% - Ratcheting Policy: coverage floor only moves upward; any decrease requires explicit maintainer approval
- 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.13.13.tar.gz.
File metadata
- Download URL: kernle-0.13.13.tar.gz
- Upload date:
- Size: 454.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
494cb0b0259f1bab866dc685827dda0795d970378673f34dd44b17a86c49a10d
|
|
| MD5 |
7420741a51569e928d10e4ba493b74fb
|
|
| BLAKE2b-256 |
1d1beaad1c844d6b5680d6754ae94eb87775ddadb1acb34aa3da061bb708c72c
|
Provenance
The following attestation bundles were made for kernle-0.13.13.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.13.13.tar.gz -
Subject digest:
494cb0b0259f1bab866dc685827dda0795d970378673f34dd44b17a86c49a10d - Sigstore transparency entry: 956223724
- Sigstore integration time:
-
Permalink:
emergent-instruments/kernle@f1b9f677b491df194a442a32d77c3d86ef8fe8f3 -
Branch / Tag:
refs/tags/v0.13.13 - Owner: https://github.com/emergent-instruments
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f1b9f677b491df194a442a32d77c3d86ef8fe8f3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kernle-0.13.13-py3-none-any.whl.
File metadata
- Download URL: kernle-0.13.13-py3-none-any.whl
- Upload date:
- Size: 537.9 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 |
8ece3e9461abf9dd16eb29ec03ba91402d48f941c40de5b3d59d2e02ec502f4d
|
|
| MD5 |
3ae9ec0cf28c130af49d75d9f36d45c2
|
|
| BLAKE2b-256 |
15e5f8d351171675d9adc6e88e60b89627897f523bd39381719d236077ffbb54
|
Provenance
The following attestation bundles were made for kernle-0.13.13-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.13.13-py3-none-any.whl -
Subject digest:
8ece3e9461abf9dd16eb29ec03ba91402d48f941c40de5b3d59d2e02ec502f4d - Sigstore transparency entry: 956223726
- Sigstore integration time:
-
Permalink:
emergent-instruments/kernle@f1b9f677b491df194a442a32d77c3d86ef8fe8f3 -
Branch / Tag:
refs/tags/v0.13.13 - Owner: https://github.com/emergent-instruments
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f1b9f677b491df194a442a32d77c3d86ef8fe8f3 -
Trigger Event:
release
-
Statement type: