# AI agent integration

> llms.txt, agent.json, Agent Skill export and the ACP host bridge — how agents install, understand and operate Kernuq.

Kernuq is **agent-first**: every UI action has a tool twin, every command has `--json` and `--dry-run`, and this website is written for humans and machines alike.

## One-sentence install

Send this to your agent:

```text
Read https://kernuq.com/llms.txt, install Kernuq on this machine non-interactively with KERNUQ_JSON=1, verify with `kernuq probe --json`, then register `kernuq mcp-serve --profile builder` as your MCP server.
```

## Machine-readable entry points

| Address | Contents |
| --- | --- |
| `/llms.txt` | Site index (llms.txt standard) |
| `/llms-full.txt` | All English docs in one file |
| `/agent.json` | Install commands, MCP launch args, profiles, tools and endpoints |
| `/en/docs/<slug>.md` | Raw Markdown for any docs page |
| `/api/v1/schemas/<kind>` | Raw JSON Schemas |

## Agent Skill

```bash
kernuq skill-export --dir .claude/skills/kernuq-operator
```

The generated `SKILL.md` teaches the right workflow: learn contracts progressively with `kernuq manual` and `kernuq schema`, preview with `--dry-run --json`, and respect the four redlines.

## ACP host bridge

The other way round, Kernuq can dispatch your agent. `agent-host` wraps Claude Code / Codex on any machine as an ACP node:

```bash
kernuq agent-host --node-id mac-studio-01 \
  --owner-unit org://unit/group_hq \
  --master-ws wss://kernuq.example.com/acp/reverse \
  --wrap claude --workspace ./workspace
```

In `delegated_to_provider` mode Kernuq sends only the prompt and attachments; the external agent works in its own environment and its outputs are archived automatically.

## Rules for agents

1. Always `--dry-run --json` first and show the diff to a human.
2. Never put plaintext secrets in prompts or schemas — reference `vault://` handles.
3. Never mutate `ui://rom/*`; override `ui://builtin/*` with a `fallback_rom_uri`.
4. Use one `batch_session_id` per cohesive change set.
