Flow Language for Universe eXperimentation
The open, declarative standard for governed synthetic customer universes — the discovery-side sibling of FLUID.
📖 Documentation · 🚀 Quickstart · 🧭 The Nineteen Kinds · 🔗 The FLUID Seam · 🗺️ Roadmap · ✨ What's New
FLUX describes synthetic customer universes: a governed digital twin in
which candidate rules and data products are discovered, stress-tested and
proven before a single production system is touched. A FLUX universe is
assembled from small declarative documents — nineteen kinds across six
families — and a Simulation emits its results under a
FLUID data-product contract:
what is proven in the twin is byte-for-byte the contract that ships.
FLUX discovers. FLUID delivers. The seam is where the risk goes to die.
v0.5.0 — working draft. All nine vNext RFCs are shipped additively on the 0.3.0 core — the spec now carries a runtime enforcement contract with conformance vectors and portable, signable evidence bundles alongside the declarative core. Pre-1.0: minor versions may break; every release ships with a schema diff and a regression suite. The design is documented in the position paper "FLUX and FLUID" (distributed separately under CC BY 4.0); where the paper and this schema disagreed, docs/reconciliation.md is the honest ledger.
| Family | Kinds | Question it answers |
|---|---|---|
| Population | World, Persona, Segment | Who is in the universe |
| Commerce | Catalog, Offer, Channel, ConsentProfile | What can be sold, how it can be reached |
| Behaviour | Journey, JourneyTaxonomy, Signal, Detector | What happens and what to watch for |
| Activation | Campaign, Treatment, Experiment | What we do about it |
| Calibration | Playback | How the twin stays honest |
| Composition | Simulation, Module, Blueprint, VerticalPack | How it assembles and travels |
Every document shares one envelope, aligned with FLUID's:
fluxVersion: "0.5.0"
kind: World
id: q3-retention-world
name: Q3 Retention World
metadata:
owner:
team: growth-lab
spec:
seed: 42
population:
size: 25000
lifecycleMix: { new: 0.15, active: 0.55, atrisk: 0.20, churned: 0.10 }Any kind may additionally declare agentPolicy (model allow-list, token
budget, use-case limits) and skills — the uniform agentic extension point.
A skill never changes the shape a kind must satisfy, only the content it emits
within those bounds.
A Simulation emits streams by referencing the FLUID contract they are
proven under — never by restating it:
spec:
worldRef: q3-retention-world
emits:
- productRef: telco.gold.payment_recovery_moment # a .fluid.yml in the bundle
exposeId: payment_recovery_moment # an expose of that product
fluidVersion: "0.7.5" # validated against the vendored FLUID schemaThe offline validator resolves the reference, validates the .fluid.yml
against the vendored FLUID schema for the pinned version, and asserts the
expose exists. Promotion to production is not a re-implementation: the same
contract file is wrapped around the real estate.
pip install jsonschema pyyaml rfc8785
python3 scripts/validate.py examples/telco-payment-recovery # schema + cross-document
python3 scripts/enforce.py # RFC-04 conformance vectors
python3 scripts/bundle.py pack examples/telco-payment-recovery -o dist/ # RFC-09 evidence bundleTwo layers, both offline (no cloud, no running engine):
- Schema — every
*.flux.ymlagainstschema/flux-schema-0.5.0.json(JSON Schema 2020-12, closed specs, typed everything). - Cross-document — every reference resolves to the right kind (no
dangling links), mixes and weights sum to 1, transitions stay inside their
taxonomies, skills stay inside their
agentPolicy, and the FLUID seam conforms.
Use the schema in your editor:
# yaml-language-server: $schema=https://agenticstiger.github.io/flux/schema/flux-schema-0.5.0.jsonflux_spec is also an installable Python package — the exact code behind
scripts/validate.py, scripts/enforce.py and scripts/bundle.py, not a
reimplementation; the three scripts are thin shims onto it. It is not yet on
PyPI, so install it from source for now:
git clone https://github.com/Agenticstiger/flux.git && cd flux
pip install .from flux_spec.validate import Bundle
from flux_spec.enforce import decide, run_vectors
from flux_spec.bundle import pack, verifypython3 scripts/validate.py ... and python3 -m flux_spec.validate ...
behave identically — same for enforce and bundle.
examples/telco-payment-recovery/ is the
paper's worked example, complete: all nineteen kinds plus the FLUID contract
at the seam, green under CI.
schema/ flux-schema-<version>.json (+ -latest alias) — normative
schema-diffs/ one diff document per version pair
examples/ validated bundles (CI-enforced)
vendor/fluid/ vendored FLUID schemas the seam validates against
flux_spec/ the flux-spec package: validate.py · enforce.py (RFC-04) · bundle.py (RFC-09)
scripts/ validate.py / enforce.py / bundle.py — thin CLI shims onto flux_spec
tests/ regression suite + published enforcement conformance vectors
docs/ reconciliation ledger
FLUID is the data-product contract standard (MIT, open-data-protocol). FLUX is the experimentation language that emits FLUID contracts. They are separate standards with separate schemas, designed to interlock at exactly one seam. This repo vendors FLUID schemas for offline seam validation; it does not fork or redefine them.
Apache License 2.0. The originating position paper is distributed separately under CC BY 4.0 by The FLUX Project.
See CONTRIBUTING.md, GOVERNANCE.md and VERSIONING.md. Spec changes travel as one PR touching schema
- diff + examples + tests together.