What is a feature flag?
A feature flag is a runtime switch that decides whether a piece of code runs and which variant a user sees. Instead of branching on hard-coded config, your application asks flags.evaluate("checkout-v2", user) at request time and the platform answers on, off, or one of several variants.
Flags decouple deploying code from shipping a feature. You can roll out new code dark, flip it on for 5% of users, watch the metrics, expand to 100% — and roll back to "off" in seconds without re-deploying.
Core concepts
The named switch (e.g. checkout-v2) — has a type (release / experiment / ops) and one or more variants.
A possible value the flag can return — boolean (on/off), a string, a JSON config, etc.
A targeting condition with allocations — "if attributes.plan == 'pro' then 100% on, else fall through".
Each flag has a separate config per env. A flag can be on in dev and off in prod. Environments can be opt-in, and each flag chooses which environments it uses.
Logical app/service grouping. A Management Key can be scoped to one application — required for evaluation keys — and optionally narrowed to one environment.
A user always lands in the same variant — deterministic per-user assignment means you can ramp exposure without users flickering between values.