FabricFabricExperiments
Getting started

Quickstart (local)

Run your first Fabric Experiment in 60 seconds — no SaaS, no signup, no infrastructure.

This guide walks you from zero to a running experiment with a deterministic assignment and a real exposure record — entirely on your laptop. No account, no Cloudflare, no database. Just the fx CLI and a YAML file.

1. Install

npm install -g @fabricorg/experiments
fx --help

(If you can't install globally, prefix everything with npx @fabricorg/experiments.)

2. Create one experiment

mkdir my-fx && cd my-fx
mkdir experiments

Save this as experiments/homepage-cta.yaml:

id: homepage-cta
name: Homepage CTA copy test
sampleRate: 1
variants:
  - key: control
    name: Get started
  - key: treatment
    name: Start free trial
metrics:
  - key: signup
    name: Sign-ups
    kind: conversion
    eventName: signup
    isPrimary: true

3. Run it

fx dev &                          # starts an in-process control plane on :8787
fx apply experiments/             # validates + creates the experiment
fx publish                        # signs the manifest

You'll see:

✓ experiments/homepage-cta.yaml  (homepage-cta)
1 experiment(s) valid.
Summary: +1 create, ~0 update, -0 delete.
Signed manifest v1 (keyId=dev-default, contentHash=…) written to .fx/manifest.json

The signed manifest is now served at http://127.0.0.1:8787/manifest.

4. Pretend to be a user

# Record an exposure (your app would do this from the SDK).
curl -X POST http://127.0.0.1:8787/v1/exposure \
  -H 'content-type: application/json' \
  -d '{"experimentId":"homepage-cta","subjectId":"alice","variantKey":"treatment","manifestVersion":1}'

# Record a conversion.
curl -X POST http://127.0.0.1:8787/v1/conversion \
  -H 'content-type: application/json' \
  -d '{"subjectId":"alice","eventName":"signup","value":1,"at":"2026-05-08T21:00:00.000Z"}'

5. See results

fx report homepage-cta

Output:

homepage-cta — Homepage CTA copy test
  variant      exposed   converted   cr     lift
  control            0           0   0.00%   —
  treatment          1           1  100.00%  +inf%

Real data needs more than one user — but you've now exercised every link in the chain: YAML → governed action → signed manifest → assignment → exposure → conversion → report.

6. Tear it down

fx kill homepage-cta --reason "demo done"
kill %1   # stop fx dev

Killing emits a governed event (visible in the audit log) and removes the experiment from the live manifest.

What just happened

Where to next

On this page