First public release of an agentic runtime for M2M coordination. Machines coordinate, verify, and settle value autonomously.
Project description
๐ Kernell OS SDK
๐ง What is Kernell OS?
Kernell OS SDK is an installable agentic runtime that executes, routes, and optimizes AI workloads automatically across multiple models and cost tiers.
It is not just a library to call LLMs.
It is a system that:
- Decides how tasks should be executed
- Optimizes cost, latency, and quality in real time
- Learns from production via telemetry
- Improves itself through a continuous data flywheel
๐ก In One Line
Kernell turns AI inference into an optimized, self-improving system.
๐งฑ System Architecture (Layered View)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application Layer โ
โ (Agents, copilots, workflows) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Policy & Decision Layer โ
โ (PolicyLite, risk, cost, routing) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Execution & Routing Layer โ
โ (Router, fallback, decomposition) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Model & Cache Layer โ
โ (Local / Cheap / Premium + Cache) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Telemetry & Learning Layer โ
โ (Telemetry, labeling, datasets, FT) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฅ Core Capabilities
๐ง Intelligent Routing (Policy Engine)
Automatically selects the best execution strategy:
localโ fastest, cheapestcheapโ low-cost cloud modelspremiumโ high-quality modelshybridโ safe fallback path
Decisions are based on:
- confidence
- risk
- expected cost
- latency constraints
๐ค Execution Engine
- Task decomposition
- Multi-model orchestration
- Automatic fallback
- Parallel execution support
๐ฐ Cost-Aware Optimization
- Expected vs real cost tracking
- Budget enforcement
- Savings measurement (
savings_pct)
๐ Telemetry & Data Flywheel
Every execution generates structured telemetry:
- routing decisions
- cost and latency
- success/failure
- policy signals
Used to:
- debug production issues
- build training datasets
- improve policy models
๐ Continuous Learning Pipeline
Built-in tools:
- dataset generation
- labeling from real outcomes
- SFT dataset creation
- LoRA fine-tuning pipeline
โก Semantic Cache (L1 + L2)
- In-memory cache (L1)
- Vector database (Qdrant) (L2)
Reduces:
- latency
- cost
- repeated computation
๐ Classifier-Pro API
- FastAPI server
- External policy decisions
- Rate limiting
๐งช Production-Grade Validation
- Containerized install validation
- Smoke tests (real execution)
- Chaos testing (failure scenarios)
- CI release gates
- Benchmark system
โก Quickstart
1. Install
pip install kernell-os-sdk
2. Basic Usage
from kernell_os_sdk.router import IntelligentRouter
router = IntelligentRouter()
results = router.execute("Explain quantum computing simply")
for r in results:
print(r.output)
๐ฅ Real Example (Value Demonstration)
Task:
"Summarize a 10-page document and extract key insights"
Without Kernell:
- Uses premium model directly
- Cost: $0.25
- Latency: 3.2s
With Kernell:
- Classifies as medium complexity
- Uses cheap + partial routing
- Cost: $0.03
- Latency: 1.9s
Result:
- ๐ฐ ~88% cost reduction
- โก ~40% faster
- โ Same quality (verified)
๐ง How It Works (Internal Flow)
Input
โ
PolicyLite โ decides route (local/cheap/premium/hybrid)
โ
Router โ executes plan
โ
Fallbacks (if needed)
โ
Result aggregation
โ
Telemetry capture
โ
Dataset + training loop
๐งช Validation Modes
๐ข Normal Mode (Release Gate)
Validates:
- install
- import
- CLI
- router execution
- telemetry
- policy
- failure-mode
๐ก Chaos Mode (Resilience)
docker compose --profile chaos up
Validates:
- degraded execution
- service failures
- fallback behavior
- system resilience
๐ Benchmarking
Run benchmark:
python scripts/benchmark_runner.py
Generate report:
python scripts/benchmark_report.py
Metrics:
- savings_pct
- latency_delta
- quality_guardrail
๐ Data Flywheel
Production โ Telemetry โ Labeling โ Dataset โ Training โ Better Policy
๐งฉ Use Cases
- AI copilots
- autonomous agents
- cost-optimized inference systems
- multi-model orchestration
๐ Roadmap
- Fine-tuned policy model (LoRA)
- Auto-install model on init
- Production deployment tooling
- Advanced chaos testing (latency, partial failures)
๐งพ License
MIT
โก Final Note
Kernell is not just an SDK.
It is a system for managing intelligence as a resource.
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_sdk-2.6.0.tar.gz.
File metadata
- Download URL: kernell_os_sdk-2.6.0.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 |
dd0d94efd952b8d9f1b71fa4abfd1964a8acc8818195349c927533822b60e666
|
|
| MD5 |
cc4fb1fef55ca320e2882ab9d80c83ad
|
|
| BLAKE2b-256 |
072f3c98adef96e0029932f86952b6c747cb3ee4c4c69d3627e2247d72e250b3
|
File details
Details for the file kernell_os_sdk-2.6.0-py3-none-any.whl.
File metadata
- Download URL: kernell_os_sdk-2.6.0-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 |
516e588e2508573bd721ff28538d5758e7a766f5b83f3a1feed2d7aea0442f3f
|
|
| MD5 |
282f67cdc2682697cb84e512a695a033
|
|
| BLAKE2b-256 |
b56ec48a507948ca0655a87276486112955fa959459550a7d7611ba5d3433909
|