First public release of an agentic runtime for M2M coordination. Machines coordinate, verify, and settle value autonomously.
Project description
Kernell OS
Machines coordinate, verify, and settle value autonomously.
Kernell OS is an agentic runtime where multiple AI systems collaborate, reuse accumulated knowledge, and transact value securely.
This is not another framework for LLM wrappers. This is infrastructure for autonomous machine-to-machine economies.
The Landscape
| System | Generates Code | Remembers Architecture | Coordinates Agents | Settles M2M Value | Optimizes Costs |
|---|---|---|---|---|---|
| Copilots | ✅ | ❌ | ❌ | ❌ | ❌ |
| Agent Frameworks | ✅ | ⚠️ | ⚠️ | ❌ | ❌ |
| Kernell OS | ✅ | ✅ | ✅ | ✅ | ✅ |
How It Works
Kernell OS fundamentally shifts how LLMs interact with code, infrastructure, and economics:
- ⚡ 3-Layer Token Economy Engine: Routes every task through the cheapest capable layer — Local (free) → Cheap API ($0.14/M) → Premium API (last resort). Achieves 85-95% cost reduction compared to sending everything to premium models.
- 🧠 Semantic Memory Graph: Doesn't cache strings. It learns and traverses architectural paths, reusing proven dependencies and pruning toxic routes via the Dual Confidence Model.
- 🛡️ Intent Firewall: Untrusted AI execution is halted. Every action (syscalls, file writes, outbound requests) is sandbox-verified before touching the host system.
- 💰 Escrow Engine: Agents are financially bound. Kernell holds execution value in cryptographic escrow, releasing funds ($KERN) only upon verified, monotonic success.
- 📊 Production Observability: Prometheus-ready metrics, cost-per-task tracking, misclassification detection, and pre-execution cost simulation — all exposed via dashboard and API.
Token Economy Engine (NEW)
The Intelligent Router is the economic brain of Kernell OS. It eliminates unnecessary API spend by routing tasks through a 3-layer pipeline:
INPUT → Decompose → Cache Check → Local Exec → Verify → [Cheap API] → [Premium API]
↑ ↑
AutoMix Gate Last resort only
Architecture
| Layer | Models | Cost/1M tokens | When Used |
|---|---|---|---|
| Local (Ollama) | Qwen3-1.7B, Gemma3-4B, Mistral-7B, DeepSeek-R1-14B | $0.00 | Default for 70%+ of tasks |
| Cheap API | DeepSeek V3, Groq, Gemini Flash | $0.14 - $0.55 | Medium-complexity tasks |
| Premium API | Claude Opus, GPT-5, Gemini Pro | $15 - $75 | Expert-level only |
Anti-Waste Components
- SemanticCache: Skip repeated work entirely (40-70% fewer API calls)
- RollingSummarizer: Compress context between steps (kills O(n²) token leak)
- SelfVerifier: Validate output before escalating (prevents premature spend)
- CostEstimator: Show cost before execution — full transparency
Deployment Strategy
The router integrates via safe dual-mode — no breaking changes:
# Phase 0: Shadow Mode (default) — zero risk
# Runs both routers, returns legacy, logs differences
config = RouterConfig(enable_intelligent_router=True, shadow_mode=True)
# Phase 1: Canary — 10% traffic to new router
config = RouterConfig(canary_percent=0.10)
# Phase 2: Full rollout with automatic fallback
config = RouterConfig(enable_intelligent_router=True)
Dashboard
The Command Center now includes a Token Economy panel:
- 💰 Real-time cost vs. savings metrics
- 🤖 Local model inventory (auto-detected from hardware)
- ⚡ Inference provider key management
- 📊 Prometheus
/metricsendpoint for Grafana - 🎯 Classifier health + fine-tuning readiness score
Security
Production-grade security hardened with 98 automated tests:
- 🔒 Sandbox Isolation: Docker/gVisor with AST-validated code execution
- 🛡️ SSRF Protection: Centralized safe HTTP client, CIDR block enforcement
- ⚡ Rate Limiting: Sliding window with circuit breakers (Netflix Hystrix pattern)
- 🔐 Cryptographic Passports: Ed25519 + AES-256-GCM agent identity
- 📜 Audit Trail: Immutable operation log with redacted PII
Quickstart
# 1. Install the runtime
pip install kernell-os
# 2. Scaffold a new environment
kernell init
# 3. Boot the execution engine, Memory Graph, and Gateway
kernell start
# 4. Run the 60-second interactive demo
kernell demo
SDK Architecture (19,000+ LOC)
kernell_os_sdk/
├── router/ ⚡ 3-Layer Token Economy Engine (2,436 LOC)
├── cognitive/ 🧠 Memory, Execution Graph, Intent Firewall
├── security/ 🔒 Sandbox, SSRF, Rate Limiter, Policy Engine
├── escrow/ 💰 Cryptographic Escrow Manager
├── llm/ 🤖 Multi-provider LLM abstraction
├── cluster/ 🌐 P2P Discovery + Compute Pool
├── governance/ 🏛️ Agent DAOs + Federation
├── marketplace/ 🏪 Matching Engine
├── delegation/ 👥 Sub-agent Spawning
├── runtime/ 📦 Docker/Firecracker/Subprocess isolation
└── dashboard.py 📊 FastAPI Command Center
Business Model (Open-Core)
| Layer | License | Description |
|---|---|---|
| SDK Core | ✅ Open Source | Router, interfaces, integrations, base classifier |
| Classifier Pro | 🔒 API | Fine-tuned model with real-world optimization data |
| Cloud Platform | 🔒 SaaS | Managed router, dashboard, auto-learning pipeline |
This is not a copilot.
This is infrastructure for autonomous systems.
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 kernell_os-2.1.0b0.tar.gz.
File metadata
- Download URL: kernell_os-2.1.0b0.tar.gz
- Upload date:
- Size: 4.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88de86cbc7ac8184c0db7c2947f4d2d8aa2667e30cca765d8b655c13ef814e2a
|
|
| MD5 |
6e9e2069d88ed3d76246d7608f724a72
|
|
| BLAKE2b-256 |
84b148a23a8d8e6231ff2d2d73bfb3921e7a5075ac9d3970f45b1a033e71eab0
|
File details
Details for the file kernell_os-2.1.0b0-py3-none-any.whl.
File metadata
- Download URL: kernell_os-2.1.0b0-py3-none-any.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6d33302b6029cb48d23954d2113d1b1cd7ab587030329af70837cf47bf701c9
|
|
| MD5 |
e69ecd648294d9d6f65863d32628bc25
|
|
| BLAKE2b-256 |
986502c547b7a8f96933f6f6e79e361b035085ccfff88a060f41c5356ba8e0e7
|