GQL v2.2 — where SECTION, COVER, and PULLBACK stand where SELECT, WHERE, and JOIN would — and the REST surface that carries it. Every statement on this page is the exact syntax the parser accepts; verbs at HEAD but not yet in the deployed image are marked.
One binary — gigi-stream — serves everything below on port 3142. Pull the image or run from a checkout; the production deployment runs the same binary.
1 · Start the engine.
docker pull beerosadavis/gigi:latest docker run -p 3142:3142 beerosadavis/gigi:latest # or, from a fresh checkout: cargo run --release --bin gigi-stream # → http://localhost:3142
2 · Probe health.
curl http://localhost:3142/v1/health3 · First GQL — create a bundle, insert, point-query. The response from the point query carries κ and confidence.
# create a bundle (HTTP, GQL passthrough) curl -X POST http://localhost:3142/v1/gql \ -H "Content-Type: application/json" \ -d '{"query": "CREATE BUNDLE sensors FIBER (sensor_id CATEGORICAL, temp NUMERIC, humidity NUMERIC) KEYS (sensor_id);"}' # insert two records curl -X POST http://localhost:3142/v1/bundles/sensors/insert \ -H "Content-Type: application/json" \ -d '{"records":[ {"sensor_id":"S-001","temp":22.5,"humidity":60.1}, {"sensor_id":"S-002","temp":19.3,"humidity":71.4}]}' # point query — O(1) via the GIGI hash curl -X POST http://localhost:3142/v1/gql \ -H "Content-Type: application/json" \ -d '{"query":"SECTION sensors AT (sensor_id='\''S-001'\'');"}' # read the bundle's curvature report curl http://localhost:3142/v1/bundles/sensors/curvature
Geometric primitives, not relational — and confidence is not optional: every query returns it. Every verb below parses and executes in gigi-stream today. Families that parse but return 501 or a NOTICE (access control, triggers, prepared statements, backup, session variables) are catalogued in GQL_REFERENCE.md, whose status table is CI-enforced against a real engine.
BUNDLE sensors BASE (id NUMERIC) FIBER (city CATEGORICAL INDEX, temp NUMERIC RANGE 80, wind NUMERIC RANGE 30);
SECTION sensors (id: 42, city: 'Moscow', temp: -31.9, wind: 2.2) RETURNING id, confidence, curvature;
SECTIONS sensors (42, 'Moscow', -31.9, 2.2, 43, 'Moscow', -30.3, 1.8) UPSERT;
REDEFINE sensors AT id=42 SET (temp: -28.5);
RETRACT sensors ON city = 'TestCity';
GAUGE sensors TRANSFORM (ADD altitude NUMERIC RANGE 5000 DEFAULT 0, RENAME temp TO temperature);
LENS moscow_temps AS COVER sensors ON city = 'Moscow' PROJECT (date, temp, wind);
INGEST docs FROM 'embeddings.jsonl' FORMAT JSONL KEY doc_id;
ATLAS BEGIN; SECTION sensors (id: 9001, city: 'Test', temp: 0.0, wind: 0.0); ATLAS COMMIT;
COLLAPSE sensors;SECTION sensors AT id=42 PROJECT (city, temp, wind);
EXISTS SECTION sensors AT id=42;
COVER sensors ON city = 'Moscow' WHERE temp < -25 RANK BY temp DESC FIRST 5;
INTEGRATE sensors OVER city MEASURE avg(temp) AS avg_t, count(*) HAVING avg_t < 0;
INTEGRATE chain MEASURE avg(plaquette) WITH JACKKNIFE ALONG sweep SKIP FIRST 500;
PULLBACK readings ALONG sensor_id ONTO sensors PRESERVE LEFT;
SHOW BUNDLES; DESCRIBE sensors; SHOW FIELDS ON sensors;
EXPLAIN SECTION stations AT station_id='st-042';
TRANSLATE SQL "SELECT city, AVG(temp) FROM sensors WHERE region='EU' GROUP BY city";
CURVATURE sensors ON temp BY city;
CONFIDENCE sensors ON city = 'Moscow';
RICCI sensors BETWEEN 0 AND 1;
HOLONOMY corpus ON FIBER (f11, f12) AROUND tense_label;
HOLONOMY corpus NEAR (f11=1.0, f12=0.0) WITHIN 0.3 ON FIBER (f11, f12) AROUND tense_label;
TRANSPORT corpus FROM (token_str='walk') TO (token_str='walked') ON FIBER (f4, f11, f12);
GAUGE corpus_en VS corpus_fr ON FIBER (f11, f12) AROUND tense_label;
GEODESIC sensors FROM city='Moscow' TO city='Singapore';
PREDICT sensors ON temp BY city TRAIN BEFORE date=20240901 TEST AFTER date=20240901;
SPECTRAL sensors FULL;
SPECTRAL corpus ON FIBER (f11, f12) MODES 3;
BETTI sensors;CONSISTENCY sensors REPAIR;
ENTROPY sensors ON temp BY city;
DIVERGENCE FROM sensor_das TO sensor_sonar;
FREEENERGY sensors AT 0.5;
HEALTH sensors;PROFILE sensors;REEB cloud ON (x, y, z);
FISHER demo ON (age, income);
WASSERSTEIN pop ON income BETWEEN cohort = 0 AND 1;
PERSISTENCE cloud ON (x, y) GAP 3;
CAPACITY sensors TOLERANCE 2.5;
HORIZON sensors TOLERANCE 3.0;
DEPTH sensors;curl -X POST http://localhost:3142/v1/bundles/sensors/brain/sudoku \ -H "Content-Type: application/json" -d '{ … }' # also: /brain/sample_transport · /brain/confidence_with_explain · /brain/attend · /brain/dream …
Everything is under /v1 on port 3142. The machine-readable source of truth is GET /v1/openapi.json on a running server.