Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

SQAI is the governed, read-only structured-data tool for AI agents — typed, policy-checked plans run on a SQAI runtime, every answer carrying replayable hashes.

SQAI (Structured Query AI) is the governed, read-only structured-data tool for AI agents. A natural-language or typed question becomes a typed, policy-checked plan, the plan runs on the SQAI runtime, and you get the answer plus full provenance. Query CSVs and databases — including Oracle — alongside 6,084 read-only compute capabilities, from stats.median to finance.npv to option_pricing.black_scholes_call. Every capability is side-effect-free, and every result carries hashes that replay it exactly.

Setup is one free device login. The query plane runs in-process — no separate service — and returns in sub-millisecond to low-millisecond time on typical files. Run sqai login once for the free sqai_developer key; the compute runtime then provisions once (the first-ever call downloads, extracts, and initializes the bundle in ~110s), then stays warm and resident: there is no cold start per query. Every later compute() is warm — finance.npv measured at ~0.9ms.

New to SQAI? Start with the Quickstart — connect a file and get a typed, hashed answer in minutes.

Start here

Concepts and governance

Install

npm install @thyn-ai/sqai
pnpm add @thyn-ai/sqai
yarn add @thyn-ai/sqai
bun add @thyn-ai/sqai
pip install sqai

The query plane needs nothing else — no separate service. Run sqai login once, then the compute runtime auto-provisions on the first compute() and stays warm. For the AI SDK tool add @thyn-ai/sqai-ai-sdk; for the CLI add @thyn-ai/sqai-cli. See Installation.

A first look

Run a computation. The result is the answer plus everything needed to replay it — hashes, contract version, and the exact runtime it ran on.

Both calls return the same result:

The value and both hashes are byte-identical in TypeScript and Python. Call it again and computation_hash is identical again — same input → same hash, forever. That is what makes an answer auditable and replayable. See Determinism & provenance.

What you can query

Data sources. In-process, with no key: CSV, TSV, JSON, in-memory row arrays, { records: [...] }, and SQLite files; Excel and Parquet in Python. Through a private SQAI deployment (SQAI_DEPLOYMENT_URL, with SQAI_API_KEY only if it requires auth) — a private SQAI deployment on your own infrastructure, no SQAI cloud: PostgreSQL, MySQL, Oracle (bundled Thin-mode driver), Microsoft SQL Server, Snowflake, BigQuery, ClickHouse, Amazon Redshift; S3 / GCS / Azure Blob; Redis / Neo4j / Elasticsearch; REST APIs; and Git repos. Access is governed, credentials stay on your SQAI deployment, and no data is copied. See Connect your data.

Compute. 6,084 capabilities in total, all read-only and side-effect-free; 5,790 exposed to the TypeScript, Python, and AI SDKs; 5,780 fully deterministic and 10 seed-required simulations. Breadth spans statistics, hypothesis testing, probability and distributions, time series, linear algebra, finance and risk, option pricing, ML and metrics, signal/DSP, information theory, number theory, calculus and root-finding, and optimization — plus an LLM-infra pack (flash_attention, kv_cache, moe_routing, rag_retrieval, embeddings) and 100+ applied-science and engineering domain packs. searchCapabilities returns a one-line summary for each. See Compute & filtering.

Bind a compute argument to a live column and the result carries binding provenance — the source, fields, schema_revision, row_count, and input_hash it read. That is how an agent's numbers stay traceable to your data.

Last updated

Was this helpful?