Documentation · AlphaEngine CLI + quantOS

Local-First Execution. Shared System of Record.

Run parameter sweeps and proprietary simulators locally with AlphaEngine, then sync sealed studies (schema 1.2), ideas, runs, and trial ledgers to quantOS with `ae push` and `ae pull`.

Terminal Quickstart · ae push / ae pull

# 1. Install AlphaEngine 1.1.2 (free for anyone)
pip install alphaengine==1.1.2

# 2. Initialize local research repo & seal a study
ae init
ae seal study.json
ae verify study.json

# 3. Firm orgs: mint an ae_live_ key in /portal/data (Connect)
export QUANTOS_API_KEY="ae_live_..."
ae remote add quantos https://api.qosai.app

# 4. Sync sealed studies, ideas, runs & trial ledger
ae push
ae pull

01 · Architecture

Local-first vs. synced workspace.

The alphaengine library and its math run offline; login, workflows, reporting and sealing use the network; full return series are sent only with --share-series. The package requires numpy>=1.24 and scipy>=1.10 (our server pins numpy==2.2.6 and scipy==1.15.3). Firms get ae_live_ keys through Connect; retail has no CLI; anyone can pip install alphaengine free.

Workflow LayerLocal-First (`alphaengine` offline)Synced (`ae push` / `ae pull` + quantOS)
Parameter sweeps & custom simulatorsRuns 100% locally in Python (`alphaengine.sweep`, `backtest_fn`). No account or network connection required.Synced sealed studies (`schema_version: 1.2`) update the shared Experiment Ledger trial counter and Deflated Sharpe.
Canonical study sealing (`content_sha256`)`ae seal study.json` and `ae verify study.json` compute and check the 64-hex SHA-256 over canonical JSON offline.`POST /api/workspace/sync` recomputes the canonical JSON hash server-side, rejects mismatches, and marks verified studies.
Hypothesis Board & kill rulesDrafted locally as idea objects (`thesis`, `kill_rule`, `status`, `family`) in your project repo.`ae push` maps ideas onto the permanent Hypothesis Board (`open`, `testing`, `killed`, `promoted`) and preserves killed theses.
Team handoffs & allocator verificationLocal JSON artifacts on disk (`study.json`).`ae pull` fetches teammate runs, ideas, and studies; verified studies display a 'Sealed with AlphaEngine' badge on `/shared/reports/[token]`.

02 · Data Custody Boundary

Exactly what `ae push` sends — and never sends.

The sync endpoint (`POST /api/workspace/sync`) enforces a strict structural allowlist and series length guard on the server.

What `ae push` Sends
Sealed studies (Schema 1.2)
Canonical JSON metadata, 64-hex `content_sha256`, `n_trials` + `n_trials_source` (`derived_from_grid` | `asserted`), 64-hex `data_hash` / `dataset_hashes`, `deflated_sharpe`, `psr_vs_zero`, `sr0_expected_max`, `min_track_record_length`, `selection` (`pbo` via CSCV), `surface`, `performance`, and optional `trial_ledger` (`params_hash` + Sharpe per trial).
Idea objects
`id`, `title`, `thesis` (claim), `kill_rule` (pre-committed falsifier), `status` (`open`, `testing`, `killed`, `promoted`), `killed_reason`, and `family` (factor mechanism).
Run records & trial ledger entries
`id`, `workflow`, `label`, `verdict`, summary statistics (`sharpe`, `total_return_pct`, `max_drawdown_pct`), `n_trials`, `data_hash`, and `params_hash` entries.
Derived 1D figure curves
Capped at 512 points (`MAX_LIST_LEN = 512`) by default. Full-length 1D series are stored only when the caller explicitly opts in (`--share-series` / `user_opted_in: true`).
What `ae push` Never Sends (Server-Rejected)
Raw datasets & price/return matrices
Never accepted or stored. Payloads containing `raw_dataset`, `raw_data`, `price_matrix`, `return_matrix`, `ohlcv`, `dataframe`, or 2D return matrices are rejected by both client and server guards.
Proprietary strategy code (`.py`)
Your `backtest_fn` and signal generation code execute strictly on your machine and never cross the wire.
Unhashed parameter grids
`store_params` is off by default; the trial ledger records `params_hash` so search breadth is auditable without exposing proprietary parameter values.
Local LLM / model provider keys
`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, and local gateway credentials remain in your local environment.

03 · Server-Enforced Entitlements

Plan limits for `/api/workspace/sync` and `/pull`.

Entitlements are resolved server-side from your account profile. Users cannot modify their own tier. Research records only — never investment advice.

Plan TierSync ScopeAllowanceBehavior
AlphaEngine OSS (Free)Local Python library (`pip install alphaengine==1.1.2`)403 Forbidden on cloud sync (links to https://qosai.app/access)Free for anyone to install. The alphaengine library and its math run offline; login, workflows, reporting and sealing use the network; full return series are sent only with --share-series.
Retail Starter ($79), Pro ($149) & Power ($299)Web-only (`/retail`) · No CLI403 Forbidden on CLI sync & key mintingRetail has no CLI workflows and no `ae_live_` keys (anyone can still `pip install alphaengine` free for local math).
Firm Core ($10K), Pro ($15K) & Enterprise ($25K)`team` · Org-scoped `ae_live_` keys via ConnectUnlimited team workspace sync & pullFirms get org-scoped `ae_live_` keys through Connect in `/portal/data`, with full `ae push` and `ae pull` across all pod members and zero seat counting.

Need to upgrade your plan or request Firm Pod access? Visit qosai.app/access or return to the complete documentation index.