Designing a control plane for AI agents
Separate live agent requests from versioning, evaluation, policy, rollout, identity, evidence, and recovery across the application lifecycle.
An agent gateway can authenticate a model request, apply a rate limit, and record the response. Those are useful controls, but the agent's behavior continues beyond that request. It may retrieve data, call several tools, delegate work, retry after a failure, and change external state.
A control plane addresses that larger lifecycle. It defines which versions may run, what evidence qualifies them, which identities and policies apply, how releases progress, and what happens when reality departs from the approved state. The gateway remains one enforcement and observation point within that system.
Separate the planes before choosing tools
Use architectural responsibilities rather than product names:
| Plane | Primary responsibility | Examples |
|---|---|---|
| Request path | Process one live interaction | API gateway, router, model call, retrieval, tool invocation |
| Execution plane | Run agent and evaluation workloads | Containers, Kubernetes Jobs and Services, queues, storage |
| Control plane | Maintain approved desired state | Versions, policies, qualification results, rollout decisions |
| Evidence plane | Explain actual behavior | Traces, evaluations, state changes, audit records, feedback |
These responsibilities can live in one platform or several integrated services. The important property is that each decision has an owner and a record. Do not assume traffic passed through one proxy: tools may use direct SDKs, initializers can fetch data before the main process starts, and a delegated agent may run in another environment.
Draw the full path for one task. Include the user or service identity, application, router, model providers, retrieval services, tool endpoints, queues, stores, and human approval steps. Mark where an action can be observed, authorized, blocked, retried, and independently verified.
Express approved behavior as desired state
The control plane needs a versioned description of what should be running:
- Application and agent release.
- Prompt, tool schema, retrieval configuration, and routing policy.
- Approved model identifiers and provider locations.
- Evaluation dataset, evaluator, rubric, and release thresholds.
- Allowed tool scopes and required approval checkpoints.
- Resource, latency, cost, retry, and execution budgets.
- Traffic allocation, environment, and rollback target.
Store references to immutable revisions wherever possible. Labels such as production are useful pointers, but the approval record should say which version the label resolved to. Record who or what made the promotion decision and which evidence it used.
Desired state is meaningful only when something reconciles it with actual state. Detect an unapproved prompt, model alias change, missing policy, or stale evaluation. Depending on consequence, the response may alert, stop a rollout, route to a known version, require review, or suspend an action. Define that response before the deviation occurs.
Enforce decisions at the boundary that owns them
A model proxy can limit model traffic, inspect supported request fields, and choose a route. It cannot prove that a ticketing service rejected an unauthorized update or that object storage applied the expected tenant scope. Enforce each invariant at a boundary that can reliably decide it.
| Invariant | Suitable enforcement point |
|---|---|
| Approved model and provider | Router or model gateway, plus release configuration |
| Dataset or document access | Source service, retrieval layer, and workload identity |
| Tool arguments and action limits | Tool service or policy-aware action broker |
| Human approval | Durable workflow state before the side effect |
| Network destination | Cluster or infrastructure networking controls |
| Compute and execution budget | Orchestrator, runtime, and application limits |
Use short-lived, scoped credentials derived from the initiating identity where the architecture supports it. Passing one powerful service credential to every tool erases the distinction between what the user requested and what the agent can technically do.
Record attempted and completed actions separately. A proxy denial, tool rejection, and completed update are different outcomes. Verify important side effects by reading the system of record instead of relying on the agent's final message.
Qualify every behavior-changing version
Code is only one agent dependency. A prompt edit, model update, retrieval-index change, tool schema, routing rule, or evaluator revision can alter behavior. Treat each as a release input.
A qualification workflow should:
- Resolve every input to a version.
- Build or select the execution environment.
- Run deterministic, semantic, safety, and failure-recovery cases.
- Compare task, segment, latency, and cost results with the current release.
- Require the appropriate approval for the change and risk.
- Publish a release manifest and immutable evidence.
- Deploy to a bounded canary and watch predefined rollback signals.
The NIST AI Risk Management Framework is voluntary guidance for incorporating trustworthiness into design, development, use, and evaluation. Translate the framework into concrete owners, gates, records, and responses for the agent rather than treating governance as a document produced after deployment.
Design evidence around decisions
Capture enough context to answer five questions for a task:
- Which identity initiated it, and what authority was delegated?
- Which application, prompt, model, data, router, and policy versions ran?
- Which retrievals, tool calls, handoffs, and state changes occurred?
- Which evaluations and runtime checks passed or failed?
- Which outcome was independently observed?
Use a shared task or trace identifier across services and preserve parent-child or linked relationships. Protect prompt, response, and tool content according to its classification; useful evidence does not require indiscriminate payload capture. The AI agent tracing guide describes the execution fields and privacy choices in more detail.
Evidence also needs measurement provenance. Keep evaluator and rubric versions, sampling policy, exclusions, and human-review status. An evaluation score without those fields cannot reliably support a later release or audit decision.
Use orchestration for lifecycle work
Lifecycle tasks often run outside the interactive request path: building environments, generating datasets, executing evaluations, scanning artifacts, publishing reports, canary analysis, and cleanup. They need queues, dependencies, retries, timeouts, resources, and retained outputs.
Polyaxon can run these steps as containerized Kubernetes workloads. Use DAGs to express dependencies, connections for scoped access to registries and stores, and run artifacts and metrics for qualification evidence. Version prompts using the workflow in prompt versioning for production AI, and connect releases to evaluation runs and traces.
This workflow does not replace application authorization or service-side policy enforcement. It supplies reproducible execution and evidence around those controls. Keep the release manifest explicit about which system owns each decision.
Close the loop without hiding failures
Monitor task outcomes, prohibited actions, tool failures, route changes, cost, latency, human escalations, and data-quality signals by release and task class. Connect an alert to the trace and version manifest that explain it. Availability of the model API alone does not establish that the agent completed the task correctly.
When a production failure appears, preserve the evidence, contain the affected route or action, and reproduce it in a controlled environment. Add a sanitized regression case, update the appropriate prompt, policy, tool, or evaluator, and run qualification again. Do not edit the historical result after the measurement system changes.
Review the control plane itself. Test missing telemetry, unavailable policy services, delayed approvals, partial rollouts, stale model catalogs, broken rollback targets, and loss of artifact storage. Decide whether each failure should stop work or degrade in a bounded way.
The architecture works when a team can move from an observed action to the identity, versions, policy, evaluation, and release decision behind it, then safely produce the next version. A request gateway contributes to that path; lifecycle control makes the path repeatable.