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

Uploaded Python 3

File details

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

File metadata

  • Download URL: kernell_os_sdk-2.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 66fbf30950cb4cd75d7f8a2cce0af7c3e4acf72b02fede132887cc947b15af39
MD5 5470c21617bad708e6d0a077a077ffc3
BLAKE2b-256 0f6a4591a54c7bebb8a7d7101d7919010502cbbba4b71553983c2e2263b2cfa6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kernell_os_sdk-2.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef352b39f2538e74156c980fddc2ecb7b1be8ec275451ba0a381a42ade2e683b
MD5 463c04fc500b22b7dc510f73da6d522a
BLAKE2b-256 d1500f72a830647dbf439e14cb19b50a7f8ca5b694cb3c9884b9ddb5522f3a0c

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