Skip to main content

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

PyPI version Python 3.9+ License

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.

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 $KERN token 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

# Core SDK
pip install kernell-os-sdk

# With Dashboard / GUI support
pip install kernell-os-sdk[gui]

# With Redis memory support
pip install kernell-os-sdk[memory]

# Everything
pip install kernell-os-sdk[all]

Quick Start

1. Create a Secure Agent

from kernell_os_sdk import Agent, AgentPermissions

# Create an agent with specific permissions
agent = Agent(
    name="Data Analyst",
    permissions=AgentPermissions(
        network_access=True,
        file_system_read=True,
        execute_commands=False  # Secure by default
    )
)

# Start the agent daemon
agent.run()

2. Launch the Command Center

Monitor your agent, toggle permissions in real-time, and manage API keys without restarting:

from kernell_os_sdk import CommandCenter

# Attach dashboard to your agent
dashboard = CommandCenter(agent, port=8500)
dashboard.start()

# Dashboard available at http://127.0.0.1:8500

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


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-1.0.0.tar.gz (3.4 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-1.0.0-py3-none-any.whl (70.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kernell_os_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 595db25292c833da42e4583862a53baacd56f4aabfaaea63581b365b8088a387
MD5 6d85d7590046cb35c647343377cd22ca
BLAKE2b-256 44b76810c7e964bb0effe7bb7d60a74c165f03e80118dc3fbd6b2e156bbc5b57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kernell_os_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 70.1 kB
  • 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81acc12da744a2e610a0b9d0daa85e4388151cd39fd1b7e8870f27da327c80d3
MD5 6f42bcab735dcb344f0bcca1dd44e8e1
BLAKE2b-256 03cf8462bffcabcf8b22e82a6b9680b767fb652cbf499eb1e851df76988de7d7

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