How it works
Your AI does the science by calling instruments. A small kernel stands between them: it decides what may run, writes down every call and speaks MCP. These are the rules it enforces, so that you can follow the work and challenge it.
The rules the kernel enforces
- No run without a passed selftest
- The manifest lists cases with known answers. The kernel runs them and grades the readings itself. Admission is tied to a hash of the whole folder.
- Everything is journalled
- Every call, refused and failed ones included, gets a record in
lab/journal.jsonl. - Files are stored by hash
- In
lab/objects/. Nothing is overwritten. - Runs replay
- A run is repeated with its recorded inputs and exact input files. Outputs are compared by hash, or by value within the manifest's tolerance.
- Errors say what to change
- Input errors name the input, the limit and the unit. Instruments return
{"error", "hint"}. - Units travel with the numbers
"@r0003/deflection.csv"passes a file and"@r0003:max_moment"a reading. The kernel checks units before the run starts.- Design search is journalled
- Sweeps over grids or seeded random draws. Every member is an ordinary run. Runs made by a changed instrument are marked stale, with everything they fed.
- Instruments are sandboxed
- On macOS: no network, writes only to the run's folder, no reading the lab's records or private user folders.
- Every number has a receipt
invntr publishwrites a study as one self-contained page whose numbers open the runs behind them.- Claims face a second agent
invntr reviewgives another agent the study as facts only, with Invntr only through MCP and a budget the kernel enforces.- Models meet measurements
invntr calibratefits an instrument's inputs to measured curves. Every trial is a journalled run.
The lab over MCP
Besides one run_<instrument> tool per admitted instrument, an agent gets these 17:
invntr_instruments | List every instrument: version, admission, schema, typical duration, and broken folders with their errors. |
|---|---|
invntr_selftest | Run an instrument's selftest cases against their known answers. Pass: the instrument is admitted for its current files. Fail: it is refused until fixed. |
invntr_journal | The latest runs, newest last: id, kind, instrument, status, key values. |
invntr_show | One run's full record: inputs, values, files with hashes, log hash, errors. |
invntr_replay | Run a journalled run again with the same inputs and input files, and compare outputs. |
invntr_file | Read a file a run produced (text, or an image), or its log with file "log". |
invntr_import | Bring files from disk (a use case's inputs) into the lab as a journalled import run; later runs use them as "@<run>/<name>". |
invntr_study | Group runs into a study: one question ("size a robot arm", "does the bracket hold") and the runs that answer it, so a person sees them together in the window. Adds the runs to the study, making it when new; a note says what the study asks. |
invntr_sweep | Run one instrument many times from base inputs: over a grid (every combination of the listed values) and/or random draws (uniform or normal, with count and seed: the same seed gives the same draws). Paths are dotted into inputs and lists (study.thickness, precompressions.0). Every member is an ordinary journalled run; the sweep is one record with the members' ids, a table of varied inputs and collected readings, statistics (count, min, max, mean, sd, 5/50/95th percentiles) and the fraction meeting a criterion. Failed members are counted. |
invntr_calibrate | Fit chosen inputs of one instrument so that its outputs match measurements. SLOW: blocks until done. Every trial is an ordinary journalled run that names the calibration; runs are cached by their inputs; the lab counts every run against max_runs before starting it (a spec whose base point, first simplex and validation cannot fit is refused before any run). Bounded Nelder-Mead in [0,1] coordinates (log where asked), from the base point or the best of seeded random starts. Result: one calibration record: fitted values (values.fitted, for @run:fitted.<name>), misfit before (base) and after, a band per parameter (where the misfit stays within band_factor of its minimum: a slice, or a profile with the others re-fitted for those listed in profile), correlations from the misfit's curvature, validation comparisons evaluated with the fitted values but never fitted, predicted_vs_measured.csv, trials.csv, plot.svg, warnings (at a bound, not pinned, trade-offs). Parameters: an input path (its name by default), tied paths {"paths": [p, {"path": q, "times": -1}]}, or a factor on comparisons' model curves {"scale": true, "comparisons": [...]}; "comparisons" limits a parameter to some comparisons (fit or validate, by name). A comparison: {name, inputs (set for its runs), model: {file: "sweep.csv" | table: "sweep" | reading: "key", x, y, where: {column: value}, scale: number or "@run:key"}, measured: {file: "@rNNNN/frf.csv", x, y, where, x_range} | {points: [[x, y]]} | {value} | {reading: "@rNNNN:key"}, metric: rms_log|rms_rel|rms|nrms, weight}. The model is interpolated on the measured x. |
invntr_stale | Which runs can no longer be taken at face value: made by an instrument whose files changed since, or fed (@run:key, @run/file) by a stale run. Also lists runs that cannot be checked. |
invntr_report | Write a study as a Markdown report a person reads (report.md in the folder, each run's files beside it): the question, each run's title, verdict, key figures and tables, what fed it, its files and pictures, its run id, stale runs marked. |
invntr_publish | Write a study as ONE self-contained HTML page (no network requests; inline data, scripts and 3D scenes) for people who will not open the lab: an interactive 3D hero scene (hologram or studio look), every reading, key figure and table cell clickable to a receipt (the run, its inputs as written and resolved, the chain of runs that fed it with the unit check of every hop, the known-answer cases its instrument passed, sandbox, replays, stale), sweeps as histograms, an optional Markdown narrative whose run ids open receipts. replay: true (or "all") replays the study's runs first, journalled as usual. Scenes beyond max_mb (default 15) are left out and listed. |
invntr_view | Write the human-readable lab page (instruments, journal, images) and return its path. |
invntr_claim | Record a claim about a study: what the designer asserts, tied to one reading of one run, with a bound (at_least, at_most or within). The kernel evaluates it at once (holds or fails on the record) and checks the bound's unit against the reading's. Journalled as a claim record; invntr_review attacks the study's claims. |
invntr_claims | A study's claims: each with its run and reading, the journalled value, its bound, whether it holds, its unit check, whether its run is stale, and the latest review's verdict on it. |
invntr_review | A blind review of a study's claims. SLOW: it runs a second AI for up to timeout_minutes (default 90) and blocks until it ends. The reviewer (default claude -p, model opus) gets a packet built from the lab only (the study's note, its claims, its runs as facts: no notes files, no logs) and reaches Invntr only through MCP, with no file, shell or web access; the lab enforces its budget (max_runs, a sweep counts its members; max_minutes of instrument time) and puts its runs in a new study "Review of <study> (<date>)". Its Attack Report is checked against the journal (run ids, quoted readings within 1 %), stored as a review record, and shown by invntr_publish. |