Treating Agent Config Files as First-Class Deployment Artifacts in Engineering Pipelines
Versioned, reviewed, and evaluated agent configs make AI behavior auditable.

Agents-as-code means defining AI agents in YAML configuration files stored in a version control system, with their behavior, permissions, and scope reviewed and versioned like application code. Those files are deployment artifacts. Treating them as first-class artifacts means promoting reviewed configurations through evaluation gates, verifying their integrity before execution, and attributing every run to the version that authorized it.
What it means for an agent config file to be a deployment artifact
A deployment artifact determines what a running system does. An agent configuration meets that definition because it selects the model, supplies instructions, exposes tools, and sets the boundaries within which the agent operates. Changing those declarations changes the deployed system, even when no application source code changes. Pipeline governance follows from that role. It is not an optional analogy between configuration and code.
Stephanie Jarmak’s August 2026 monograph, Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Model, describes the shift from model evaluation to system deployment. Developers increasingly orchestrate long-running agent systems. Reliability therefore depends on the harness, permissions, and execution state around the model. The deployable unit must include that wider system.
In practice, that unit is an agent configuration bundle whose manifest pins the model version, system prompt, tool schemas, retrieval index version, and inference parameters together. The bundle moves through environments as a whole. Promoting individual components separately would break the connection between the configuration evaluated and the configuration deployed. Yet configurations kept in wikis, Notion pages, Slack threads, or pasted directly into agent interfaces often bypass versioning, review, and traceability.
Why ungoverned config behaves like ungoverned code — and fails the same way
An unreviewed permission change alters what an agent is allowed to do. The system prompt guides how the agent behaves, while tool schemas and permission scopes set what it can do and access. Together, they constrain the agent’s blast radius. Widening a scope without review removes a boundary before anyone has explicitly approved that change. That is the same governance failure as deploying an unreviewed code change.
The resulting failures need not look like configuration problems. Jarmak’s monograph documents that many apparent model failures originate in the harness, permissions, or execution state. A seemingly minor configuration change can therefore produce behavior whose cause is misattributed to the model. Without a version history, finding that cause is harder. There is no diff showing whether the model reference, prompt, tool schema, or several components changed.
The AgentS4D benchmark illustrates a related distinction between completion and safety. Across thousands of trials, a substantial share of runs were simultaneously marked complete by the agent and in an unsafe state. Reported success was not evidence of authorized behavior. Reviewed configuration makes the intended boundaries clear and lets people audit them, though version control alone cannot enforce them. Evaluation and runtime controls must test and uphold those boundaries.
The operational consequences are silent behavioral regressions, permission creep, and the absence of a dependable rollback path. When the previous state exists only in conversations or interface settings, restoring it requires reconstruction. Ungoverned configuration changes remove the evidence needed to distinguish an intentional deployment from an accidental one.
How do you define AI agents in YAML for version control and pipeline use?
A production-ready YAML configuration should declare identity, model and inference settings, system instructions, tools, permissions, and resource limits in one version-controlled artifact. That artifact can point to versioned supporting files. Its references must identify the components that belong together. The objective is a reviewable behavioral definition. A reviewer should not have to reconstruct it from unrelated operational records.
An agent’s identity starts with its name and version identifier. The model must be pinned to a specific version rather than “latest,” so a model update creates an explicit configuration change and review cycle. Temperature and context window limits should also be declared. Where retrieval contributes to behavior, the manifest pins the retrieval index version as part of the same bundle. These declarations define what evaluation actually tested.
System instructions belong in the configuration or in a versioned prompt file referenced by it. CLAUDE.md and AGENTS.md illustrate the useful practice of writing project context once so sessions start with it. The configuration supplies the governed pointer to that context. Few-shot examples, where used, also need pinned versions. Otherwise, an apparently unchanged manifest could refer to changed instructions.
Tool declarations must name every permitted tool and its schema. Filesystem access should have read and write allowlists that spell out what is allowed, while network access should name the allowed endpoints and deny everything else by default. Permissions follow the agent’s defined scope. Human approval requirements for deletions, production writes, and deployments belong in the same definition, making irreversible actions visible during review.
Budget constraints complete the artifact’s operating boundaries. Per-session and per-task token or cost limits belong in configuration. An on_exceed policy specifies pause, alert, or abort behavior so overruns have a declared response. Limits need an action attached to them. Together with permissions and model pinning, they make the file a definition of an operating system.
The pipeline stages an agent config file should pass through before it runs in production
The governing process begins with authorship in the repository beside the code the agent governs. Every change produces a diff attributed to a person or trigger, never an anonymous edit. That record gives automated checks and reviewers the same thing to check. It also establishes the candidate version that can later be promoted. A separate wiki or operations runbook is not the deployment source.
Before merge, continuous integration validates the configuration’s structure and policy compliance. Schema checks reject missing required fields, undefined tools, and unpinned model versions. Policy checks flag filesystem or network access beyond the agent’s declared purpose. Budget checks confirm that limits are set and follow the organization’s policy. Valid syntax is only the first gate.
The candidate then runs against a fixed evaluation harness, with explicit thresholds for task completion and policy violations. Microsoft Foundry’s reference architecture establishes this pattern of pre-merge evaluation gates. The harness connects the declared configuration to evidence about its behavior. A configuration that parses successfully can still fail its task or exceed its authorized boundary. A single measure of success should not hide either result.
Peer review examines the same diff and its behavioral intent. Reviewers assess a longer system prompt, a new tool, or a wider permission scope as deployment decisions. They also verify the declared approval requirements for irreversible actions. Automated validation provides evidence for the decision to merge.
After approval, the bundle promotes through development, staging, and production without being re-edited between environments. Production gates use stricter evaluation thresholds because the consequences are higher. A Case-Bundle Operating Model for Coding Agents in OpenFOAM-Based CFD illustrates the separation between preparing an artifact and reusing it. Its Build mode produces a reviewed, reusable bundle, while Replay applies that bundle to new variants.
Versioning also gives the pipeline a defined return path. Foundry’s reference architecture makes rollback a switch of the active agent version pointer to the previous version. The same principle applies to the configuration bundle, with the last known-good version available as a deployment target. Without that versioned target, teams are trying to rediscover a previous behavioral state.
Cryptographic signing and supply-chain integrity for agent config artifacts
Review and evaluation determine which configuration is allowed to run. They do not, by themselves, prove that the runtime received that configuration. A file can be substituted or altered between validation and execution, leaving the approval record intact while changing the deployed behavior. This creates supply-chain risk in the configuration itself. The artifact must stay intact as it moves through the pipeline.
Prompt injection redirects agent behavior through attacker-controlled input data. A poisoned or substituted configuration acts at a higher-privilege boundary because it defines the behavioral envelope before ordinary input arrives. It can replace the instructions or permissions that reviewers approved. The threat therefore concerns the authorization basis of the run. An intact review history is insufficient if the executed artifact differs from the reviewed one.
The remediation is to cryptographically sign pipeline artifacts, including agent code, model references, configuration files, and deployment manifests. The resulting provenance chain should establish origin, creation time, and integrity, with the runtime verifying the signature before executing the configuration. Signing binds execution to the approved artifact. It does not replace the runtime controls that enforce the permissions declared within it.
Microsoft’s agent-governance-toolkit, permissively licensed in 2026, implements a cryptographically chained audit trail and a Decision BOM with control mappings to NIST AI RMF 1.0 and the OWASP Agentic Top 10. Those mechanisms show how to link evidence that an artifact is intact to governance records. A signed artifact still needs sound permissions, valid evaluations, and an execution environment that upholds its declared boundaries.
Audit trails that make every agent run attributable to a config version
Signature verification answers whether the runtime received the approved artifact. A durable run log must then connect the agent’s actions to that artifact’s specific version. Otherwise, an incident record can describe what happened without establishing what was authorized. Attribution completes the governance loop. It connects runtime evidence to the authorship, review, and promotion decisions made before execution.
The essential relationship is between the run, the configuration version, and the approval record. That relationship lets an investigation compare observed actions with the tool scopes, permission boundaries, and approval requirements in force for that run. It also separates a boundary violation from an authorized action with an undesirable result. Those are different failures. To fix those failures, teams need to know which configuration was in force during execution.
Compliance claims require the same precision. SOC 2 Type II record-keeping and NIST AI RMF monitoring obligations make durable governance evidence relevant, but named frameworks do not turn an artifact into proof of compliance by themselves. SR 26-2, the Federal Reserve/OCC/FDIC joint guidance issued 17 April 2026, explicitly excludes agentic systems from its model governance scope. That exclusion should not be recast as an agent-specific traceability requirement. Configuration records and run logs support accountability without erasing distinctions between frameworks.
The audit trail ultimately depends on the quality of configuration versioning. A log that points to a mutable definition cannot reliably establish the permissions or instructions that applied earlier. Keeping a specific version gives the log that missing reference. The record is useful because it resolves to the artifact that governed the run, rather than to whatever configuration happens to be active during the investigation.
What this discipline buys as agent workloads scale across an engineering organization
With pipeline governance, agent workloads can grow without the amount of manual review growing at the same rate. Automated checks handle repeatable validation, while people review changes in behavior and authority. The approved configuration becomes a reusable basis for execution. Oversight moves toward deployment decisions rather than repeated reconstruction of operating intent. This is an operational benefit as well as a safety measure.
Multiple specialized agents each have their own configuration, and downstream agents may trust the output of a misconfigured upstream agent. Its effects can therefore propagate beyond its own task. Applying the same gates to each configuration makes those individual boundaries reviewable. A governed top-level agent does not compensate for ungoverned agents beneath it.
Versioned configurations also make controlled expansion possible. Teams can introduce a new configuration into a small percentage of workflows before full production promotion, using the same canary and blue-green patterns applied to application deployments. The active version remains identifiable throughout that rollout. If the candidate fails, teams can return to the previous configuration without having to recall its settings.
The resulting artifacts also support regulatory alignment without requiring governance evidence to be assembled from scratch. Versioned configurations, signatures, run logs, and approval records give people evidence to use in security and availability reviews. They do not guarantee satisfaction of every applicable requirement. Their value is that engineering operations produce evidence as part of deployment.
The production operating model is consequently explicit. Agents are defined in YAML files in a version control system, reviewed through pull requests, promoted through evaluation gates, and executed in isolated sandboxes with credentials minted and revoked per session. Every run is logged and attributed to its configuration.


