Setup
To get started, you’ll need:- The LaunchDarkly MCP installed in Claude Code.
- An alert to trigger from an error threshold.
Serenia — sales team assistant

The Serenia AI assistant UI.
answer_faqlog_inquiryqualify_lead
Serenia CRM Airtable

The Serenia CRM Airtable backend tracking leads from the agent's skills.
AgentControl configs, variations, targeting, percentage rollout
You’ll want a way to test how different variations impact traffic, but first you’ll need to create an AgentControl config for thequalify_lead skill to determine if the request is hot, warm, or cold.
You’ll also need to create two variations. The first uses the original JSON shape:
LaunchDarkly’s AI configs product was renamed to AgentControl this week. The MCP server endpoints, slash commands, and some skill names still use the aiconfigs slug, and the resource itself is still commonly called an “AI config.” This tutorial uses the current product name (AgentControl) and keeps the legacy slugs in code and commands where they still apply.
Create the AgentControl config and two variations
Use the prompt below in Claude Code with the LaunchDarkly MCP server connected. It scaffolds the project, the AgentControl config, and both variations in a single pass.Cursor / Claude Code prompt — create AgentControl config and variations
Cursor / Claude Code prompt — create AgentControl config and variations
v1 set to 100% and v2 to 0% of traffic.

Initial percentage rollout with v1 stable at 100% and v2 precise at 0%.
Auto remediation will be set to off. If on, Vega would automatically investigate the issue, but for this tutorial you want to be able to investigate the issue yourself.
Then, generate baseline traffic to make sure observability data is coming in.
Baseline traffic output
Baseline traffic output

Baseline traffic visible in the LaunchDarkly Traces view.

Baseline traffic visible in the LaunchDarkly Observability metrics view.
v1 → 75% and v2 → 25%.

Shifting the rollout to 75% v1 and 25% v2 to introduce the breaking change.
Traffic output with v2 errors
Traffic output with v2 errors

The errors view in LaunchDarkly showing the spike caused by the v2 variation.
Investigation — five prompts
This is the step where you could use Vega to handle investigation, but sometimes you may want to drill down yourself and use AI to get to the root cause sooner. For this scenario, you can use these five prompts in Claude Code to diagnose the issue now that the alert has been triggered. You can also run this same investigation in your own AI agent by connecting the LaunchDarkly MCP server — the prompts below work in any agent with the MCP connected.Prompt 1 — Scope the blast radius
Prompt 2 — Reconstruct a user session failure
lead_score stage of the qualify_lead agent skill.
Prompt 3 — Pinpoint the type of breaking change
Prompt 4 — Confirm the variation is the cause
Prompt 5 — Finalize what’s different
The Decision
Now that you have the diagnosis, there are three plausible paths forward, and each one is a real option an on-call engineer might pick.- Roll back
qualify-lead-v2-preciseto 0% and serve everyonequalify-lead-v1-stablewhile the parser is fixed. Fastest, blunt, and stops the bleeding immediately. Downside: any benefit from the new prompt’s richer scoring (urgency, budget signal, decision authority) is paused until the parser catches up. - Hold the rollout at 25% while you patch the parser to read
lead_temperature. The error count stays elevated for ~25% of leads until the patch ships, but you don’t yo-yo the variation in a way that complicates the audit trail. - Patch and ship forward without rolling back at all. Correct fix, slowest, requires confidence that the parser update will land in the next thirty minutes. If you’re already on
qualify_lead.pyin another PR, this might be cheaper than it looks.
Drafted Slack message from Claude Code
Drafted Slack message from Claude Code