IInstallation

The first proof.

From a clean machine to a hashed, replayable answer in under a minute. No account, no key, no server. Run the same four steps in either language — the proof is the same hash.

TypeScriptNode ≥ 20

  1. 01Install

  2. 02Connect a source

    import { createSQAI } from "@thyn-ai/sqai";
    
    const sqai = createSQAI();
    await sqai.connect("./sales.csv",
      { name: "sales" });
  3. 03Ask a query

    const a = await sqai.ask({
      metric: "revenue",
      aggregation: "sum",
      group_by: "region",
      source_name: "sales",
    });
    // east 2130.5 · west 1519 · north 1000
    // plan_hash f87610d8afeb…
  4. 04Compute a value

    const r = await sqai.compute({
      module: "finance", function: "npv",
      args: [0.1, [-1000, 300, 420, 560, 680]],
    });
    r.value505.020148896933
    r.computation_hashb74f67d0…d91bc8

PythonPython ≥ 3.10

  1. 01Install

  2. 02Connect a source

    from sqai import SQAI
    
    sqai = SQAI()
    sqai.connect("./sales.csv",
      name="sales")
  3. 03Ask a query

    a = sqai.ask({
      "metric": "revenue",
      "aggregation": "sum",
      "group_by": "region",
      "source_name": "sales",
    })
    # east 2130.5 · west 1519 · north 1000
    # plan_hash f87610d8afeb…
  4. 04Compute a value

    r = sqai.compute(
      module="finance", function="npv",
      args=[0.1, [-1000, 300, 420, 560, 680]],
    )
    r["value"]505.020148896933
    r["computation_hash"]b74f67d0…d91bc8
computation_hash · TypeScript ≡ Python

b74f67d0d7a594aa7ac91f6291612452aa8ccdf603351ebc8d801a6fddd91bc8

Identical. Byte for byte.

Both SDKs canonicalize the same result to the same bytes, so the hash matches across languages — not by coincidence, by construction. Replay the call anywhere and it must print this line.

IIOne-time setup

Provision once. Then it's instant.

The query plane runs in-process the moment install finishes — no daemon, no key. The compute plane provisions its signed runtime once, on the first compute(), then keeps it resident.

await sqai.compute(…)  // first call, ever~110 s · once per machine

  1. 01download the platform bundle
  2. 02verify the RS256 signature + per-artifact sha256
  3. 03extract and install atomically
  4. 04spawn the resident engine

await sqai.compute(…)  // every call after0.83–0.93 ms · measured

The runtime is already resident — no download, no cold start, no per-query setup.

The bundle caches per user, so provisioning happens once per machine — not once per process.

IIIVerify

One command reads the whole machine.

✓ node: v20.11.0
✓ sdk: @thyn-ai/sqai 0.1.4 imports cleanly
✓ contract: 4778 capabilities
  sha256:79f1c5a6c7164e7e9e1750e70a5c03292fa87eb52d8148a740c06695924be9a1
• tested-pair: skipped (not in the repo)
• runtime: unavailable (checks skipped)
✓ doctor: ok

doctor checks the Node version, the SDK import, the embedded contract, and a live runtime probe. On a clean machine the runtime line reads unavailable — a skip, not a failure. The query plane needs no runtime.

  • 4,778 capabilities ship in the hash-pinned contract; 4,574 are exposed to the SDKs — read-only, deterministic.
  • Add --parity to assert that invariant and diff contract modules against the running engine.
  • Add --json to print exactly one JSON object — wired for CI.

IVRequirements

What the minute needs.

Node
20 or newer for the npm packages — doctor enforces it.
Python
3.10 or newer for the PyPI package.
Compute plane
darwin-arm64 or linux-x64 — the signed runtime provisions on the first compute().
Query plane
Anywhere Node or Python runs.
Windows & others
The query plane works in full; compute() returns a structured unsupported_platform error — never a crash.

Off a supported host, point compute at a remote engine with SQAI_ENGINE_URL or SQAI_API_KEY — queries and dispatch still work; only local provisioning is skipped.

VThe operator's strip

Three commands around the SDK.

Connecting, asking, and computing all happen in-process through the SDKs. The CLI is what you run around them — sign a device in, check the environment, manage the runtime.

  1. $sqai login [--no-browser]

    Optional device sign-in (RFC 8628) via accounts.thyn.ai. It moves a signed token — never your data. Free on one machine.

  2. $sqai doctor [--parity] [--json]

    Node, SDK import, embedded contract, live runtime probe. --parity asserts the read-only, deterministic invariant.

  3. $sqai runtime <status|install|verify|stop>

    The resident compute runtime: report it, install it ahead of time, verify the pinned sha256, stop it.

Every command accepts --json and prints exactly one JSON object. Exit codes are scriptable: 0 success · 1 failed check · 2 usage error.