Drive a grain

Rent a confined agent grain, drive it, watch its transcript stream, and verify it — trust no host. This page talks to the agent-platform HTTP API over the browser-friendly routing shim (a browser cannot set the Host header, so the grain-host rides an X-Dregg-Grain-Host header, or query params for the header-less EventSource transcript). Rent / verify / watch work with no model; live drive needs the server built --features live-brain with an LLM key.

configWhere + who

The server base URL (defaults to this page's origin), the control host the platform routes /rent on, and your verified subject (the X-Dregg-Subject the forward-auth proxy sets in a real deploy; supplied directly here).

1 · rentProvision a confined grain

POSTs /rent to the control host (via the X-Dregg-Grain-Host shim) as your subject. The grain is owned by the verified subject, never a body field.

2 · driveGive it a goal & watch it work

Drive POSTs /drive — this uses the HOST's model + key (simpler, but the host sees the key; the renter mails their key to the host). Needs the driver role and a live brain; without a model the server honestly answers 503 no live brain. For true bring-your-own-key, use §2b below — the model runs in your browser and the host never sees the key. Watch transcript opens the /transcript SSE (query-param form, since EventSource sets no headers) and replays the committed meta/step/done frames of every drive so far — this works with no model.

2b · byokBring your own key — the model runs in your browser

The real prize: the model runs here, in this tab, under your own API key (any provider). Each action the model proposes is POSTed one at a time to the grain's /act route, which cap-gates, meters, mints, and receipts it — the host never sees your key. Needs the driver role. No host model required.

🔑 Your key stays in this browser. It is sent only to the provider you choose below — never to the grain host. The host receives only the single proposed action (tool + args) and returns a receipt.

Off by default — the key lives in memory only and is gone when you close the tab. Persisting stores it in localStorage on this device in cleartext; only do so on a machine you trust.

3 · verifyTrust no host

The renter's check. /verify is R0 tamper-evidence (the receipt chain re-witnesses); /verify?r2 is R2 (every receipt is a view over a kernel turn the platform's minter committed — an unminted grain honestly fails this); /attest hands you the signed attestation to keep. All read-only — no model required.