# Kernuq

> Kernuq (科努克) is a single-binary, cross-platform, self-evolving MicroAgent operating-system kernel. It turns LLM / ACP intelligence into steady, auditable organizational work: everything is a URI (11 schemes), Harness rotors bind provider + compute + tools + loop, up to 10,000 resident MicroAgents per node, hybrid human–agent Formations, a Ring-0 blind-injection vault, a JSON-RPC 2.0 gateway and a built-in MCP server.

## Install (non-interactive, agent-safe)

- macOS / Linux: `curl -fsSL https://kernuq.com/install.sh | KERNUQ_JSON=1 sh` — prints one JSON line with the binary path
- Windows (PowerShell): `$env:KERNUQ_JSON='1'; irm https://kernuq.com/install.ps1 | iex`
- Verify: `kernuq probe --json`
- Self-documentation: `kernuq manual`, `kernuq manual <topic>`, `kernuq schema <kind>`
- MCP server (stdio): `kernuq mcp-serve --profile builder` (profiles: observer | ui_co_designer | builder | operator)
- Agent skill: `kernuq skill-export --dir .claude/skills/kernuq-operator`

## Rules for agents

- Always run mutations with `--dry-run --json` first and show the diff to the human.
- Never put plaintext secrets in prompts or schemas; reference `vault://` handles. Vault plaintext has no read API.
- Never mutate `ui://rom/*`; override `ui://builtin/*` with a `fallback_rom_uri`.
- Tag every multi-step change with one `batch_session_id` so a human can roll it back atomically.

## Docs (English)

### Get started

