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.6.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.6.0-py3-none-any.whl (3.7 MB view details)

Uploaded Python 3

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

Hashes for kernell_os_sdk-2.6.0.tar.gz
Algorithm Hash digest
SHA256 dd0d94efd952b8d9f1b71fa4abfd1964a8acc8818195349c927533822b60e666
MD5 cc4fb1fef55ca320e2882ab9d80c83ad
BLAKE2b-256 072f3c98adef96e0029932f86952b6c747cb3ee4c4c69d3627e2247d72e250b3

See more details on using hashes here.

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

Hashes for kernell_os_sdk-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 516e588e2508573bd721ff28538d5758e7a766f5b83f3a1feed2d7aea0442f3f
MD5 282f67cdc2682697cb84e512a695a033
BLAKE2b-256 b56ec48a507948ca0655a87276486112955fa959459550a7d7611ba5d3433909

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