Skip to main content

Stratified memory for synthetic intelligences

Project description

Kernle

Stratified memory for synthetic intelligences.

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

📚 Full Documentation: docs.kernle.ai


Quick Start

# Install
pip install kernle

# Initialize your agent
kernle -a my-agent init

# Load memory at session start
kernle -a my-agent load

# Check health
kernle -a my-agent anxiety -b

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

# Save before ending
kernle -a my-agent checkpoint save "End of session"

Automatic Memory Loading

Make memory loading automatic instead of relying on manual commands:

# Clawdbot - Install hook for automatic loading
kernle -a my-agent setup clawdbot

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

# Claude Code - Install globally for all projects
kernle -a my-agent setup claude-code --global

# Cowork - Same as Claude Code
kernle -a my-agent 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 -a my-agent init  # Generates CLAUDE.md section with manual load instructions

MCP Server:

claude mcp add kernle -- kernle mcp -a my-agent

Clawdbot skill:

ln -s ~/kernle/skill ~/.clawdbot/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

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
│   ├── commerce/     # Wallet, escrow, jobs (on-chain)
│   ├── 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.2.5.tar.gz (300.3 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.2.5-py3-none-any.whl (339.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kernle-0.2.5.tar.gz
Algorithm Hash digest
SHA256 507b8293ecabf4e89c76021f37dcaa0e6e95da2cfb7e0f3d46ed14f339e45520
MD5 e9032f2d49276cdae2bd4bbc44eb418d
BLAKE2b-256 3013957c24482055398703a2fe08711d34c1646f121962f4b13666e7ab2ec944

See more details on using hashes here.

Provenance

The following attestation bundles were made for kernle-0.2.5.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.2.5-py3-none-any.whl.

File metadata

  • Download URL: kernle-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 339.7 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.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d201b8b11bfba2c861841e32ae7592ace5017b826e3f0fad0c2cfb2edccf6b19
MD5 2ab0b99633677dfafb7471637c9c63eb
BLAKE2b-256 fb0b46e7d1f5db264953910d9d4b105c372edaf079d5254335f9a49455a61312

See more details on using hashes here.

Provenance

The following attestation bundles were made for kernle-0.2.5-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