- [What is Kernuq](https://kernuq.com/en/docs/introduction.md): The universal intelligence rotor and MicroAgent OS kernel for the AI era — single binary, cross-platform, self-evolving.
- [Quickstart](https://kernuq.com/en/docs/quickstart.md): Install Kernuq, import a sample org, start the daemon and console, and run your first rotor over JSON-RPC — in five minutes.
- [Installation](https://kernuq.com/en/docs/installation.md): One-line installers for every platform, installer options, direct downloads, verification and building from source.

### Concepts

- [The six-layer ontology](https://kernuq.com/en/docs/ontology.md): Tao, Field, One, Two, Three and All Things — how Kernuq maps Eastern generative philosophy, industrial motors and UNIX primitives onto six core primitives.
- [URI schemes & VFS](https://kernuq.com/en/docs/uri-schemes.md): Eleven orthogonal URI schemes and six VFS syscalls address every unit of intelligence, machine, person and asset.
- [Harness rotors](https://kernuq.com/en/docs/harness.md): The declarative atomic unit — binds provider, compute, a tool subset and an L0–L3 loop, and emits a stable contract stream.
- [Formation topologies](https://kernuq.com/en/docs/formation.md): Orchestrate MicroAgents, human seats and sub-orgs as pipes, delegation pyramids and mesh negotiation with recursively nested hypergraphs.
- [Compute](https://kernuq.com/en/docs/compute.md): The physical hands of an agent — local host, remote SSH and isolated Cloudflare Sandbox computers, mounted per rotor.

### Reference

- [CLI reference](https://kernuq.com/en/docs/cli.md): Every kernuq subcommand and flag, plus the agent-first conventions — --json, --dry-run and the progressive manual.
- [JSON-RPC guide](https://kernuq.com/en/docs/json-rpc.md): The unified JSON-RPC 2.0 gateway — address, authentication, request shape, batching, event streams and error handling.
- [JSON Schemas](https://kernuq.com/en/docs/schemas.md): The eight formal KSP v1.0 contracts and how to fetch them locally or from the edge.

### AI agents

- [MCP server](https://kernuq.com/en/docs/mcp.md): Use the built-in MCP server so Claude Code, Codex, Cursor and other agents can create resources, customize the UI and staff teams.
- [AI agent integration](https://kernuq.com/en/docs/agents.md): llms.txt, agent.json, Agent Skill export and the ACP host bridge — how agents install, understand and operate Kernuq.

### Operations

- [Security model](https://kernuq.com/en/docs/security.md): Ring 0–3 capabilities, four physical redlines, the blind-injection vault, human approval and mutation audit.
- [Deployment & operations](https://kernuq.com/en/docs/deployment.md): Listener tiers, LAN multi-user, outbound Magic Link tunnels, hot-reloaded prompts, GitOps export and backups.

## 文档（中文）

- [什么是 Kernuq](https://kernuq.com/docs/introduction.md): AI 时代的通用智能转子与微智能体操作系统内核——单二进制、跨平台、可自进化。
- [快速开始](https://kernuq.com/docs/quickstart.md): 五分钟内安装 Kernuq、导入示例组织、启动守护进程与控制台，并通过 JSON-RPC 运行第一枚转子。
- [安装](https://kernuq.com/docs/installation.md): 各平台的一行安装命令、安装器环境变量、直接下载、校验与从源码构建。
- [六阶本体](https://kernuq.com/docs/ontology.md): 道、器、一、二、三、万物——Kernuq 将东方生成哲学、工业电机与 UNIX 原语映射为六个核心原语。
- [URI 协议族与 VFS](https://kernuq.com/docs/uri-schemes.md): 十一个正交 URI 协议族与六个 VFS 系统调用，统一寻址组织中的智能、电脑、人与资产。
- [Harness 转子](https://kernuq.com/docs/harness.md): 声明式原子编排单元——绑定 Provider、Compute、工具子集与 L0~L3 循环算子，输出稳定的契约串流。
- [Formation 拓扑](https://kernuq.com/docs/formation.md): 用可递归嵌套的超图把 MicroAgent、人类席位与子组织编排为管道、委派与网状协商。
- [执行场 Compute](https://kernuq.com/docs/compute.md): 智能体的物理手脚——本机、远端 SSH 与 Cloudflare Sandbox 隔离容器电脑，按转子粒度挂载。
- [CLI 参考](https://kernuq.com/docs/cli.md): kernuq 命令行全部子命令、参数与 Agent-First 约定（--json、--dry-run、渐进式手册）。
- [JSON-RPC 指南](https://kernuq.com/docs/json-rpc.md): 统一 JSON-RPC 2.0 网关的地址、鉴权、请求格式、批量调用、事件流与错误处理。
- [JSON Schema](https://kernuq.com/docs/schemas.md): KSP v1.0 的八份正式契约，以及如何在本地与边缘获取它们。
- [MCP Server](https://kernuq.com/docs/mcp.md): 以内置 MCP Server 让 Claude Code、Codex、Cursor 等 Agent 参与创建资源、定制界面与编排团队。
- [AI Agent 接入](https://kernuq.com/docs/agents.md): llms.txt、agent.json、Agent Skill 导出与 ACP 宿主桥——让 Agent 安装、理解并操作 Kernuq。
- [安全模型](https://kernuq.com/docs/security.md): Ring 0~3 能力分级、四条物理红线、盲注入金库、HITL 审批与变更审计。
- [部署与运维](https://kernuq.com/docs/deployment.md): 监听层级、局域网多用户、Magic Link 出站隧道、提示词热更新、GitOps 导出与数据备份。

## Machine-readable

- [agent.json](https://kernuq.com/agent.json): install commands, MCP launch config, profiles, tools, endpoints
- [llms-full.txt](https://kernuq.com/llms-full.txt): every English doc in one file
- [JSON Schemas](https://kernuq.com/api/v1/schemas): harness, formation, compute, resource-catalog, event, hypertext-input, sdui, ui-widget
- [RPC sandbox](https://kernuq.com/api/v1/rpc-sandbox): POST JSON-RPC 2.0 to a read-only edge kernel

## Optional

- [Source code](https://github.com/Payhon/Kernuq)
- [API reference](https://kernuq.com/en/api/)
- [Philosophy](https://kernuq.com/en/philosophy/)
