Skip to main content

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, cheapest
  • cheap โ†’ low-cost cloud models
  • premium โ†’ high-quality models
  • hybrid โ†’ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kernell_os_sdk-2.5.0.tar.gz (4.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kernell_os_sdk-2.5.0-py3-none-any.whl (3.7 MB view details)

Uploaded Python 3

File details

Details for the file kernell_os_sdk-2.5.0.tar.gz.

File metadata

  • Download URL: kernell_os_sdk-2.5.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

Hashes for kernell_os_sdk-2.5.0.tar.gz
Algorithm Hash digest
SHA256 88d56979a0522c5b9e5fd113f8f0f77d209b4e5045da18a6c5c6374d904ca591
MD5 0defb088af491be693558b0186e3e402
BLAKE2b-256 13a23a38f6133c34579ddb4a40e9737024e171b2bfab1b80aa3c255c8e4a2980

See more details on using hashes here.

File details

Details for the file kernell_os_sdk-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: kernell_os_sdk-2.5.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

Hashes for kernell_os_sdk-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a9c3771b34001431eb5e1c096f688dfc04a77f9aadc23a1e5e08661086e725f
MD5 8da187d5a50a4c815c9c117ccbef6636
BLAKE2b-256 4cd1241f72fcb4ecee10331dd289140ea106c1920835d77341c66b3ec5c364bc

See more details on using hashes here.

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