This guide explains how to integrate Strands Agents with LaunchDarkly AgentControl. Using AgentControl configs with Strands lets you manage agent instructions, model configuration, and parameters outside of your application code.
This guide uses AgentControl’s agent mode. Agent mode uses a single instructions string, which maps directly to Strands’ system_prompt. To learn more, read Agents in AgentControl.
If you’re new to AgentControl, start with the Quickstart and return to this guide when you are ready for a Strands-specific example.
To learn more about AgentControl-specific SDKs, read AI SDKs. For Python-specific details, read the Python AI SDK reference.
The Strands TypeScript SDK is a pre-1.0 release candidate and only ships BedrockModel and OpenAIModel. It cannot run Anthropic-backed variations. If you want a single codebase that serves both OpenAI and Anthropic variations, use the Python SDK.
The Node.js example in this guide uses an OpenAI-backed default variation so it works without targeting rules.
To complete this guide, you must have the following prerequisites:
Before you begin, review these key concepts.
Strands provides a minimal, provider-agnostic framework for building tool-using agents. The Agent class accepts a model, a system_prompt, a list of tools, and an optional conversation_manager. It exposes invoke_async to run a single turn. The SlidingWindowConversationManager keeps the last N messages in memory so followup turns automatically reference earlier context without passing a thread or session ID.
Agent mode AgentControl configs use an instructions field instead of a messages array. This single instruction string serves as the system prompt for your agent. Agent mode is ideal for:
agent_config functionThe agent_config function retrieves the AgentControl config variation for a given context. It returns an AIAgentConfig object that includes the customized instructions, model configuration, and a tracker property for recording metrics. Call this function each time you create an agent so LaunchDarkly can evaluate targeting and return the current configuration.
Unlike LangChain, Strands does not currently have a first-party LaunchDarkly provider package. Each Strands model class is provider-specific and uses provider-specific names: AnthropicModel for Anthropic, OpenAIModel for OpenAI, and so on. To serve different providers from a single AgentControl config, dispatch on agent_config.provider.name and construct the matching Strands model class. This guide includes a create_strands_model helper that does this for you.
Install the LaunchDarkly SDKs and Strands packages.
Create an AgentControl config in agent mode to store your agent configuration. This guide creates two variations, one backed by OpenAI and one backed by Anthropic, to show you how Strands dispatches to different providers from the same AgentControl config key.
To create an AgentControl config:
strands-agent.Then, create the first variation:
gpt-5 OpenAI model.max_completion_tokens to 2000.Add a second variation:
claude-sonnet-4 Anthropic model.max_tokens to 2000.
Configure targeting rules to control which users receive which variation. Serve the “GPT-5 agent” variation as the default so the Node.js example runs without changes, and target specific users or segments to the “Claude Sonnet agent” variation.
To create the default rule:

The AgentControl config is enabled by default. After you add the integration code to your application, LaunchDarkly serves the variation you configured to your users.
With the AgentControl config and targeting in place, integrate Strands with the LaunchDarkly AI SDK so your application fetches the current model, instructions, and parameters on every request instead of reading hardcoded values. Because Strands does not currently have a first-party LaunchDarkly provider package, the integration involves mapping the AgentControl config payload to the matching Strands model class yourself.
Complete these steps in order, since each depends on the previous one.
The integration involves these key steps:
@tool decorator (Python) or tool() helper (Node.js).agent_config.provider.name to the matching Strands model class.agent_config() (Python) or aiClient.agentConfig() (Node.js).Agent with a SlidingWindowConversationManager for short-term memory.The following example defines a get_order_status tool that looks up a customer order by its ID. The tool handler returns the order status text your agent will summarize in its reply. In Python, the @tool decorator reads the function’s type hints and docstring to generate the JSON schema Strands passes to the model. In Node.js, the tool() helper takes the name, description, and an explicit Zod input schema.
Build a provider dispatcher. Strands model classes are provider-specific, so read agent_config.provider.name and construct the matching class. LaunchDarkly surfaces attached tools via a flat parameters.tools shape in the variation payload. Drop that key before passing parameters through, because Strands receives tools from the Agent constructor.
Initialize the LaunchDarkly SDK and AI client, fetch the agent config, build the Strands model with create_strands_model (Python) or createStrandsModel (Node.js), and create the agent.
Invoke the agent and track metrics. Each turn is one execution as far as the tracker is concerned: the SDK assigns a fresh runId per create_tracker() or createTracker() call and enforces at-most-once tracking for success, error, tokens, and duration. Build a new tracker inside run_turn and publish it to the module-level _tracker or activeTracker reference so the tool handler defined in step 1 can fire track_tool_call on the same execution.
Strands returns an AgentResult whose metrics.accumulated_usage (Python) or metrics.accumulatedUsage (Node.js) aggregates token counts across every provider call in the turn, including any round trips to call tools. The Python example wraps agent.invoke_async with tracker.track_duration_of and records tokens and success manually. The Node.js example uses tracker.trackMetricsOf with a converter that returns the usage shape the tracker expects.
The fallback argument to agent_config / agentConfig is optional. When omitted, LaunchDarkly returns a disabled config if the flag is off or the SDK is unreachable. Pass an explicit fallback to keep the agent running during outages.
Here is a complete working example that combines all the steps.
View metrics for your AgentControl config in the LaunchDarkly UI.
To monitor results, navigate to your AgentControl config and click the Monitoring tab.
LaunchDarkly displays metrics including:
Use these metrics to compare agent performance across the OpenAI and Anthropic variations, identify cost differences, and make data-driven decisions about which configuration to use for different user segments. To learn more, read Monitor AgentControl configs.
To view aggregated metrics across all your AgentControl configs, navigate to Insights in the left navigation under the AI section. The Insights overview page displays cost, latency, error rate, invocation counts, and model distribution across your organization. To learn more, read about AI insights.

In this guide, you learned how to integrate Strands Agents with LaunchDarkly AgentControl to manage agent configuration outside of your application code.
You can now:
SlidingWindowConversationManagerTo explore additional capabilities, read:
For more AgentControl examples, read the other AgentControl guides in this section.