Architecture 5

Feature flags began as a practical way to separate deployment from release. The AI era is stretching that idea into something much larger.

An AI application does not get its behavior from code alone. Its behavior may also depend on the selected model, the prompt, retrieval settings, inference parameters, tool configuration and agent workflow. Many of those decisions can now change at runtime.

application code
      +
model
      +
prompt
      +
retrieval
      +
parameters
      +
agent configuration
      ↓
observed behavior

That is the opportunity and the concern. Runtime control can make AI systems safer to release and faster to improve. It can also create a path for meaningful production behavior to change without a code review or deployment.

From feature switch to AI behavior control

A conventional release flag might choose between an existing checkout and a new checkout. An AI runtime decision can choose between much less deterministic behaviors.

assistant-model
  90% → model A
  10% → model B

prompt-version
  control → support-v13
  candidate → support-v14

retrieval-mode
  control → keyword
  candidate → hybrid

The mechanism resembles feature management, but the thing being controlled can now affect answer quality, latency, cost, safety and downstream actions at the same time.

Why this is happening now

AI systems need frequent iteration. Models improve, providers change, prompts evolve, evaluation criteria get better and costs move. Requiring a full software deployment for every prompt or model adjustment can make iteration unnecessarily slow.

Feature management and experimentation platforms already know how to solve several pieces of this problem: targeting, variants, gradual rollout, versioning, approvals, metrics and rollback. It is therefore natural that the same platforms are expanding into AI configuration.

The industry is already moving

LaunchDarkly's AgentControl can manage prompts, instructions and model settings outside application code, target variations to selected contexts, run evaluations and observe cost and performance. Harness AI Configs provides structured schemas for prompts, models and parameters with environment values, approvals, audit history and promotion. Statsig is extending experimentation into prompt and model configuration with offline and online evaluation, although its current AI Experimentation documentation marks the capability as Early Access.

These products differ substantially, and some capabilities are still newer than their conventional feature management products. The architectural direction is nevertheless clear: runtime control is expanding into the layer where AI behavior is defined.

The production change path is changing

Traditional software behavior often moves through a familiar path:

code change
   ↓
pull request
   ↓
review
   ↓
tests
   ↓
deployment

AI configuration can introduce another path:

runtime config change
   ↓
new prompt / model / agent behavior
   ↓
production effect

The second path is useful precisely because it is faster. But speed should not accidentally remove the controls that made the first path trustworthy.

Not every AI configuration has the same risk

ChangeTypical concernControl level
UI copy generated by a modelquality and consistencynormal rollout and monitoring
Model versionquality, latency, cost, provider behaviorevaluation, approval and gradual rollout
System promptbehavior, safety, instruction followingversioning, evaluation, approval and rollback
Retrieval configurationevidence quality and data exposureevaluation and observability
Inference parametersquality, variability and costbounded values and monitoring
Agent workflowmulti-step behavior and failure propagationstrong evaluation and approval
Tool permissionsauthority over external systemssecurity and policy enforcement, not flags alone

A feature flag must not become authorization

This boundary becomes critical with agents.

if (flag("agent-can-delete-production")) {
  deleteProductionResource();
}

That is not an adequate security model. A feature flag can participate in whether a capability is offered or gradually exposed, but the actual action still needs identity, authorization, policy and appropriate risk controls.

feature exposure
      ↓
agent requests action
      ↓
identity + authorization
      ↓
policy / risk checks
      ↓
allowed action

Runtime feature management controls availability. Security controls authority.

Evaluations become part of release engineering

Traditional feature rollouts often watch errors and latency. AI changes need additional evidence because an application can remain technically healthy while answer quality deteriorates.

candidate prompt or model
        ↓
offline evaluation
        ↓
limited production exposure
        ↓
quality + safety + latency + cost
        ↓
expand, revise or roll back

Offline evaluations help catch known regressions before exposure. Online evaluations and production metrics help detect behavior that only appears with real users and real data. Neither should be treated as perfect proof. Together they create a stronger feedback loop.

The guardrails are multidimensional

A new model may improve quality while doubling cost. Another may reduce latency while producing worse answers. A prompt may improve one task and degrade another. AI rollout decisions therefore need explicit tradeoffs rather than one generic health score.

quality     ↑
latency     ↓
cost        ↑↑
safety      unchanged

Is this better?

The answer depends on the application and the thresholds established before the rollout.

Reconstructability becomes an architectural requirement

When a customer reports a bad AI result, the organization should be able to answer more than “which application version was deployed?” It may also need to know:

  • which model and provider served the request
  • which prompt or instruction version was active
  • which runtime parameters were resolved
  • which retrieval configuration was used
  • which experiment or flag variation applied
  • which tools the agent was permitted to request

If runtime behavior cannot be reconstructed, debugging, incident response and compliance become much harder.

A practical governance model

Organizations do not need the same process for every AI setting. They do need a risk based model.

proposed AI configuration
        ↓
schema and policy validation
        ↓
offline evaluations
        ↓
approval when risk requires it
        ↓
limited exposure
        ↓
quality + safety + performance + cost
        ↓
expand or roll back

The important principle is that changing AI behavior at runtime is still a production change, even when no application binary changes.

Should we be worried?

We should be attentive, not alarmed. Runtime control can actually make AI systems safer because a bad prompt, model or behavior can be rolled back without waiting for a full deployment. The risk appears when organizations gain that flexibility without adding ownership, evaluation, auditability and security boundaries.

Feature management is therefore becoming part of AI runtime governance. It should complement deployment controls and security controls, not quietly replace them.

Further reading


Feature Flags series

← Feature Flags and Experimentation   From Feature Flags to Runtime Control Planes →