> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Manage LaunchDarkly feature flags and segments from Guild agents

> Connect Guild agents to LaunchDarkly to read, create, update, and delete feature flags, segments, approval requests, audit logs, and more.

Integrations · LaunchDarkly

A Guild agent can read, create, update, and delete feature flags, user segments, approval requests, and audit log entries in LaunchDarkly on your team's behalf. Guild stores the LaunchDarkly API key server-side and injects it through its credential proxy, so agent code never sees it. Credential policies let you restrict which operations and resources each agent may touch, and every call appears in Guild's audit trail.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use LaunchDarkly.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect LaunchDarkly to your first agent.

## What the LaunchDarkly integration exposes

The tools cover feature flags and their per-environment configurations, user segments, approval requests, scheduled changes, custom roles, team members, webhooks, data export destinations, integration subscriptions, relay proxy configs, access tokens, and usage metrics. Read tools fetch lists and individual records; write tools create, patch, copy, and delete them. Audit log tools retrieve both lists of entries and single entries by resource ID.

## How it works

**1. Open credentials in Guild**

Go to your account or organization and open **Access & setup > Credentials**. Click **Connect** to start.

**2. Select and configure LaunchDarkly**

Search for and select **launchdarkly**, then paste your LaunchDarkly API key into the **API Key** field.

**3. Import tools into your agent**

Import `LaunchdarklyTools` from `@guildai-services/guildai~launchdarkly` and spread it into your agent's `tools` object. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only the tools your agent needs.

## Why LaunchDarkly access needs governing

Feature flag changes affect production behavior immediately across every environment they touch. An agent that can delete a flag or modify targeting rules in a production environment can cause an outage. Guild's credential proxy enforces [credential policies](https://docs.guild.ai/platform/credential-policies.md) before any request leaves Guild: DENY rules block specific operations or HTTP methods, and ALLOW rules can restrict access to named projects or environments. Policies can be scoped to individual agents or workspaces, so a triage agent gets read-only access while a release agent gets write access, all on the same connected credential.

