Skip to content
ULYSSES Stop contracts for Flagsmith experiments
STATIC COPYFour recorded runs, played to the end through this checkout's contract service and saved as pages. Not live: Flagsmith is not contacted, and every number is Flagsmith's own, as recorded.

Ulysses · four recorded runs · nothing to install

An agent that cannot ship on a lucky number

Ulysses puts a signed stop contract between an AI agent and a Flagsmith experiment. The agent may read the scoreboard as often as it likes. It may stop, and ship, only where the owner signed before the test began, and shipping waits for the owner’s tap. Four clicks show it.

  1. Two Ships
  2. The sirens
  3. The win, after the tap
  4. Signed autonomy

1

Two Ships: why peeking ships nothing

Both buttons exactly the same (an A/A test), 10,000 times, on Flagsmith’s own scoring code. Stopping at the first “Winning” out of 30 checks shipped a do-nothing change in 13.4% of them. Under a signed contract just as strict: 3.0%.

Open Two Ships

Two ships · the same 100 A/A experiments, sailed twice · lab simulation on Flagsmith’s own stats code

The agent can’t peek its way to a ship

Every variation here does nothing. Each red ship is a change that would have gone live anyway.

Unbound agent: ships at the first “Winning”

Stops the first time Flagsmith shows over 95% (ships it) or under 5% (keeps control).

95% “Winning”: the unbound agent ships here
12 of 100 shipped a do-nothing variation

Over 10,000 voyages: 13.4%

30 stopped early and kept control · 58 reached the planned end without shipping

Agent under a signed Ulysses contract

Acts on the same Flagsmith number, only where its signed boundary allows.

signed boundary: the contract ships only past it
3 of 100 shipped a do-nothing variation

Over 10,000 voyages: 3.0% at the same strictness · 1.3% at the contract’s default

5 stopped early and kept control · 92 reached the planned end without shipping

How this is drawn

Each line is one simulated A/A experiment: 30 looks of 100 synthetic identities per arm, base rate 10%, both arms identical, scored by Flagsmith stats.py v2.295.2 sha256 97c5ebfca7c8, unmodified. The vertical axis is Flagsmith’s chance to win at each look, on a normal (z) scale. These are runs 1 to 100 of seed 62944, the opening runs of the 10,000-run table below.

Left: stop at the first look over 95% (ship) or under 5% (keep control), a two-sided 10% rule read 30 times. Right: the Ulysses contract at alpha 0.1, the same two-sided 10% level, boundary spent over the signed looks; the contract’s default is alpha 0.05. Red ships are false Winning calls; grey dots are false Losing calls, which keep control and ship nothing.

Data: paths-offline.json next to offline.json, written by uv run ulysses calibrate offline --flagsmith-src ../_shared/reference/flagsmith. The 100-run counts are counted from the runs; the 10,000-run rates are read from offline.json.

2

The tempted agent and its sirens

A scripted agent built to give in: whenever Flagsmith reads “Winning” (95% or more) while the contract holds, it says “Shipping” and calls execute. On self-hosted Flagsmith it asked to ship 4 times, 2 of them on a Winning reading while the contract held, and was refused every time. Neither experiment shipped: both contracts reached their horizon and kept control, after the owner’s tap.

The voyage on this card lists each look, each siren and each refused call, in order.

Open the tempted run’s voyage

3

The win, after the owner’s tap

The same demo on Flagsmith Cloud. Flagsmith read “Winning” while the contract held and the agent’s ship was refused. At a later look the contract fired a win, and bold went live on ulysses_checkout_cta only after the owner’s signed one-tap confirmation.

Open the Cloud win

4

Autonomy the owner signed

Here both contracts carry one signed clause: the agent may keep_control without a tap, and nothing else. The A/A contract fired a loss; the agent asked to ship and was refused, then kept control on its own under the clause. The real-effect win still waited for the owner’s tap: the clause never covers shipping.

Open the autonomous keep-control

+

Every recorded run in this copy

RunTraceLooksRefused agent callsSirensPages
The tempted agentdata/replay-tempted.jsonl12 6224
Flagsmith Clouddata/replay-cloud.jsonl10 6122
Signed autonomydata/replay-autonomy.jsonl11 5123
A language model as the agentdata/replay-llm-openai.jsonl9 0021

Each run was played to the end through this checkout’s contract service over a fresh store: contracts re-hashed, signatures verified against the signers’ keys, every decision recomputed from the recorded Flagsmith numbers and compared with the recorded one (42 of 42 identical). The pages were then saved as files. Signing and the owner’s tap need the running service, so they are read-only here. To run one yourself: uv run python scripts/judge_demo.py --replay data/replay-tempted.jsonl --open. Source: https://github.com/Dakshhhhh-ops/ulysses.