Agent in Production

Managing Agent Manifests With the Same Kubectl Discipline You Use for Kubernetes Workloads

Treat agent configuration as reviewed, enforced infrastructure.

· 8 min read
Cover illustration for “Managing Agent Manifests With the Same Kubectl Discipline You Use for Kubernetes Workloads”
Agent-as-Code Patterns · November 9, 2026 · 8 min read · 1,839 words

Agents-as-code means defining AI coding agents in version-controlled YAML files in a repository, with review and validation before their configuration reaches production. The right model is the declarative discipline used for Kubernetes workloads, with permissions and budgets enforced outside the agent and session traces read against the approved manifest. Production agents are infrastructure, so their configuration needs the same controls as other infrastructure.

Why agents running in production are infrastructure, not just scripts

An agent that edits files and runs shell commands is a live workload with side effects. When execution and state persist across sessions, those effects last beyond a single interaction. This changes the unit of operational responsibility. Engineers are managing a delegated workflow. Anthropic’s 2026 trends report describes this shift as engineers who “wrote every line of code” increasingly moving to “orchestrate long-running” agent workflows.

Stephanie Jarmak’s Engineering Reliable Coding Agents argues that coding agents are often tested as models but run as systems. Their reliability depends on the harness, execution state, permissions, and resource allocation around the model. Model capability alone cannot establish operational reliability. If those surrounding controls are unrecorded or unreviewed, the system inherits the same weaknesses as ad-hoc cluster management, including configuration drift and no dependable rollback surface. Version control, review gates, and schema validation therefore belong to the production boundary.

What kubectl discipline actually means and why it became the standard

The transferable discipline is the operating model in which desired state is declared in files, those files live in version control, and changes pass through review. The declaration becomes the source of truth. That replaces imperative management in which engineers connect to nodes and run one-off commands, leaving changes that others cannot reconstruct. The distinction is between an inspectable specification and a history of actions that may never have been recorded.

A manifest describes what the system should be, while a reconciler handles enforcement rather than relying on an engineer to remember commands. Validation with kubectl apply --dry-run and admission webhooks can catch configuration that is malformed or breaks policy before it reaches the cluster. Acceptance is not a substitute for validation.

Review also needs a visible change surface. kubectl diff shows what will change before application, while version-controlled, reviewed changes make the resulting configuration attributable to a commit and a person. Applied to agents, they address unreviewed prompts, unversioned tool permissions, and behavior changes with no configuration diff to explain them.

What agent manifests are and what they must encode

An agent manifest is a declarative, machine-readable artifact that defines an agent’s role, operational rules, workflows, and governance constraints. For agents-as-code, YAML gives configuration a structure that can live in a version-controlled repository and go through the usual review. It is more than a prompt file. CLAUDE.md and AGENTS.md are informal predecessors that can hold project context, operational commands, architecture guidance, and tool policies. Freeform Markdown, however, does not provide the validated schema required for a production control specification.

The manifest must define role and scope, including which tasks the agent may initiate and which repositories or directories it may touch. It must also specify authorized shell commands, APIs, and credential scopes. Budget limits must cover sessions and accounting periods, while autonomy settings define which actions the agent can take on its own and which need approval. Trigger and termination conditions complete the execution contract by declaring when the agent starts and when it must stop.

The Agent Governance Manifest (AGM) pattern formalizes this shared specification as a repository-hosted governance resource available during contribution preparation and maintainer review. Its reference prototype represents the specification in both human-readable Markdown and structured YAML. YAML supports validation and diffing, while Markdown makes the specification tractable for human review. The distinction also supplies a concrete evaluation criterion for declarative agent systems, namely whether configuration expresses enforceable controls rather than merely packaging instructions in a YAML file.

Why the agent's configuration must be stored where the agent cannot reach it

An agent must not be able to change the rules that constrain its execution. The Cloud Security Alliance’s 2026 Agentic AI Autonomy Levels and Control Framework requires this separation to be built into the architecture. The configuration that sets autonomy, boundaries, and control parameters must be stored and enforced at a layer the agent’s execution context cannot reach. A review gate offers little protection if the running workload can subsequently rewrite its own authority.

The repository provides the specification that contributors and maintainers can inspect, while the enforcement boundary prevents the agent from modifying its effective controls. This follows the Kubernetes separation between a workload and the layer governing its resource limits and security context. Jarmak’s monograph explains why that separation deserves attention by locating many apparent model failures in surrounding systems, including permissions, execution state, and resource allocation.

Microsoft’s open-sourced Agent OS shows how enforcement at the action boundary works by intercepting agent actions before they run. It supports YAML rules, OPA Rego, and Cedar policy languages, with plugin signing using Ed25519 and manifest verification addressing supply-chain risks. Singapore’s IMDA Model AI Governance Framework for Agentic AI also calls for agent-level identity management so behavior can be tracked and agents can be held accountable. An authoritative, externally enforced manifest gives that identity a defined scope of permitted behavior.

How to store agent manifests in Git for normal code review

