launchdarkly-guarded-rollout
launchdarkly/agent-skills
Configure progressive feature rollouts with automated metric monitoring and safety rollbacks in LaunchDarkly.
What is launchdarkly-guarded-rollout?
Set up guarded rollouts that gradually increase traffic to new feature variations while monitoring key metrics for regressions. Use this when releasing features safely with automatic pause or rollback if performance degrades beyond configured thresholds.
- Design multi-stage rollout progression with increasing traffic percentages
- Select and configure metrics to monitor during each rollout stage
- Set regression thresholds that trigger notifications or automatic rollbacks
- Start progressive rollouts with automated safety controls
- Stop active rollouts immediately if issues are detected
- Inspect flag configurations and available metrics for monitoring
How to install launchdarkly-guarded-rollout
npx skills add https://github.com/launchdarkly/agent-skills --skill launchdarkly-guarded-rollout- LaunchDarkly MCP server remotely hosted and configured in your environment
- Access to a LaunchDarkly project with flag management permissions
- Feature flag already created with at least two variations (test and control)
How to use launchdarkly-guarded-rollout
- 1.Run `get-flag` to inspect the target flag and identify variation IDs for test and control versions
- 2.Run `list-metrics` to discover available metrics for monitoring during rollout
- 3.Ensure the flag is enabled in the target environment using `toggle-flag` if needed
- 4.Design rollout stages with traffic percentages (e.g., 1%, 10%, 50%, 100%) and monitoring windows (e.g., 1 hour, 24 hours)
- 5.Configure metrics with regression thresholds and actions (notify, rollback, or both)
- 6.Call `start-guarded-rollout` with your stage and metric configuration
- 7.Monitor the rollout progress and verify metrics are being tracked
- 8.Use `stop-guarded-rollout` if you need to halt the rollout at any point
Use cases
- Rolling out a new checkout flow to 1% of users first, then 10%, 50%, and 100% while monitoring error rates and conversion metrics
- Gradually releasing a redesigned API endpoint with automatic rollback if latency increases by more than 20%
- Progressive deployment of a database schema change with monitoring for query performance regressions
- Staged launch of a machine learning model variant with automatic pause if prediction accuracy drops below threshold
- Release engineers managing feature deployments
- Product managers coordinating gradual feature rollouts
- DevOps teams implementing safe deployment practices
- Engineering leads overseeing production changes with risk mitigation
launchdarkly-guarded-rollout FAQ
Rollout weights use basis points (thousandths): 1000 = 1%, 10000 = 10%, 50000 = 50%, 100000 = 100%.
Monitoring windows depend on your metric volatility. Typical values: 1 hour (3600000 ms) for smoke tests, 24 hours (86400000 ms) for stable signal detection, 7 days (604800000 ms) for long-term trends.
The rollout can notify your team, automatically rollback to the control variation, or both — depending on your configuration for each metric.
Yes, use `stop-guarded-rollout` to immediately halt the progressive rollout and lock the flag at its current state.
Guarded rollouts require the flag to be on. Use `toggle-flag` to enable it before starting the rollout.
Full instructions (SKILL.md)
Source of truth, from launchdarkly/agent-skills.
name: launchdarkly-guarded-rollout description: "Configure guarded rollouts with progressive traffic increases, metric monitoring, and automatic rollback. Use when releasing features gradually with safety thresholds." license: Apache-2.0 compatibility: Requires the remotely hosted LaunchDarkly MCP server metadata: author: launchdarkly version: "0.1.0"
LaunchDarkly Guarded Rollouts
You're using a skill that will guide you through configuring guarded rollouts in LaunchDarkly. Your job is to design rollout stages, select monitoring metrics, configure regression thresholds, and start the rollout.
Prerequisites
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
start-guarded-rollout-- start a progressive rollout with monitoringget-flag-- inspect the flag and its variationslist-metrics-- find metrics to monitor during the rollout
Optional MCP tools:
stop-guarded-rollout-- halt an active rollout immediatelytoggle-flag-- ensure the flag is turned on before startingcreate-metric-- create metrics if they don't exist
Core Concepts
What Are Guarded Rollouts?
A guarded rollout progressively increases traffic to a new feature flag variation through a series of stages. At each stage, LaunchDarkly monitors selected metrics for regressions. If a regression is detected, the rollout can automatically pause and notify the team — or even roll back.
Key Components
| Component | Description |
|---|---|
| Test variation | The new variation being rolled out |
| Control variation | The existing/baseline variation |
| Stages | Steps with increasing traffic percentage and monitoring windows |
| Metrics | What to monitor for regressions (error rate, latency, etc.) |
| Regression threshold | How much a metric can degrade before triggering action |
| On regression | Whether to notify, rollback, or both when a threshold is breached |
Rollout Weight Units
Rollout weights use thousandths (basis points):
1000= 1%10000= 10%50000= 50%100000= 100%
Monitoring Window
The monitoring window is specified in milliseconds:
3600000= 1 hour86400000= 24 hours604800000= 7 days
Core Principles
- Start Small: Begin with a low percentage (1-5%) to catch issues early
- Monitor What Matters: Choose metrics that reflect user experience
- Set Realistic Thresholds: Too tight = false alarms; too loose = missed regressions
- Allow Time: Each stage needs enough monitoring time for signal to emerge
- Have a Rollback Plan: Always configure at least notification on regression
Workflow
Step 1: Prepare
Before starting a guarded rollout:
- Use
get-flagto inspect the flag — note the variation IDs for test and control - Use
list-metricsto find metrics suitable for monitoring - Ensure the flag is on in the target environment (use
toggle-flagif needed) - Confirm there's no active guarded rollout on this flag already
Step 2: Design Stages
Plan the rollout progression. A typical pattern:
| Stage | Traffic | Monitoring Window | Purpose |
|---|---|---|---|
| 1 | 1% | 1 hour | Smoke test — catch obvious crashes |
| 2 | 10% | 24 hours | Early signal on metrics |
| 3 | 50% | 24 hours | Confidence building |
| 4 | 100% | 24 hours | Full rollout with monitoring |
Step 3: Configure Metrics
Select metrics that indicate problems:
| Metric Type | Example | Threshold | Action |
|---|---|---|---|
| Error rate | api-error-rate | 0.05 (5% increase) | Rollback |
| Latency | p99-response-time | 0.2 (20% increase) | Notify |
| Conversion | checkout-completed | 0.1 (10% decrease) | Notify + Rollback |
Step 4: Start the Rollout
Use start-guarded-rollout:
{
"projectKey": "my-project",
"flagKey": "new-checkout-flow",
"environmentKey": "production",
"testVariationId": "variation-id-for-new-flow",
"controlVariationId": "variation-id-for-current-flow",
"randomizationUnit": "user",
"stages": [
{"rolloutWeight": 1000, "monitoringWindowMilliseconds": 3600000},
{"rolloutWeight": 10000, "monitoringWindowMilliseconds": 86400000},
{"rolloutWeight": 50000, "monitoringWindowMilliseconds": 86400000},
{"rolloutWeight": 100000, "monitoringWindowMilliseconds": 86400000}
],
"metrics": [
{
"metricKey": "api-error-rate",
"onRegression": {"notify": true, "rollback": true},
"regressionThreshold": 0.05
},
{
"metricKey": "checkout-completed",
"onRegression": {"notify": true, "rollback": false},
"regressionThreshold": 0.1
}
]
}
Step 5: Verify
- Use
get-flagto confirm the guarded rollout is active - Check that the flag shows the rollout configuration in the environment
- Monitor for any immediate regression notifications
Report results:
- Guarded rollout started with N stages
- M metrics being monitored
- First stage at X% traffic for Y hours
Stopping a Rollout
If issues arise or you need to halt the rollout:
{
"projectKey": "my-project",
"flagKey": "new-checkout-flow",
"environmentKey": "production"
}
This immediately stops the progressive rollout and locks the flag at its current state.
Edge Cases
| Situation | Action |
|---|---|
| Flag is off | Turn it on first with toggle-flag — rollouts require the flag to be on |
| Active rollout exists | Stop it first with stop-guarded-rollout before starting a new one |
| No suitable metrics | Create metrics first with create-metric |
| Approval required | If the environment requires approvals, the tool will return an approval URL |
What NOT to Do
- Don't start a guarded rollout on a flag that's turned off
- Don't skip the monitoring window design — rushing through stages defeats the purpose
- Don't set regression thresholds to 0 — small fluctuations are normal
- Don't forget to configure at least one metric — a rollout without monitoring is just a regular rollout
Related skills
More from launchdarkly/agent-skills and the wider catalog.

launchdarkly-metric-choose
Choose the right metrics for LaunchDarkly experiments, guarded rollouts, and release policies.

launchdarkly-metric-create
Create LaunchDarkly metrics to measure experiments and rollouts—auto-instruments events when needed.

launchdarkly-metric-instrument
Add LaunchDarkly metric event tracking to your codebase with a single track() call.

mcp-configure
Configure LaunchDarkly's hosted MCP server for feature flag management in your coding agent.

migrate
Migrate an application with hardcoded LLM prompts to a full LaunchDarkly AgentControl implementation in five stages: audit the code, wrap the call, move the tools, add tracking, attach evaluators. Use when the user wants to externalize model/prompt configuration, move from direct provider calls (OpenAI, Anthropic, Bedrock, Gemini, Strands) to a managed config, or stage a full hardcoded-to-LaunchDarkly migration.

first-flag
Create and toggle your first LaunchDarkly feature flag end-to-end with evaluation code.