Skip to main content

LaunchDarkly Integration

Connect LaunchDarkly to give agents visibility into feature flag state, targeting rules, and flag status across environments. Agents can then answer "did someone flip a flag?" during incident triage.

Capabilities​

Once connected, agents can:

CapabilityDescription
List ProjectsDiscover LaunchDarkly projects in your account
List EnvironmentsView environment topology (production, staging, test)
List Feature FlagsScan flags with filtering by environment, tag, and state
Inspect Flag DetailsInspect targeting rules, variations, and prerequisites in detail
Check Flag StatusDetermine if a flag is active, inactive, launched, or new

Prerequisites​

  • A LaunchDarkly account
  • An API access token with Reader role permissions
  • Read access to the projects you want to monitor

Setup​

1
Create an API Access Token
  1. Log in to LaunchDarkly
  2. Go to Organization settings → Authorization → Access tokens
  3. Click Create token
  4. Select the Reader role
  5. Select the This is a service token checkbox for long-term integration use
  6. Copy the generated token
2
Add Integration in Autoheal
  1. Go to Integrations in Autoheal
  2. Click LaunchDarkly
  3. Enter a name (e.g., "Production LaunchDarkly")
3
Configure Credentials

Enter the following:

  • API Access Token: Your LaunchDarkly access token
4
Test and Save

Click Test Connection to check the connection, then click Save.

Token Permissions​

The Reader built-in role is sufficient for all investigation capabilities. This grants read-only access to projects, environments, flags, and flag statuses.

PermissionWhy It's Needed
Read projectsDiscover project structure
Read environmentsUnderstand environment topology
Read feature flagsInspect flag state and targeting rules
Read flag statusesCheck if flags are active or inactive
info

We recommend using a service token rather than a personal token. Service tokens are not tied to a user account, so they keep working independently of any one person's access.

Example Queries​

Once connected, you can ask an agent:

What feature flags are currently active in the production environment?
Show me the targeting rules for the enable-new-checkout flag
Are there any flags that are ON in production but OFF in staging?
What's the rollout percentage for the rate-limit-increase flag?
Which flags were recently launched in the default project?

Troubleshooting​

401 Unauthorized
  • Check that the access token is correct and is not expired
  • Check that the token is not revoked in LaunchDarkly settings
  • Check that the token was copied completely (tokens start with api-)
403 Forbidden
  • Check that the token has the Reader role or equivalent permissions
  • Check that custom role restrictions aren't blocking project access
Project or Flag Not Found
  • Check that the project key is correct (keys are case-sensitive)
  • Check that the flag exists in the specified project
  • Check that the token has access to the project
Rate Limiting
  • LaunchDarkly allows 160 requests per 15 minutes
  • The read-only tools are unlikely to hit this limit during normal investigation
  • If you are rate limited, wait a few minutes and retry