Changes to an agent manifest should go into the repository through the same pull-request process as changes to an application. Human reviewers inspect the YAML, schema checks validate it before merge, and approval gates authorize its adoption as the accepted configuration. This creates an attributable history of authority changes. The AGM pattern preserves maintainer authority by making the same governance specification available during both agent contribution preparation and human review. Neither side should be working from a separate account of what the agent is permitted to do.

The review performs the same cognitive work as reviewing a Kubernetes workload manifest. Reviewers compare declared state with intended behavior, examine resource limits, and check that permissions are properly scoped. Syntax is only the first gate. A schema can reject malformed configuration, but human review must assess whether a valid declaration authorizes the right work. A change to an agent’s autonomy level is consequently a production configuration change, even when no application code changes with it.

The objection that YAML adds friction misidentifies the source of that friction. Review is the deliberate constraint, and the file makes its subject visible. Without it, configuration can drift away from the team’s understanding of the running agent. In a multi-agent system, each coordinator and specialist manifest must be independently versioned and reviewable because changing one agent’s permissions changes the system’s authority. The configuration history must make that change inspectable without requiring reviewers to reconstruct it from agent behavior.

Budget caps and cost enforcement belong in the manifest, not the dashboard

Cost monitoring shows what a run has already spent. An alert can draw attention to rising usage, but it cannot prevent the calls that produced that usage. Enforcement acts before the next API call. Its purpose is to terminate or constrain execution before a declared budget limit is breached. That makes cost control a configuration problem with a runtime enforcement requirement.

Agentic workflows use far more tokens per task than standard chat interactions, and coordinating work across agents adds to that use. Uber’s rollout of Claude Code shows the enterprise consequence of that difference. After adoption across a large engineering organisation, usage escalated until the company exhausted its entire 2026 AI budget in just four months, by April 2026. A budget dashboard may expose that gap, but the architecture must control continued spending through it.

The corresponding control is a gateway that enforces manifest-defined budgets independently of the agent framework. Constraints can include per-request limits, rolling session budgets, per-key monthly caps, model-tier routing, and circuit breakers. The agent must not be able to bypass them. As with Kubernetes resource quotas, the declared allocation constrains what the workload can consume.

Multi-agent workflows also require a declared method of cost attribution. A coordinator that invokes specialists must surface their combined cost, using correlation IDs propagated through the workflow. Cost attribution belongs in manifest design because it defines the accounting boundary for the delegated task’s total usage against which enforcement operates. The dashboard can present that account, but it cannot supply a missing definition of which work belongs together.

Observability of agent runs as the equivalent of kubectl describe and pod logs

A declaration becomes operationally useful when actual behavior can be compared with it. Agent observability must therefore expose tool calls, file diffs, and decisions well enough to test whether execution stayed within the approved scope. Completion alone does not establish compliant behavior. An agent can produce an output without that output explaining which permissions it exercised or which approval gates applied. The trace supplies the evidence needed to evaluate the execution.

Jarmak’s monograph treats each agent run as a trace with spans for retrieval, inference, tool calls, retries, and approvals. This is the structure of a distributed-system trace applied to a delegated workflow. A sandbox does not automatically provide that evidence. Instrumentation must make it possible to determine which process read a secret, which subprocess opened a network connection, and whether sandbox policy matched approved intent.

The Kubernetes parallel is kubectl describe pod and pod logs, which expose whether a workload is behaving as declared. Agent session traces should serve that same operational purpose. The goal is verification throughout normal operation. Reviewers need to relate observed actions to the permissions, budgets, and approval requirements that governed execution, rather than to whatever configuration happens to be current afterward. A trace is only meaningful when it can be read against the manifest in effect when that session ran.

Putting the full discipline into practice: manifest, review, enforce, observe

Manifest, review, enforce, and observe form a cycle. A team adopting this model declares configuration as versioned YAML, submits changes through review and validation, enforces approved constraints outside the agent, and reads session traces against that declaration. Each stage gives the next its authority. Reviewers can assess permissions only if they are in the specification, and enforcement needs a budget that is defined as a limit on spending. Observation then supplies the evidence for judging whether the approved configuration governed the work.

Ke Xiao et al.’s CFD agent study shows a similar way of working with a reviewed case bundle. Build mode lets agents help with development under engineering review, while Replay mode uses a reviewed case for new variants. The reviewed configuration becomes the reusable engineering asset. This shifts attention from repeating an informal interaction to reusing a bounded, inspectable specification.

The adoption decision is consequently about operational seriousness. Teams already know how to review a permission change, reject a declaration that is invalid, enforce a resource allocation, and check a running workload against its specification. Those habits have an established operational home in infrastructure. Applying them to agents makes delegated execution subject to the same authority and evidence requirements as other production systems.

Sources

  1. Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Model
  2. A Case-Bundle Operating Model for Coding Agents in OpenFOAM-Based CFD
  3. Agentic AI Autonomy Levels and Control Framework

More in Agent-as-Code Patterns