# Customer-run Demo preview An isolated first implementation of the [customer-controlled model](https://opengrail.xyz/documents/whitepaper#customer-control). This preview is separate from the legacy hosted Demo and all exchange accounts. It does not import their balances, grant a live mandate or migrate any credential. The customer operates the runtime; OpenGrail receives bounded private reports. This is an optional developer integration, not the default customer onboarding. Ordinary users should connect to OpenGrail through its website. A downloadable connector does not supply an always-on AI service; consumer autonomy still needs a supported background runtime, legitimate model access, explicit usage controls and appropriate operational and regulatory arrangements. No model, scheduler, news feed or real exchange is started by installing it. ## Run with your existing agent Use a Linux computer or server with Node 22.13+ and Python 3. Download the [standalone runtime](https://opengrail.xyz/downloads/opengrail-customer-demo.mjs) and its [SHA-256 checksum](https://opengrail.xyz/downloads/opengrail-customer-demo.sha256). Verify the file before running it. The download bundles its schema and simulator; no source checkout or npm install is needed. Checksum comparison detects a changed file; it is not an independent security review or proof that the publisher is trustworthy. Never paste exchange keys or reporting credentials into a chat. From the directory containing the verified file: ```sh node opengrail-customer-demo.mjs prepare --state-dir /absolute/private/opengrail-demo ``` The runtime creates a private directory (0700), reporting credential and state files (0600). It prints only an approval URL and a fingerprint, not the token. Open that URL, sign in, compare the fingerprint and explicitly approve reporting. Keep the approval link private: it can bind this runtime to the account that approves it. Its fragment contains the proposal and token hash, not the raw credential. If a client loses the fragment during sign-in, reopen the original approval link. Never approve an unfamiliar runtime. Approval does not launch it. If the original setup output is lost, recover the same approval link: ```sh node opengrail-customer-demo.mjs approval --state-dir /absolute/private/opengrail-demo ``` This is a local read. It preserves the original identity, credentials and exact pending report and makes no network request. Repeating `prepare` still refuses to overwrite an existing setup. Expired or revoked consent is not renewed by recovering an approval link. Keep the download and its third-party notices together; the notices preserve Zod’s bundled MIT attribution. Repository users can continue using `node scripts/customer-demo-runtime.mjs` with the same commands. Your agent produces a private JSON file with this shape (replace the observation with the actual time the **synthetic** fixture was prepared; 0 is a placeholder): ```json { "kind": "OPENGRAIL_SYNTHETIC_INPUT_V1", "observed_at": 0, "quotes": { "btc_bid_cents": 1000000, "btc_ask_cents": 1000100, "eth_bid_cents": 200000, "eth_ask_cents": 200100 }, "decision": { "action": "HOLD", "pair": null, "amount_cents": 0, "reason": "Synthetic fixture; wait for the next research decision." } } ``` The prices above are invented. Keep the input file private (0600), then: ```sh node opengrail-customer-demo.mjs step --state-dir /absolute/private/opengrail-demo --input /absolute/private/input.json node opengrail-customer-demo.mjs status --state-dir /absolute/private/opengrail-demo ``` Each step reads the authenticated control state, applies fixed local safeguards, records one simulated outcome durably, and reports that exact outcome. Its only outbound endpoint is `https://opengrail.xyz/api/customer-demo/report`; arbitrary site/exchange destinations are not configurable. Model access is external to this runtime. The input is data, never executable code. Nothing schedules future steps. ## Permissions and reporting The distinct `og_report_` credential is bound to one owner, runtime and grant. It can read its own preview state and submit simulated reports. Existing public, hosted-Demo and live-trading token parsers reject it. Neither endpoint accepts exchange keys. Browser approval and controls require authenticated owner context, matching origin and owner binding; machine reporting rejects cookies/origin. `/demo/customer-runtime` shows private balance, holdings, fees, recent audit events, report time, reporting connection and requested/acknowledged control state. There is one preview session per owner, at most 1,000 sessions overall. Reports expire with consent after seven days. This first version has no renewal or replacement; a revoked or expired session cannot silently restart. Each session admits at most 256 reports and 64 ordinary controls, with emergency revocation still available. Every report appends one immutable step, identifies its predecessor digest and carries an idempotency key. The server reconstructs all inputs with the same fixed simulator. That proves computational consistency, not authentic market observations, independent review or investment merit. The simulator starts with EUR 500 virtual cash and supports BTC/EUR and ETH/EUR spot only, at most 10% per position and three buys per UTC day. It applies 40bps fees plus 10bps slippage and stops new buys at sampled 3% daily loss or 20% drawdown. There is no leverage, shorting, withdrawal, deposit or real-order command. Quotes older than 20 seconds or later than the step are rejected as stale/future; new reports must be observed within 180 seconds of server reception. Current portfolio marks are based only on accepted synthetic observations, never a live valuation. ## Pause, failure and recovery Pause/resume is a revisioned request. The dashboard calls it acknowledged only when a report binds the current control revision and matching paused value. Reporting Connected requires an authenticated accepted report observed and received within 180 seconds; it does not establish continuous execution or AI work. A reporting revocation cannot remotely stop an offline local simulation; stop the runtime locally too. No real funds are involved. A pending report is saved and fsynced before transport. If the response is lost, run `step` again; the pending report is retried before any new decision and needs no new input file. Exact duplicates return the retained receipt without another fill or a fresh heartbeat. A POSIX writer lock, private regular files, atomic updates and changed-file checks protect local restart/concurrency behavior. Back up the whole private state directory securely; never commit it to Git or share it. Restoring an old backup can cause a sequence conflict, which stops the runtime instead of silently resetting the server. Revocation, expiry, a gap or a control change racing an unconfirmed local step stops further progress. A step refused because control changed remains in the outbox; there is no automatic discard, rebase or inventing a new receipt. That case needs operator reconciliation and is a limitation of this bounded preview. The generic CLI failure message deliberately omits secrets and raw server errors.