YAML Manifests for AI Agents Everything a Kubernetes Engineer Expects to Find in the File
Agent manifests should declare permissions, limits, and sandboxes, not just prompts.

AI coding agents can be defined as YAML configuration files in version control, reviewed through pull requests, and governed by runtime-enforced policy. This is agents-as-code. A production manifest must declare more than a prompt and model name. It must make permissions, resource limits, execution boundaries, identity, approvals, and observability part of the same reviewable contract.
Why Kubernetes engineers are the right audience for declarative agent configuration
Kubernetes engineers already manage distributed, stateful workloads through version-controlled declarations. Agent configuration presents the same engineering problem when behavior depends on copy-pasted prompts and ad hoc chat instructions. Those instructions are difficult to reproduce, compare, and audit. Moving them into structured files creates a basis for testing, linting, policy enforcement, and review, just as declarative infrastructure replaced changes made through imperative commands.
Both systems need a declared configuration and a runtime that enforces it independently of the workload. A YAML file alone does not provide that enforcement. The familiar entry points are apiVersion, kind, spec, resource limits, RBAC permission scopes, security contexts, workload identity, liveness and readiness checks, and observability configuration.
apiVersion and kind: how agent manifests declare their schema contract
The header establishes which schema governs an object and which runtime path handles it. Microsoft Foundry’s AgentDefinition schema uses kind to distinguish prompt, hosted, and workflow definitions. Its REST API also lists external and voice. That distinction is important when reading examples. Related interfaces can have different contracts, so a definition must fit the schema for that file.
AgentTrust Agent Manifest v0.2, an August 2026 proposed open standard, declares a top-level version of "0.2" and a controlled @context URI. A verifying party uses those declarations to select the schema and reject unsupported versions. This works the same way as API group versioning. Foundry’s azure.yaml adds tooling compatibility through requiredVersions, including azd at ">=1.27.1" and azure.ai.agents at ">=1.0.0-beta.8".
AgentTrust describes a verification contract, while Foundry supplies configuration for its platform. The lesson for teams is schema-pinning discipline. The manifest belongs in the repository, CI should check that it is valid, and a change to the schema version belongs in a reviewed pull request.
spec.model: the container image field, but with harder versioning requirements
A model declaration plays the same role as a container image reference. It names the implementation that runs the workload. The versioning requirement is more demanding, however, because model behavior can change without a tag changing. The agent can therefore give different responses between runs even when its manifest stays the same.
Foundry’s definition schema references a model through an id in its resources array. It does not require separate provider, model_id, version, or deployment_type fields. A model reference is therefore not automatically a complete identity contract. A hash-bound identity differs from a provider-asserted reference, which depends on the versioning guarantees the provider makes. The latter exposes the familiar risk of :latest, namely a change with no configuration diff to review.
Compatibility adds a separate scheduling constraint to identity. The SKILL.md specification uses compatibility to state what environment and agent a skill needs, including which agent versions it works with. The corresponding runtime responsibility is to refuse a skill when the available model cannot meet its requirements.
spec.tools: the RBAC permission scope, expressed as a declared tool surface
A declared tool surface is an allowlist. Its Kubernetes counterpart is an RBAC binding that constrains what a ServiceAccount may do. AgentTrust requires tool bindings to identify the tool, its MCP-native name, its endpoint, its version, and hashes of its schema and description. The endpoint uses a SPIFFE URI. Optional fields add permission_scope and egress_destinations, with an empty egress array permitting no external egress.
The hashes bind the approved tool surface to specific definitions. If a server substitutes a changed schema or description, the hash check fails. Runtime changes require an additional control. MCP servers can push tool-list updates after approval, so the proposal also declares allow_dynamic_registration and a rug_pull_policy. Its policy choices are deny-and-alert, deny-and-hold, and require-reapproval.
Foundry’s uses list addresses a related deployment concern by declaring dependencies such as model projects, connections, and toolboxes. The CLI resolves that graph during provisioning and deployment. Dependency declaration is not identical to permission enforcement. A production contract needs the latter as well, because unrestricted tool access or egress recreates the risk of an overly broad ClusterRole, regardless of how carefully the prompt asks the agent to behave.
resources.limits: token budgets and cost caps as first-class manifest fields
Token budgets play the same role as CPU and memory limits in a pod. They constrain consumption outside the workload’s own decision-making. Agentic workflows use substantially more tokens per task than standard chat interactions, and multi-agent workflows compound that consumption. A budget is an operational circuit breaker. It cannot depend on the agent voluntarily deciding that it has spent enough.
Foundry’s ContainerAgent schema already exposes conventional CPU and memory controls. The legacy format places them in the template’s resources object, while the current format uses container.resources. Token, tool-call, request, and time limits address different parts of the agent’s resource envelope and need their own declarations.
Model-tier routing helps keep work within that envelope by matching the type of task to the cost of the model. Classification, extraction, and filtering can route to lower-cost models, drafting and code generation to mid-tier models, and final review and complex reasoning to frontier models. The gateway enforces the declared routing and budget policy. As with kubelet-enforced limits, the architectural benefit is that the workload cannot override its own constraints.
spec.sandbox: the pod security context and network policy, combined
A sandbox declaration combines the concerns of a pod security context and NetworkPolicy. It governs filesystem access, network egress, process identity, and execution constraints for each run. The boundary must be clear before the run starts. Its supporting fields cover image, user, commands, CPU, memory, time, retained data, artifacts, logs, redaction, and spending limits.
Admission checks turn those declarations into enforceable conditions. The recommended pattern rejects writable mounts outside approved workspace roots, wildcard network rules for unattended runs, root execution, and host Docker socket access. An approval reference is needed for write, publish, and production actions. The agent needs a boundary around its execution even when it is willing to follow instructions.
Task classes provide a practical alternative to one permissive sandbox. “Read and explain” receives read-only source, no network, and no credentials. “Test and patch” receives an isolated writable overlay and package registry proxy, but no deployment credentials. “Pull request” adds a short-lived source-control capability and approval gate. “Data job” instead receives a data-specific mount, no source-control access, and an output bucket with a write-only prefix. Each class binds permissions to the work being authorized.
spec.identity: SPIFFE workload identity for agents, including delegation chains
Authentication establishes that an agent holds a valid credential. Attestation checks whether the instance started with the approved configuration, tools, and policy. That difference becomes decisive during an audit. A credential alone cannot prove which system prompt set the behavior, which model version ran, or which tools were allowed.
AgentTrust uses a SPIFFE URI for the top-level agent_id and for each tool binding’s endpoint_id. Kubernetes teams using SPIRE will recognize the identity model. The proposal also requires a UUID v7 manifest_id, issuance and expiry timestamps, an issuer SPIFFE URI, and a crypto_profile of standard or post-quantum. Its hardware-attestation mechanism seals a signing key to an attestation measurement so that valid signatures can be made only inside the attested environment.
When multiple agents run, workload identity also needs a chain of custody. The delegation_chain array is required when another agent spawns the instance, and an empty array is invalid. When no delegation exists, the field is omitted. This makes delegation explicit rather than treating authority as implicitly inherited from an orchestrator. Without that record, the configuration cannot establish the chain through which the agent received its authority.
livenessProbe and readinessProbe: human-in-the-loop records and approval gates
The structural parallel is a declared checkpoint evaluated by the runtime. Omitting a required checkpoint is a configuration error. The analogy has limits. A human approval record’s parallel with a liveness probe is limited to independent runtime evaluation of a declared condition.
AgentTrust requires a hitl_record whenever a bound policy mandates human-in-the-loop approval. Readiness provides the closer operational comparison. A “Pull request” task is not ready to push merely because it has a source-control capability; its approval gate must also be cleared.
The EU AI Act’s high-risk-system requirements, which apply in December 2027 for Annex III and August 2028 for Annex I, and SOC 2 call for audit trails that go beyond ordinary application logs. The declared contract therefore needs to keep a lasting record of approval. A prompt that asks an agent to check before acting may reduce unwanted actions, but only a gate enforced outside the agent can make it wait for approval.
observability: OpenTelemetry conventions as the agent manifest's logging and tracing spec
Observability belongs in the manifest because the platform must instrument the runtime independently of the agent’s preferences. OpenTelemetry GenAI semantic conventions extend the instrumentation model familiar to Kubernetes teams into agent workloads. The surface includes tool calls, model invocations, thinking tokens, and diffs. Logging is part of the execution contract. It is not simply a dashboard attached after deployment.
The sandbox’s data fields determine retention, artifacts, logs, and redaction. These declarations govern what remains available for investigation and what must be scrubbed before storage. Full observability connects several kinds of evidence. Tool calls are logged with inputs and outputs, model invocations with token counts, diffs with their triggering sessions, and sessions with the manifest versions that defined them.
Those links make the earlier identity and approval declarations useful during an audit. A tool-call record without its governing manifest cannot establish the approved configuration for that action. A diff without its triggering session loses the connection to the authorized work. Every tool call and diff must ultimately be attributable to a person or trigger, just as Kubernetes audit records attribute API calls to a user or ServiceAccount.
How do AI agent definitions in Git become complete production manifests?
Foundry’s azure.yaml shows how cloud-native configuration can live in one file. Services reference model deployments, container resource limits, invocation protocols, environment-variable injection, and dependencies resolved during provisioning and deployment. The file replaces the earlier split between agent.manifest.yaml and agent.yaml. This concrete configuration model leaves support for every governance field described here in one supported schema unestablished. Microsoft also identifies preview features in its references as not recommended for production workloads.
Tool authorization needs identity attestation, budget enforcement needs an execution boundary, and approval records need observable links to actions. Managed infrastructure is a practical choice when it enforces those rules so teams can avoid building a control plane themselves. The deciding criterion is runtime enforcement. A proposed verification standard or a deployment file alone falls short of showing the whole contract.
For a Kubernetes team, the practical starting point is to treat the agent manifest like a Deployment. It lives in version control, goes through pull-request review, is linted in CI, and must pass admission checks before it runs in production. Running Claude Code or Codex on a laptop with a CLAUDE.md file is a prototype of that declarative pattern. Production adds the platform that enforces the reviewed definition on every run.


