Agents in AI Configs

Overview

This topic explains how to create and use agent-based AI Configs to support multi-step AI workflows with shared tools and real-time observability.

Use agent-based AI Configs to define, monitor, and adapt structured model workflows in real time. Agents help teams standardize complex logic, reuse tool definitions, and track performance across environments and projects.

Agents expand the capabilities of AI Configs by supporting multi-step, tool-driven workflows. Instead of responding to a single prompt, an agent guides a model through a structured plan and selects tools to complete each step. Agents use tools from a shared library that you define at the project level and attach to each config. This approach promotes consistency across steps, encourages reuse, and lets teams update behavior without redeploying code.

Agent support is designed for teams adopting orchestration patterns that require transparency and control. Agent configs integrate with LaunchDarkly’s monitoring and targeting features, so platform teams can track usage, evaluate performance, and make informed decisions across workflows.

Capabilities and use cases

Agent configs support structured workflows that require tool selection, multi-step orchestration, and real-time monitoring. Each config defines the model’s behavior through a single instructions field and can include a shared set of tools.

You can use agent configs to:

  • Coordinate multi-step large-language model (LLM) workflows by guiding the model through structured plans
  • Monitor inputs, tool usage, latency, cost, and satisfaction across workflows
  • Define tools once and reuse them across multiple configs and projects
  • Update behavior or tool access without redeploying code

Agent configs are useful when teams need to evaluate tool-driven reasoning, compare performance across agents, or standardize orchestration logic in production environments.

Set up an agent config

To create an agent-based AI Config:

  1. In the left navigation, select AI Configs, then click Create AI Config.

  2. Under Create AI Config*, click Agent-based.

  3. Enter a name that describes how your application uses generative AI. For example, “Email summarizer.”

  4. (Optional) Click Edit key to update the config’s key. You use the key to reference the config in your code. LaunchDarkly auto-generates a key from the name, but you can change it.

  5. (Optional) Select a maintainer.

  6. Click Create. LaunchDarkly creates the config and displays the configuration panel.

    The "Create AI Config" dialog.

    The "Create AI Config" dialog.

The configuration panel includes tabs for variations, targeting, and monitoring.

Retrieve agent configs using the SDK

To retrieve agent configurations using the SDK:

1const { agents } = aiClient.agents([
2 "my-agent-key",
3 "backup-agent",
4], context, {}, { parameters });
5
6const primaryAgent = agents["my-agent-key"];
7console.log(primaryAgent.description);

Agent configs include:

1type LDAgent = {
2 model?: LDModelConfig;
3 description: string;
4 instructions: string;
5 provider?: LDProviderConfig;
6 tracker: LDAIConfigTracker;
7 enabled: boolean;
8}

Use the .agents() method to retrieve agent configs. Agent configs are not included in .configs() responses. This separation ensures each agent is resolved with its own model and tool context, which supports safe composition of multi-agent workflows.

Agent config structure and behavior

Agent configs have a different structure than completion-based AI Configs. Each config includes a mode property, which determines which fields are required, how targeting and evaluation work, and which metrics LaunchDarkly collects.

In agent mode, configs require a description and an instructions string. These fields define how the model behaves in response to each request. Agent configs do not use message history or roles.

The following table summarizes the differences between agent and completion modes:

ModeFields required for targeting and evaluationObservability support
completionrole, messagesEvent tracking per message
agentdescription, instructionsInvocation metrics

Agent configs can include tools to support multi-step workflows. Tools are defined at the project level and attached to each config. At runtime, the agent can select tools based on the request context and the instructions you provide.

Agent configs include built-in metrics that track usage and performance:

  • Invocation latency
  • Response cost

To measure additional signals, such as satisfaction, use external instrumentation.

The LaunchDarkly UI displays different fields depending on the selected mode:

  • Completion mode includes fields for prompt history, role, and messages.
  • Agent mode includes fields for description, instructions, and attached tools.

You must select the mode when you create the config. The mode cannot be changed after the config is saved.

Compatibility and rollout

Agent support is available in the TypeScript and Python SDKs.

All existing AI Configs default to completion mode. Adding agent support does not affect existing configurations.