# Compute

> The physical hands of an agent — local host, remote SSH and isolated Cloudflare Sandbox computers, mounted per rotor.

Compute is Kernuq's "Field": it abstracts physical execution environments as `compute://` resources and binds them into harnesses.

## Three substrates

### Local host — `local_host`

```yaml
uri: "compute://builtin/local-host"
substrate_kind: "local_host"
declared_capabilities: ["exec", "fs_rw", "pty"]
local_host_config:
  workspace_root: "~/.kernuq/workspaces"
  isolate_subprocess: true
```

### Remote SSH — `remote_ssh`

The private key lives in the vault and is blind-injected at execution time:

```yaml
uri: "compute://ssh/prod-order-01"
substrate_kind: "remote_ssh"
remote_ssh_config:
  ssh_vault_uri: "vault://infra/ssh/prod-order-01"
  remote_workdir: "/var/kernuq-ops"
  read_only_guard: true
```

### Cloudflare Sandbox — `cloudflare_sandbox`

Isolated Linux computers on Cloudflare Containers in milliseconds, with process streams, `/workspace` snapshot hydration, PTY, live port previews and GUI / CDP browser control:

```yaml
uri: "compute://cloudflare/desktop-computer-01"
substrate_kind: "cloudflare_sandbox"
declared_capabilities: ["exec", "fs_rw", "pty", "code_interpreter", "computer_gui", "port_preview"]
cloudflare_sandbox_config:
  gateway_url: "https://kernuq-sandbox-gw.example.workers.dev"
  auth_vault_uri: "vault://secret/cf-sandbox-gateway"
  gateway_contract_version: "kcg_v1"
  image_profile: "desktop-computer"
  idle_sleep_sec: 300
```

## Binding to a rotor

Pick the field with `compute_binding.compute_uri` in a harness. Different rotors of the same agent can run on different machines.

```bash
kernuq schema compute
```