Credentials are stored and injected server-side; agents never receive the raw API key. You can scope a credential to one workspace, one member, or one agent using [credential scoping](https://docs.guild.ai/platform/credentials.md), and Guild's [security architecture](https://docs.guild.ai/platform/security-architecture.md) keeps the key out of agent code entirely. Without policies, the default posture is allow-all; deleting the allow-all policy switches the fallback to deny.

## About the LaunchDarkly integration

Agents can read, create, update, and delete feature flags and their configurations across projects and environments. They can manage team members, custom roles, webhooks, scheduled changes, and data export destinations. Usage metrics, audit log entries, and user targeting rules are also accessible. The integration is `guildai~launchdarkly`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as a bearer token in the `Authorization` header

### Setup

**1. Connect LaunchDarkly**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **launchdarkly**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { LaunchdarklyTools } from "@guildai-services/guildai~launchdarkly"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with LaunchDarkly.",
  tools: { ...LaunchdarklyTools },
})
```

### Selecting specific tools

Tools are named with the `launchdarkly_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~launchdarkly`:

> [accordion] All 105 tools
>
> | Tool | What it does |
> | - | - |
> | `launchdarkly_copy_feature_flag` | Copies the feature flag configuration from one environment to the same feature flag in another environment. |
> | `launchdarkly_delete_approval_request` | Delete an approval request for a feature flag config |
> | `launchdarkly_delete_custom_role` | Delete a custom role by key. |
> | `launchdarkly_delete_destination` | Get a single data export destination by ID |
> | `launchdarkly_delete_environment` | Delete an environment in a specific project. |
> | `launchdarkly_delete_feature_flag` | Delete a feature flag in all environments. |
> | `launchdarkly_delete_flag_config_scheduled_changes` | Delete a scheduled change on a feature flag in an environment. |
> | `launchdarkly_delete_integration_subscription` | Delete an integration subscription by ID. |
> | `launchdarkly_delete_member` | Delete a team member by ID. |
> | `launchdarkly_delete_project` | Delete a project by key. |
> | `launchdarkly_delete_relay_proxy_config` | Delete a relay proxy configuration by ID. |
> | `launchdarkly_delete_token` | Delete an access token by ID. |
> | `launchdarkly_delete_user` | Delete a user by ID. |
> | `launchdarkly_delete_user_segment` | Delete a user segment. |
> | `launchdarkly_delete_webhook` | Delete a webhook by ID. |
> | `launchdarkly_get_approval_request` | Get a single approval request for a feature flag config |
> | `launchdarkly_get_approval_requests` | Get all approval requests for a feature flag config |
> | `launchdarkly_get_audit_log_entries` | Get a list of all audit log entries. |
> | `launchdarkly_get_audit_log_entry` | Use this endpoint to fetch a single audit log entry by its resouce ID. |
> | `launchdarkly_get_custom_role` | Get one custom role by key. |
> | `launchdarkly_get_custom_roles` | Return a complete list of custom roles. |
> | `launchdarkly_get_destination` | Get a single data export destination by ID |
> | `launchdarkly_get_destinations` | Returns a list of all data export destinations. |
> | `launchdarkly_get_environment` | Get an environment given a project and key. |
> | `launchdarkly_get_evaluations` | Get events usage by event id and the feature flag key. |
> | `launchdarkly_get_event` | Get events usage by event type. |
> | `launchdarkly_get_events` | Get events usage endpoints. |
> | `launchdarkly_get_expiring_user_targets` | Get expiring user targets for feature flag |
> | `launchdarkly_get_expiring_user_targets_for_user` | Get expiring dates on flags for user |
> | `launchdarkly_get_expiring_user_targets_on_segment` | Get expiring user targets for user segment |
> | `launchdarkly_get_feature_flag` | Get a single feature flag by key. |
> | `launchdarkly_get_feature_flags` | Get a list of all features in the given project. |
> | `launchdarkly_get_feature_flag_status` | Get the status for a particular feature flag. |
> | `launchdarkly_get_feature_flag_status_across_environments` | Get the status for a particular feature flag across environments |
> | `launchdarkly_get_feature_flag_statuses` | Get a list of statuses for all feature flags. |
> | `launchdarkly_get_flag_config_scheduled_change` | Get a scheduled change on a feature flag by id. |
> | `launchdarkly_get_flag_config_scheduled_changes` | Get all scheduled workflows for a feature flag by key. |
> | `launchdarkly_get_flag_config_scheduled_changes_conflicts` | Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. |
> | `launchdarkly_get_flags_by_projectkey_by_environmentkey_by_featureflagkey_dependent_flags` | Get dependent flags for the flag in the environment specified in path parameters |
> | `launchdarkly_get_flags_by_projectkey_by_featureflagkey_dependent_flags` | Get dependent flags across all environments for the flag specified in the path parameters |
> | `launchdarkly_get_integrations` | Get a list of all configured audit log event integrations associated with this account. |
> | `launchdarkly_get_integration_subscription` | Get a single integration subscription by ID. |
> | `launchdarkly_get_integration_subscriptions` | Get a list of all configured integrations of a given kind. |
> | `launchdarkly_get_mau` | Get monthly active user data. |
> | `launchdarkly_get_mau_by_category` | Get monthly active user data by category. |
> | `launchdarkly_get_me` | Get the current team member associated with the token |
> | `launchdarkly_get_member` | Get a single team member by ID. |
> | `launchdarkly_get_members` | Returns a list of all members in the account. |
> | `launchdarkly_get_project` | Fetch a single project by key. |
> | `launchdarkly_get_projects` | Returns a list of all projects in the account. |
> | `launchdarkly_get_relay_proxy_config` | Get a single relay proxy configuration by ID. |
> | `launchdarkly_get_relay_proxy_configs` | Returns a list of relay proxy configurations in the account. |
> | `launchdarkly_get_root` | You can issue a GET request to the root resource to find all of the resource categories supported by the API. |
> | `launchdarkly_get_search_users` | Search users in LaunchDarkly based on their last active date, or a search query. |
> | `launchdarkly_get_stream` | Get a stream endpoint and return timeseries data. |
> | `launchdarkly_get_stream_by_sdk` | Get a stream timeseries data by source show sdk version metadata. |
> | `launchdarkly_get_streams` | Returns a list of all streams. |
> | `launchdarkly_get_stream_sdk_version` | Get a stream timeseries data by source and show all sdk version associated. |
> | `launchdarkly_get_token` | Get a single access token by ID. |
> | `launchdarkly_get_tokens` | Returns a list of tokens in the account. |
> | `launchdarkly_get_usage` | Returns of the usage endpoints available. |
> | `launchdarkly_get_user` | Get a user by key. |
> | `launchdarkly_get_user_flag_setting` | Fetch a single flag setting for a user by key. |
> | `launchdarkly_get_user_flag_settings` | Fetch a single flag setting for a user by key. |
> | `launchdarkly_get_users` | List all users in the environment. |
> | `launchdarkly_get_user_segment` | Get a single user segment by key. |
> | `launchdarkly_get_user_segments` | Get a list of all user segments in the given project. |
> | `launchdarkly_get_webhook` | Get a webhook by ID. |
> | `launchdarkly_get_webhooks` | Fetch a list of all webhooks. |
> | `launchdarkly_patch_custom_role` | Modify a custom role by key. |
> | `launchdarkly_patch_destination` | Perform a partial update to a data export destination. |
> | `launchdarkly_patch_environment` | Modify an environment by ID. |
> | `launchdarkly_patch_expiring_user_targets` | Update, add, or delete expiring user targets on feature flag |
> | `launchdarkly_patch_expiring_user_targets_for_flags` | Update, add, or delete expiring user targets for a single user on all flags |
> | `launchdarkly_patch_expiring_user_targets_on_segment` | Update, add, or delete expiring user targets on user segment |
> | `launchdarkly_patch_feature_flag` | Perform a partial update to a feature. |
> | `launchdarkly_patch_flag_config_scheduled_change` | Updates an existing scheduled-change on a feature flag in an environment. |
> | `launchdarkly_patch_integration_subscription` | Modify an integration subscription by ID. |
> | `launchdarkly_patch_member` | Modify a team member by ID. |
> | `launchdarkly_patch_project` | Modify a project by ID. |
> | `launchdarkly_patch_relay_proxy_config` | Modify a relay proxy configuration by ID. |
> | `launchdarkly_patch_token` | Modify an access token by ID. |
> | `launchdarkly_patch_user_segment` | Perform a partial update to a user segment. |
> | `launchdarkly_patch_webhook` | Modify a webhook by ID. |
> | `launchdarkly_post_apply_approval_request` | Apply approval request for a feature flag config |
> | `launchdarkly_post_approval_request` | Create an approval request for a feature flag config |
> | `launchdarkly_post_custom_role` | Create a new custom role. |
> | `launchdarkly_post_destination` | Create a new data export destination |
> | `launchdarkly_post_environment` | Create a new environment in a specified project with a given name, key, and swatch color. |
> | `launchdarkly_post_feature_flag` | Creates a new feature flag. |
> | `launchdarkly_post_flag_config_scheduled_changes` | Creates a new scheduled change for a feature flag. |
> | `launchdarkly_post_integration_subscription` | Create a new integration subscription of a given kind. |
> | `launchdarkly_post_members` | Invite new members. |
> | `launchdarkly_post_project` | Create a new project with the given key and name. |
> | `launchdarkly_post_relay_auto_config` | Create a new relay proxy config. |
> | `launchdarkly_post_review_approval_request` | Review approval request for a feature flag config |
> | `launchdarkly_post_token` | Create a new token. |
> | `launchdarkly_post_user_segment` | Creates a new user segment. |
> | `launchdarkly_post_webhook` | Create a webhook. |
> | `launchdarkly_put_flag_setting` | Specifically enable or disable a feature flag for a user based on their key. |
> | `launchdarkly_reset_environment_mobile_key` | Reset an environment's mobile key. |
> | `launchdarkly_reset_environment_sdk_key` | Reset an environment's SDK key with an optional expiry time for the old key. |
> | `launchdarkly_reset_relay_proxy_config` | Reset a relay proxy configuration's secret key with an optional expiry time for the old key. |
> | `launchdarkly_reset_token` | Reset an access token's secret key with an optional expiry time for the old key. |
> | `launchdarkly_update_big_segment_targets` | Update targets included or excluded in a big segment |

## Frequently asked questions

> [accordion] Can an agent copy a flag configuration from one environment to another?
>
> Yes. The `launchdarkly_copy_feature_flag` tool copies a feature flag's configuration from one environment to the same flag in another environment within the same project.

> [accordion] Does the integration support webhook event triggers from LaunchDarkly?
>
> No. The catalog entry lists no webhook events for LaunchDarkly, so Guild cannot trigger an agent run from a LaunchDarkly event at this time.

> [accordion] How do I limit an agent to read-only flag access?
>
> Write a [credential policy](https://docs.guild.ai/platform/credential-policies.md) that allows only operations matching `launchdarkly_get_*` or restricts the `methods` resource to `GET`, then scope that policy to the agent you want to limit.

> [accordion] Can I give one agent a different LaunchDarkly account than the rest of my workspace?
>
> Yes. Connect a dedicated credential on the installed agent's page or scope a credential to that agent alone. Guild resolves dedicated and granted credentials before the workspace or account default, as described in [credentials](https://docs.guild.ai/platform/credentials.md).

## Put a governed agent on LaunchDarkly this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use LaunchDarkly.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect LaunchDarkly to your first agent.

## Related

**Also runs on Guild:** [Azure DevOps](https://docs.guild.ai/integrations/azure-devops.md) · [Bitbucket](https://docs.guild.ai/integrations/bitbucket.md) · [GitHub](https://docs.guild.ai/integrations/github.md) · [GitLab](https://docs.guild.ai/integrations/gitlab-openapi.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
