This topic explains how to use AgentControl config targeting to control which contexts receive a particular variation of a config. Targeting is enabled by default for all configs. You can turn targeting off to serve the off variation to all contexts.
Targeting applies to all configs. Completion mode and agent mode use the same targeting rules and evaluation model.
LaunchDarkly contexts are data objects that represent users, devices, organizations, and other entities that interact with your application. Contexts include context attributes that describe what you know about each context, such as name, location, device type, or organization. LaunchDarkly AI SDKs can send context attributes to LaunchDarkly, where you can use them for AgentControl config targeting and in config variation messages.
AgentControl config targeting uses the same targeting concepts as LaunchDarkly flag targeting. You can target individuals, segments, or contexts with custom rules.
AgentControl config targeting follows the same evaluation model as feature flags. For details on evaluation order, read Feature flag hierarchy.
Every config includes a default rule and an off variation. Targeting rules are specific to each environment. You can update targeting rules if your role includes the updateAIConfigTargeting action.
You can target specific contexts based on their context key. For targeting more than one or two contexts, use a segment, which can be reused across configs and flags.
Individual targeting supports targeting specific context keys. For precedence-based or multi-context targeting, use custom rules or segments.
When you use individual targeting, LaunchDarkly evaluates each individual target independently against the full context. If a context matches more than one individual target, the served variation is determined by evaluation order, not by the order shown in the targeting UI.
Individual targeting does not support precedence or combined logic across multiple context kinds. For multi-context targeting or precedence-based logic, use custom rules or segments.
To target individuals:
Contexts that LaunchDarkly has evaluated within the last 30 days are indicated by a solid green icon.
Segments are lists of contexts that you can use to manage AgentControl config targeting behavior in bulk. You can target segments to release specific config variations to different groups of contexts or end users at once.
We recommend using a segment when you want to target the same group of contexts in multiple configs. You can target the segment in each config, rather than recreating a targeting rule or set of rules for many configs.
To target segments:
Here is an example of a targeting rule for segments:

To reference this rule when working with other members of your organization, click the three-dot overflow menu and choose Copy link to rule.
To learn more, read Segments.
You can create custom targeting rules using any context kinds and any context attributes.
Custom rules provide the most control over targeting behavior and support precedence and targeting across multiple context kinds.
To create a custom targeting rule:
If a targeting rule references any context kinds or attributes with null values, or that do not exist for a given context, then the config skips that rule. For example, in a rule that checks “region is one of Canada,” any context whose region attribute is not set or is set to null does not match the rule. Similarly, in a rule that checks “region is not one of Canada,” any context whose region attribute is not set or is set to null does not match the rule. This behavior ensures that your rules only target contexts for which you explicitly have attribute information.
To reference this rule when working with other members of your organization, click the three-dot overflow menu and choose Copy link to rule.
To learn more about how to construct targeting rules, read About targeting rules. Although that topic applies specifically to feature flag targeting, the “About targeting rules” section discusses the components of targeting rules, including their descriptions, conditions, rollouts, attributes, and operators. These elements are common to both feature flags and AgentControl.
Each config automatically includes a default rule. It describes which config variation should be served to contexts that don’t match any of the previous targeting rules on the config.
The default rule is different from the fallback value, which is set in your application’s code and is the value that contexts receive if your application cannot connect to LaunchDarkly. To learn more, read Fallback value.
The default rule is also different from the off variation, which is the value LaunchDarkly serves when the flag is off. To learn more, read The off variation, below.
To set the default rule:
Here is an image of a default rule:

When you update which variation a config serves, you can use a guarded rollout to gradually serve the new variation while monitoring key metrics for regressions.
Guarded rollouts help reduce risk when updating prompts, models, or other AI-powered behavior. If LaunchDarkly detects a regression, it can pause the release or restore the previous variation automatically. This helps you detect problems early and avoid serving broken or degraded AI responses.
To use a guarded rollout, open the Targeting tab, make a variation update, and select Guarded rollout when reviewing your changes. You can monitor release progress and metric results from the Monitoring tab.
Targeting changes to a config may require approval before they can be applied. When approvals are required in an environment, the Review and save button changes to Request approval. The requested change will not take effect until a reviewer approves and applies it.
For information about configuring approvals, read Configuring approvals for an environment.
Each config has a special “disabled” variation, which is created automatically. It is served when the config is toggled off.