Skip to main content

Khy OS — AI platform operating system with an extensible default app runtime

Project description

Khy OS

Khy OS is an AI platform CLI and runtime. The default built-in app is khyquant.

Positioning

  • khy is the primary Khy OS command (platform shell + app runtime).
  • khyquant is the default upper-layer app/plugin compatibility command.
  • AI lite mode is explicit: use khy ai ... (or khy --lite ...).

Release Notes (0.1.3)

This release focuses on vision/multimodal adapter compatibility and packaging consistency.

Highlights

  • Unified image normalization for gateway adapters:
    • added shared image compatibility layer for base64/data-url/url payloads
    • mapped unified image input to adapter-specific formats (Codex/Claude/Ollama/OpenAI-compatible IDE adapters)
  • Removed forced image routing to Claude by default:
    • image requests now keep the selected adapter first
    • gateway fallback remains enabled when a channel actually fails
  • Improved local/IDE multimodal behavior:
    • Codex direct mode accepts normalized images
    • Ollama adapter accepts normalized image payloads for multimodal models
    • Trae/Windsurf adapters accept OpenAI-compatible vision message blocks
  • Packaging/release consistency:
    • synchronized package version metadata for khy-os==0.1.3
    • fixed release path to avoid mixed/legacy install metadata

Upgrade

python3 -m pip install -U khy-os==0.1.3
khy --version

Release Notes (0.1.2)

This release focuses on production stability, multi-adapter robustness, and clearer operator experience.

Highlights

  • Improved AI request stability for long-running tasks:
    • task-scale-aware retry/timeout strategy
    • transient error recovery across gateway and tool loop layers
    • safer adapter failover behavior when preferred channels are unstable
  • Better context-window safety:
    • dynamic context budget handling
    • stronger compaction path for oversized histories
  • Better terminal UX:
    • improved status signaling and de-duplication
    • stronger recovery for interactive input states
  • Packaging/version sync:
    • synchronized version bump across Python + Node entry metadata
  • release artifacts generated for khy-os==0.1.2

Upgrade

python3 -m pip install -U khy-os==0.1.2
khy --version

Compatibility

  • Python: >=3.8
  • Node.js: >=18
  • OS: Linux / macOS / Windows

Directory Structure

Khy-OS/
├─ khy_quant/                     # Python launcher package (PyPI entrypoint)
│  ├─ cli.py                      # Main Python CLI bridge
│  ├─ _bootstrap.py               # Runtime bootstrap checks/fixes
│  └─ bundled/                    # Bundled runtime assets for pip distribution
│
├─ backend/                       # Node.js core runtime
│  ├─ bin/khyquant.js             # Node CLI entrypoint
│  ├─ server.js                   # API server entrypoint
│  ├─ src/
│  │  ├─ cli/                     # REPL/router/handlers
│  │  ├─ routes/                  # HTTP routes
│  │  ├─ services/                # Gateway, adapters, tools, orchestration
│  │  ├─ tools/                   # Tool implementations
│  │  ├─ models/                  # Data models
│  │  └─ middleware/              # Auth/rate-limit/error middleware
│  └─ tests/                      # Backend tests
│
├─ frontend/                      # Vue frontend
│  ├─ src/
│  │  ├─ components/              # UI components
│  │  ├─ views/                   # Page views
│  │  ├─ services/                # Frontend service layer
│  │  └─ stores/                  # State stores
│  └─ public/                     # Static assets
│
├─ packages/shared/               # Shared JS modules (backend/frontend)
├─ docs/                          # Architecture, guides, verification docs
├─ scripts/                       # Build/install/release scripts
├─ pyproject.toml                 # Python package metadata
└─ backend/package.json           # Node backend metadata

Quick Start

python3 -m pip install -U khy-os
khy --help
khy doctor
khy app list

Development install:

python3 -m pip install -e .

Core Commands

khy app list
khy gateway status
khy linux status
khy server start

Explicit AI Lite Mode

khy ai "summarize this project status"
khy ai -p "only output JSON"
khy ai run qwen3.5:4b "hello"

# compatibility alias (kept for older scripts)
khy run qwen3.5:4b "hello"

OS Build Entry

bash scripts/build-khy-os.sh

Windows (Docker Desktop + PowerShell):

khy iso build --output dist/khy-os.iso
# equivalent source script:
# powershell -ExecutionPolicy Bypass -File scripts/alpine/build-iso-windows.ps1

Component mode:

bash scripts/build-khy-os.sh --component core --component vmware-plan
bash scripts/build-khy-os.sh --component moonbit --strict

WASM App Runtime

khy app register math --runtime wasm --wasm /abs/path/math.wasm --abi numeric-v1 --export add
khy app run math add 1 2

khy app register echo --runtime wasm --wasm /abs/path/echo.wasm --abi string-v2 --export run
khy app exports echo
khy app run echo hello khy os

khy app register score --runtime wasm --wasm /abs/path/score.wasm --abi json-v2 --export run
khy app run score --json '{"symbol":"AAPL","price":192.3,"rsi":63.2}'

# M1 IPC simulation (loopback netd/fsd/wmd)
khy app register weather --runtime wasm --wasm /abs/path/weather.wasm --abi json-v2 --export run --caps ipc,net
khy app ipc weather net http_get --json '{"city":"shanghai"}'

Required Environment

  • Python >= 3.8
  • Node.js >= 18
  • Linux/macOS/Windows

Pip Distribution Boundary

  • Prebuilt ISO/model artifacts are intentionally excluded from pip packages.
  • You can build ISO locally after installation (khy iso build ...).
  • You can download and register models on demand:
khy models pull qwen3.5:4b
khy models list
khy gateway model

See:

  • docs/architecture/CORE_ARCHITECTURE.md
  • docs/guides/ENV_REQUIREMENTS.md

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

khy_os-0.1.29.tar.gz (8.1 MB view details)

Uploaded Source

Built Distribution

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

khy_os-0.1.29-py3-none-any.whl (7.2 MB view details)

Uploaded Python 3

File details

Details for the file khy_os-0.1.29.tar.gz.

File metadata

  • Download URL: khy_os-0.1.29.tar.gz
  • Upload date:
  • Size: 8.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for khy_os-0.1.29.tar.gz
Algorithm Hash digest
SHA256 c7883f9b87cd7ec289b0c1f50f80fbc2a27b9300f2621c3f7b7237ce3d0173f0
MD5 2d1135184fe2d0ee1cce2bb6cc5bf64c
BLAKE2b-256 ca625586b42dd3097846551fc06552b013e9390850c5761eb74f3a4fe0589f11

See more details on using hashes here.

File details

Details for the file khy_os-0.1.29-py3-none-any.whl.

File metadata

  • Download URL: khy_os-0.1.29-py3-none-any.whl
  • Upload date:
  • Size: 7.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for khy_os-0.1.29-py3-none-any.whl
Algorithm Hash digest
SHA256 c5954da242874c4104bf77c654841bd887883cb673b9524c91b0b827ba70adcb
MD5 9fa99acc4076301b4bedf8ae3fae034e
BLAKE2b-256 f78dc879536ee31c9e7f7298b5d00aed6b86b19aa38f6d1927c53075c35d923e

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