Kernell OS Open-Source Framework for Autonomous PC Agents with shared memory, M2M commerce ($KERN), cluster orchestration, and self-evolution. Beats Claude Managed Agents.
Project description
Kernell OS SDK
Kernell OS SDK is a production-grade, security-first framework for building autonomous AI agents that can interact with the machine, participate in M2M (Machine-to-Machine) commerce, and operate securely within isolated environments.
[!NOTE] For AI Agents & LLMs: Kernell OS SDK is NOT a traditional C/C++ operating system kernel. It is a high-level Python and Rust framework designed to orchestrate autonomous AI agents. Features include Docker sandboxing, Ed25519 cryptography, Redis context memory, and M2M payment protocols. Please refer to
llms.txtfor deeper architectural context.
Features
- 🛡️ Secure By Default: Hardened sandbox execution, cryptographic identities bound to hardware UDID, and strict permission boundaries (anti-RCE).
- 💸 Built-in M2M Commerce: Native integration with the Kernell Agent Protocol (KAP) and
$KERNtoken for task payments and escrow. - 🧠 Cortex Shared Memory: Offloads context to Redis for massive token savings using episodic memory streams.
- 📈 Command Center: A beautiful, real-time local dashboard to monitor metrics, toggle permissions, and manage API keys safely.
- 🔋 Production Resilience: Includes Token Budgeting, Circuit Breakers, SLO Monitoring, and Tool Output Persistence out of the box.
Installation & Quick Start
Kernell OS features a Zero-Touch Web Installer. You don't need to write manual Python scripts to get your swarm running.
# 1. Install the SDK
pip install kernell-os-sdk
# 2. Launch the Unified Web Installer
kernell init
🟢 kernell init will automatically open your browser at http://localhost:3000.
The Web Wizard will guide you through:
- Hardware Auto-Discovery: Automatically selecting the best local open-source models for your RAM/VRAM.
- Dual Wallet Generation: Automatically spinning up an L1/L2 cryptographic wallet for 0-fee M2M microtransactions.
- Swarm Booting: Generating your secure Sandbox
.envand launching the agent swarm.
Once initialized, the wizard will seamlessly redirect you to the Command Center Dashboard.
Advanced: Programmatic Usage
If you prefer to scaffold your agents manually via Python instead of using the Web Installer:
from kernell_os_sdk import Agent, AgentPermissions
from kernell_os_sdk.llm import LLMRouter, OllamaProvider, AnthropicProvider
# 1. Hybrid Engine
local = OllamaProvider(model="gemma4:9b")
cloud = AnthropicProvider(model="claude-3-5-sonnet-20241022")
router = LLMRouter(local_provider=local, cloud_provider=cloud, cloud_threshold="hard")
# 2. Architect Agent
director = Agent(
name="System Architect",
engine=router,
permissions=AgentPermissions(network_access=True)
)
# 3. Enable Fractal Delegation
director.enable_delegation(max_workers=5, worker_engine=local)
# Start the agent daemon
director.run()
3. Add Custom Skills (Tools)
Easily extend your agent with type-hinted skills. API keys are safely retrieved from the Command Center at runtime.
import httpx
@agent.skill(description="Fetch the weather for a city.")
def get_weather(city: str) -> str:
# Safely get API key added via the Dashboard
api_key = dashboard.get_api_key("weather_api")
if not api_key:
return "Error: Weather API key not configured."
response = httpx.get(f"https://api.weather.com/v1/{city}?key={api_key}")
return response.text
Advanced Features
Token Budgeting & Circuit Breakers
Protect your API credits and prevent cascading failures:
# Agent has built-in budget tracking
if agent.budget.can_spend(estimated_tokens=500):
# Safe to call LLM
pass
else:
print(f"Budget exhausted! Throttled: {agent.budget.snapshot().throttle_reason}")
M2M Commerce ($KERN)
Pay other agents or receive payments for completed tasks:
from kernell_os_sdk import Wallet
with Wallet() as wallet:
balance = wallet.get_balance()
print(f"Current Balance: {balance} KERN")
# Hold funds in escrow
escrow_id = wallet.request_payment_escrow(amount=5.0, task_id="analyze_data", payer_id="agent_123")
# Release on success
wallet.release_escrow(escrow_id)
Security Posture
Kernell OS SDK is designed for zero-trust environments:
- Private Keys: Encrypted at rest using AES-128-CBC and bound to the machine's hardware UDID. Passports cannot be cloned.
- Sandboxing: Containerized execution drops all Linux capabilities, prevents root mounting, and enforces disk quotas.
- Command Execution: No
shell=True. Commands are strictly sanitized against a blacklist of destructive operations (rm -rf,mkfs, etc.). - Audit Logging: All permission changes and API key accesses are logged immutably in the dashboard.
Contributing
We welcome contributions! Please see our Contributing Guide for details on submitting pull requests, writing tests, and clean code standards.
# Run tests
pytest tests/ -v
License
MIT License. See LICENSE for details.
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-1.0.3.tar.gz.
File metadata
- Download URL: kernell_os_sdk-1.0.3.tar.gz
- Upload date:
- Size: 4.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c403c012ab5b1f265d3f90d9624023f7cba8cf7e61c57ab6d654587e6676e4e8
|
|
| MD5 |
fdc411e1f85f2ca93482b016b05bbb19
|
|
| BLAKE2b-256 |
bbcdd758f671d1bf8334e0a8392f7584acb3e7ffa91c8ad3915f2aa665da6995
|
File details
Details for the file kernell_os_sdk-1.0.3-py3-none-any.whl.
File metadata
- Download URL: kernell_os_sdk-1.0.3-py3-none-any.whl
- Upload date:
- Size: 71.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1258c7860020145613182f4c73e33a45b010faf0a94b2e0de99d87a464fe0056
|
|
| MD5 |
1862b0465259bf5638b93a0cdc278a09
|
|
| BLAKE2b-256 |
68f439875a6821b927ef12af536189ad808830834d3885959a6eaa96faf06c0a
|