Only Institute / Knowledge

Follow your curiosity.

AI sends your question and public excerpts to PrimeSwarm.

Try agent memory, governance, or a project name.

Developer documentation

Build with the governance gate

The ONLY Lang verifier is open source. The WASM target runs in any browser. Here is how to get started, what every command does, and how to embed the gate in your application. For the full PrimeSwarm runtime (HITL, memory, SIEM), see the offer sheet.

Quickstart

1. Clone and build the verifier

git clone https://github.com/vdmo/only-dgv-verifier.git
cd only-dgv-verifier
pip install -r requirements.txt

2. Run all 89 test cards

python3 dgv_runner.py --all

3. Run a single card and verify the receipt

python3 dgv_runner.py --card DGV-TC-001
python3 verify_receipt.py --receipt evidence/DGV-TC-001.receipt.json

4. Try it in the browser (no install)

Go to /try and run ONLY Lang scripts directly in your browser using the WASM verifier.

ONLY Lang command reference

CommandArgumentsDescription
harmony(tolerance)tolerance: f64Set the equilibrium tolerance. The gate passes if the residual is below this value. Smaller = stricter. Default: 1e-12.
evolve(index)index: usizeEvolve a field index toward equilibrium. The solver adjusts the value to minimize residual.
corrupt(index)index: usizeCorrupt a field index to test detection. The gate should detect the corruption and heal it.
residual()noneCheck the current equilibrium residual. Returns the sum of squared deviations from equilibrium.
report()noneGenerate a text receipt of the evaluation. Includes gate state, residual, healed indices, and field values.
assert_bounds(min, max, idx)min: f64, max: f64, idx: usizeAssert that field[idx] is within [min, max]. The gate denies if the assertion fails.
assert_bounds_named(name, min, max)name: string, min: f64, max: f64Named bounds assertion for provenance tracking.
budget_limit(value)value: f64Set a budget limit. The gate denies if the sum of field values exceeds this limit.
time_window(seconds)seconds: f64Set a time window for rate limiting. Denies if too many operations occur within the window.
volatility_limit(value)value: f64Set a volatility limit. Denies if field changes exceed this rate.
max_exposure(value)value: f64Set a maximum exposure limit. Denies if cumulative exposure exceeds this value.
escalate(reason)reason: stringForce escalation to human review. The gate returns ESCALATE and waits for HITL approval.
if_broken{ ... }block: commandsExecute inner commands if equilibrium is broken. Used for conditional healing.
if_greater_than(idx, value, { ... })idx: usize, value: f64, block: commandsExecute inner commands if field[idx] > value.
bind(name, index)name: string, index: usizeBind a name to a field index for provenance tracking.
alias(index, name)index: usize, name: stringCreate an alias for a field index.
link_identity(id)id: stringLink the evaluation to an identity for audit trail.
track_lineage(label)label: stringTrack lineage of the evaluation for provenance receipts.
generate_zk_proof(label)label: stringGenerate a zero-knowledge proof of correct evaluation (experimental).

WASM embedding

The WASM build is 162KB and runs in any modern browser or Node.js. No server required. The API is a single function:

evaluate_script_wasm(script: string, field: Float64Array) → {
  pass: boolean,
  residual: number,
  indices_healed: number[],
  residual_history: number[],
  report?: string,
  field: Float64Array
}

See the /try page for a live example. The source is at only-lang-wasm.

SDK guides

rust

use only_lang::evaluate_script;

let script = "harmony(1e-12)\nevaluate(0)\nresidual()\nreport()";
let mut field = vec![100.0, 200.0, 300.0];

let result = evaluate_script(&signs, &mut field, script)?;
println!("pass: {}, residual: {}", result.pass, result.residual);

python

from only_lang import evaluate_script

script = "harmony(1e-12)\nevaluate(0)\nresidual()\nreport()"
field = [100.0, 200.0, 300.0]

result = evaluate_script(script, field)
print(f"pass: {result['pass']}, residual: {result['residual']}")

typescript

import init, { evaluate_script_wasm } from "/wasm/only_lang_wasm.js";

await init("/wasm/only_lang_wasm_bg.wasm");

const script = "harmony(1e-12)\nevaluate(0)\nresidual()\nreport()";
const field = new Float64Array([100.0, 200.0, 300.0]);

const result = evaluate_script_wasm(script, field);
console.log("pass:", result.pass, "residual:", result.residual);

Free developer account

Get a free API key to run live probes against your own AI systems. No credit card. No sales call. Just a key and the documentation.

What you get

  • API key for the governance gate
  • 30 live probes against your target system (real HTTP requests, real responses)
  • PSR-001 receipts for every probe — download, verify, share
  • Access to the ONLY Lang SDK (Rust, Python, TypeScript)
  • DGV Auditor Toolkit desktop app (Windows, offline)

How to get started

# 1. Download the desktop app (Windows)
#    https://only.institute/auditors

# 2. Connect to your target
#    Open the app → Connect to target → Enter your URL + API key

# 3. Run 30 live probes
#    The app sends real HTTP requests to your system and records responses

# 4. Download receipts
#    Each probe produces a PSR-001 receipt — verify at /verify

# 5. Integrate via API
curl -X POST https://api.only.institute/v1/probes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target": "https://your-ai-system.example.com", "probe": "DGV-PROBE-001"}'

Limits

  • 30 probes per day on the free tier
  • Receipts are stored locally — not on our servers
  • No SLA — this is for development and testing, not production
  • For production use, see the offer sheet

Next steps