Feature flags lab
**Gradual rollout, kill switches, and A/B splits** — change behavior without redeploying.
Reviewed July 2026 · interactive lab
1Try it yourself
Playground
Feature flag lab
Flags control who sees what — without redeploying code.
New RAG index for 5% of traffic
2Read & reflect
Recap
#What you just did
You chose percentage rollout, kill switch, or A/B split for three ship scenarios.
Teach
#Pattern
if flags.is_on("new_rag_index", user_id, pct=5):
retriever = index_v2
else:
retriever = index_v1
Always log flag variant in traces so incidents tie to cohorts.
Use it
#When you'd use this
- Canary a new embedding model
- Dark-launch a tool before marketing announces it
- Compare two system prompts with shared eval gates
Watch out
#Watch out
Sticky bucketing matters — the same user should stay in one variant per experiment.
Try next
#Try this next
Add a kill switch for your agent’s most dangerous tool.
3Spark check