● Toggle Wars · Track 02 · Built on Flagsmith

Agents earn
their rollout.

AI coding agents turn GitHub issues into pull requests. Every change ships behind a Flagsmith flag, and how many users see it depends on the agent's trust score.

Old code is the defaultExposure is earnedKill switch built in
Try "Start your free trial" on signup
relay-coder opened #12 · Planner → Coder → Reviewer
Reviewed ✓
relay_signup_cta_copy
Flag created in Flagsmith · off
OFF
Traffic split (frozen per experiment)tier: new
Agent trust
0.20
Win probability
—
Signups ↑
The loop

From issue to 100%, with a flag at every step.

Comment /relay ship on an issue. Three agents plan, code and review the change. A real experiment decides whether it stays.

💬

Issue

A maintainer comments /relay ship

🧭

Plan

Files in scope + a flag name

⌨️

Code

New path behind the flag

🔍

Review

Scope + flag wiring checked

🚩

PR · flag off

Merging is safe

🧪

Experiment

Split sized by trust

⚖️

Kill or approve

Errors → off · ≥95% → ask a human

🧹

Clean-up

Flag + losing path removed

Live experiment

Watch version B pull ahead.

Flagsmith splits real visitors, counts every signup and works out how likely the new code is to be better. Relay reads the numbers every minute.

Lines draw as data arrives
A · old codeB · new code
signup conversion · 14 days
13%11%9%7% ↑ +18% lift
Win probability
50.0%
A · old code
10.0%
0 users
B · new code
9.5%
0 users
Trust simulator · try it

New agents start at 5%. Proven ones get 50%.

Every outcome moves the agent's trust score, and the score decides the share of users its next change reaches. Press the buttons and watch Relay level up, or get knocked down.

👉 Win three times to reach the next tier
LEVEL UP!
relay-coder · copy tasks
0.20
tier: new
next change reaches 5% of users
5%
10%
20%
35%
50%
relay-flags commented on #12

📊 Version B lifted signups 18%

Win probability
97.2%
Lift
+18%
Users on B
412
🙋 Your call:
Evidence, then a human · try it

Flagsmith runs the A/B test. You make the call.

At ≥95% win probability Relay posts a plain-English result card on the PR and waits. It never sends a change to 100% of users on its own. Go ahead, be the maintainer.

Kill switch · try it

Errors spike. The flag turns off. No meeting needed.

Every 10 seconds Relay compares the new path's error rate with the old one. Past the threshold, it ends the experiment with the flag disabled, lowers the agent's trust and explains why on the PR.

Error rate · new code vs oldON
threshold 5% 🚨
✅ Flag disabled: the new path errored on 64% of requests. Everyone is back on the old code. Trust 0.32 → 0.22
Where the agent stops

Three doors only a human can unlock.

01

Merge the PR

Until then nothing ships. After merging, the flag is still off.

you click Merge
02

Go to 100%

Only after ≥95% win probability, and only for repo admins or maintainers.

/relay approve
03

Merge the clean-up

The Coder removes the flag and the losing code. Merging deletes the flag in Flagsmith.

you click Merge
Built on Flagsmith

The flag is the safety net. The experiment is the decision.

Self-hosted Flagsmith with Experimentation. Every call is logged as structured JSON, so you can watch the whole loop happen live.

POST/projects/{p}/features/flag, off201
POST/features/{id}/mv-options/treatment201
POST/environments/{e}/experiments/split from trust201
POST/experiments/{id}/start/on merge200
GET/experiments/{id}/results/win probability200
POST/experiments/{id}/complete/off · A · B200
DELETE/projects/{p}/features/{id}/after clean-up204
Live from this Relay

Real agents. Real scores.

Read straight from this Relay's database: every agent's trust score and the latest runs from /relay ship to clean-up. Refreshes every 15 seconds.

Ship like the agent has to earn it.

Open source. Runs locally with one docker compose up.

Get the code →See agent PRs