Agents in AI Configs
Overview
This topic explains how to create and use agent-based AI Configs to support structured, multi-step AI workflows with shared tools and performance monitoring.
Agent-based AI Configs define workflow behavior through a single instructions field that describes how a model should reason and take actions across multiple steps. This structure is useful for tasks that require several reasoning steps or tool calls. The instructions describe the goal of a task and the steps the model should follow.
You can combine agents into workflows where each agent performs a specific role. For example, one agent may analyze a request, another may check the input, and another may retrieve information using tools. Your application coordinates these interactions while LaunchDarkly manages the configuration for each agent.
Agent-based AI Configs use the same configuration model as other AI Configs, including variations, targeting, approvals, and monitoring. LaunchDarkly evaluates agent-based AI Configs differently than prompt-based AI Configs, which affects how LaunchDarkly records and displays metrics.
As a result, using agent-based AI Configs helps you manage workflow behavior safely and update logic without redeploying code. It also lets you observe performance across environments.
Capabilities and use cases
Agent-based AI Configs support workflows that involve multiple reasoning steps and tool calls. Teams use them to define structured behavior, coordinate tool usage, and manage complex workflows through configuration rather than application code. Tools are reusable, versioned resources defined at the project level.
You can use agent-based AI Configs to:
- Guide models through multi-step tasks using structured instructions.
- Use tools to retrieve information or perform actions during the workflow.
- Reuse tools across multiple agents and variations.
- Monitor workflow performance and compare variations.
- Update workflow behavior safely using targeting rules, approvals, and guarded rollouts.
Create and configure an agent
To create an agent-based AI Config:
- In the left navigation, select AI Configs, then click Create AI Config.
- In the “Create AI Config” dialog, click Agent-based.
- Enter a name for the agent. For example, “Email summarizer.”
- (Optional) Click Edit key to update the AI Config’s key. You use the key to reference the AI Config in your code. LaunchDarkly auto-generates a key from the name, but you can change it.
- (Optional) Select a maintainer.
- Click Create. LaunchDarkly creates the AI Config and displays the configuration panel.

Each agent variation includes a description, an instructions field, and optional tools. The instructions define the goal and outline the reasoning steps the model should follow. Tools provide structured capabilities, such as retrieving data or calling an external service, and can be attached to both agent-based and prompt-based variations. To learn more, read Tools in AI Configs.
To attach tools to a variation, open the variation, click Attach tools, then choose from the tools in your library.
Retrieve and use agents in your application
Use the LaunchDarkly Node.js (server-side) AI SDK or Python AI SDK to retrieve agents for a context. Agent-based AI Configs are retrieved separately from prompt-based AI Configs so each agent can resolve its own instructions, model configuration, and tools. This allows you to compose multi-agent workflows where each agent has a distinct role.
These examples assume that you have already initialized the AI client and created a context. To learn how to do this, read Quickstart for AI Configs.
An evaluated agent includes model details, provider information, instructions, attached tools, and a tracker instance for recording metrics.
For example, evaluating an agent may return an object similar to the following. The exact fields included depend on the agent configuration and SDK version.
Your application uses the evaluated instructions and tools to run the workflow. LaunchDarkly provides configuration, not runtime orchestration. You can update any agent variation at any time and apply these changes safely using approvals and guarded rollouts.
Agent configuration structure
Agent-based AI Configs have a different structure than prompt-based AI Configs. Each AI Config includes a mode property that determines which fields are required and how targeting, evaluation, and metrics work in LaunchDarkly.
In agent mode, each variation requires a description and an instructions field. These fields define the task and outline how the model should behave when evaluated. Agent variations do not use message roles or message history. All workflow behavior is defined through the instructions field and any attached tools.
Because agent-based AI Configs are evaluated differently than prompt-based AI Configs, the Monitoring tab displays different metrics for agent-based workflows.
Monitor agent performance
The Monitoring tab displays metrics for each variation of an agent. Metrics include:
- Generations
- Time to generate
- Time to first token
- Token usage
- Costs
- Error rate
- Satisfaction when instrumented
Monitoring helps you assess how workflows behave in production and identify where a variation may need adjustment. To learn more, read Monitor AI Configs.
Target and release agent variations
Use targeting rules to determine which users receive each agent variation. You can release updated workflows gradually, apply segmentation rules, or test alternative workflow strategies.
Guarded rollouts allow you to introduce workflow changes safely while monitoring for regressions. Approvals ensure that changes receive a review before becoming active.
To learn more, read Target with AI Configs.
Compatibility
Agent-based AI Configs are supported in the Node.js (server-side) AI SDK and Python AI SDKs. All existing AI Configs default to prompt-based mode. You cannot change the mode of an AI Config after creation.