From an idea to a running Flagsmith experiment in 2 minutes.
The official setup prompt is 8 steps, ~136 lines, ~30 minutes of manual work. FlagPilot turns it into one plain-language form โ then gives you copy-paste CLI commands, SDK code and a traffic simulator. A human reviews everything before anything runs.
Build my experiment โโ This page is dogfooded: its headline and button are driven by the live multivariate flag flagpilot_cta, and the results panel below is gated by the boolean flag results_panel. If the flags don't exist yet, sensible defaults are shown โ nothing breaks.
1 ยท Experiment builder
Plain language in, Flagsmith commands out. Nothing is created or changed in your Flagsmith project by this page โ you run the generated commands yourself after reviewing them.
Human review โ read before you run anything
Tick all four boxes to enable the copy buttons. This is the human-approval gate Track 02 asks for.
Step 1 โ Create the flag + variations (run in your terminal, after flagsmith login + flagsmith init)
Step 2 โ Create the metric (JSON body)
Run with: flagsmith api api/v1/environments/<environment key>/experiment-metrics/ --input metric.json โ or paste the body into the Flagsmith dashboard.
Step 3 โ Create the experiment (JSON body)
Run with: flagsmith api api/v1/environments/<environment key>/experiments/ --input experiment.json. Do not start it yet โ starting locks the flag. Ship the code first, then start.
2 ยท SDK code generator
Init + exposure + conversion + event flush, with your environment key inserted. Pick your stack:
SDK versions that can send experiment events: JS/React @flagsmith/flagsmith 12.4.0+, Python flagsmith 6.3.0+, Node.js @flagsmith/nodejs 9.1.0+ (the older flagsmith-nodejs package cannot send events).
3 ยท Traffic simulator generator
No real traffic yet? Simulate a few hundred unique users so results appear in minutes โ the official setup prompt's own trick. The script uses @flagsmith/nodejs 9.5.0 and the event-sending SDK.
Run with npm i @flagsmith/nodejs@9.5.0 then node simulate.mjs. Exposures and conversions are joined per identity, so the script uses one stable ID per simulated user.
4 ยท Live results
Paste an experiment ID from your Flagsmith dashboard and fetch its statistical results straight from the Flagsmith API, using your environment key. Nothing here is simulated โ if there is no experiment yet, the panel says so.
Run the generated commands from section 1, ship the SDK code from section 2, send traffic with the simulator from section 3 โ then paste the experiment ID here. Results refresh at most once every 5 minutes in Flagsmith; use the dashboard Refresh button if the numbers look stale.
5 ยท Pre-flight checks
The traps from the official setup prompt, checked before you start.
- Flag name is lowercase with only letters, numbers,
_and-. - Every variation has a unique key, and
controlis only used for the control. - Success event name is set โ remember it is case-sensitive and must match the code exactly.
- Your SDK can send events: JS/React 12.4.0+ ยท Python 6.3.0+ ยท Node.js
@flagsmith/nodejs9.1.0+ ยท Java 8.2.0+ ยท Go v5.3.0+ ยท Flutter 6.2.0+. - Don't use the Flagsmith MCP server to start experiments โ it can't. Use the CLI / API commands above.
- Experimentation needs a warehouse connection on the environment.
If none is connected, see connect a warehouse โ without it, no results can be computed.
About FlagPilot
FlagPilot automates the official Flagsmith setup prompt for coding agents (8 steps, ~136 lines) into a 2-minute form. It does not replace the prompt โ it is built on it, and credits it. No backend, no secrets in the browser: the Management API is never called from this page, so the tool emits commands and JSON for you to run in your own terminal after review.
Limitations (honest): this page cannot create flags, metrics or experiments by itself โ that needs your terminal and your login. Results need a warehouse-connected environment and real or simulated traffic. The demo Flagsmith project used here is the free Cloud tier (50k requests/month, Experimentation included).
Built for Toggle Wars โ Flagsmith Experimentation Hackathon, Track 02: AI Agents and Feature Flags. Repo: Herman-234/flagpilot (MIT). Live demo: herman-234.github.io/flagpilot.