Agent in Production

YAML-Native Agent Platforms Versus SDK-First Frameworks for Teams Who Live in Pull Requests

YAML config keeps agent policy reviewable in Git; SDKs hide governance in code.

· 8 min read
Cover illustration for “YAML-Native Agent Platforms Versus SDK-First Frameworks for Teams Who Live in Pull Requests”
Agent-as-Code Patterns · October 31, 2026 · 8 min read · 1,772 words

For teams that work through pull requests, agents-as-code means defining AI coding agents as YAML config files in Git so their policy goes through the same review and versioning as code. The strongest production pattern is YAML for model selection, tool permissions, and budgets, with SDK code for orchestration. The choice between YAML-native platforms and SDK-first frameworks is therefore a governance decision.

Why the agent configuration question is actually a governance question

An agent opens a pull request at 2 a.m., but no human knows what permissions it held or what its budget ceiling was. The code diff may be available for review. The gap in reviewable authority separates an agent that can perform useful work from one whose operation a team can govern.

The problem applies to both agent roles inside GitHub pull request workflows. Agents that author code open PRs autonomously, while agents that review code post line-level comments and decisions. Both need rules governing their actions. As teams move from laptop experiments to production, the architectural question is where those rules live, who can inspect them, and whether changing them triggers review.

Which platforms let teams define agents in YAML rather than SDK code?

Haystack, built by Deepset, supports YAML serialization of its pipelines. Haystack’s documentation describes configuration that people can change without going back and forth through Python code, so they can deploy without code changes. Microsoft Agent Framework 1.0, generally available on April 3, 2026, includes declarative YAML agent configuration for version-controlled deployments. Pydantic AI added YAML agent specs with its capability primitive in June 2026.

Microsoft’s framework also belongs to the SDK-first group, in which agents are Python or TypeScript objects wired together explicitly. LangChain, CrewAI, OpenAI Agents SDK, and Mastra offer further examples of that approach. Configuration lives in executable code and need not be kept in a separate data artifact. To understand the policy this produces, a reviewer may have to read how the objects are put together.

A YAML-native approach makes configuration an artifact the repository can own, while an SDK gives developers direct control over agent construction and execution. Even with YAML support, some orchestration features may need a code layer underneath them. The emerging agents-as-code pattern combines the two, keeping model selection, tool allowlists, permission boundaries, and budget limits in Git while leaving orchestration in SDK code.

How PR-native workflows expose the limits of keeping policy in code

The pull request review is the moment of truth. If a reviewer cannot tell from the diff that an agent’s permission boundary changed, the review did not catch the governance change. A change can look like ordinary business logic even when it lets an agent use more tools. Reviewers may approve the code without taking a close look at the authorization decision.

SDK-first projects make that distinction harder when runtime policy is assembled from several places. Constructor arguments, environment variables, and runtime overrides can all contribute to the agent’s operating configuration. The last PR may expose only part of it. A reviewer then has to reconstruct the initialization chain across files and account for settings that are absent from the diff. As those dependencies accumulate, the distance between reviewed intent and runtime policy can grow.

A YAML tool allowlist makes the permission change directly readable. Its advantage is not that YAML can express a rule that code cannot. SDK code can enforce governance rules with a high degree of precision. The advantage is that a separate policy artifact makes the decision visible to someone other than the agent’s original author. That benefit depends on the artifact being authoritative, because a clear diff cannot govern an override that bypasses it.

Cost overruns as the most immediate consequence of policy that lives outside the repo

Configuration drift is visible when an agent spends more than its intended budget. Agentic workflows use far more tokens per task than standard chat interactions, and multi-agent architectures can push that demand beyond what teams first expected. An unchecked loop can run overnight and leave a large bill. By the time a billing alert arrives, the consumption has already happened. Notification after consumption is not preventive budget enforcement.

In SDK-first implementations, developers must add the instrumentation that enforces spending limits. That logic may go through normal code review without platform or finance teams checking it as a governance artifact. A dashboard setting creates a related problem when it sits outside the repository. The code that runs the agent can be approved while the spending policy it follows changes elsewhere. In both cases, the review boundary and the financial boundary are misaligned.

The gateway blocks an API call that exceeds the budget before forwarding it, but it needs a policy it can read before the session starts. YAML blocks can declare per-agent daily limits, per-task limits, alert thresholds, and on-exceed behavior in the repository. Changing an authoritative limit then requires a PR, making the decision attributable and reviewable.

Observability gaps that compound as agentic workloads scale

Cost records cannot show everything an agent did in the course of its work. Agent runs are long, non-deterministic, and nested, so understanding their behavior requires more than a final result. Traces help record what happened during execution. An audit trail answers a different question by preserving evidence of what the agent was authorized to do and what it actually called. The two records serve different purposes.

Traces may be sampled and may expire, while a tool’s administrative audit logs can record changes made inside the tool. A separate signed-log mechanism is needed for a tamper-evident record. MCP server AuditMiddleware writing chained lines to an audit file illustrates that distinction.

Versioned YAML helps recover the authorization side of that history. Git history preserves the declared policy, making it possible to reconstruct what an agent was permitted to do under that configuration. It does not replace the execution record. When authorization instead depends on constructor arguments, deployment-time environment variables, and runtime overrides, reconstructing the effective policy requires more than reading the repository diff.

LangSmith documented EU AI Act evidence generation through an article crosswalk in April 2026. Neither LangSmith nor Langfuse documented ISO 42001 or NIST AI RMF evidence generation as of July 15, 2026. Separately, Microsoft released the Agent Governance Toolkit under the MIT license in April 2026 to provide runtime security governance with deterministic policy enforcement. These address distinct needs, rather than making observability synonymous with auditability.

Where SDK-first frameworks have genuine advantages YAML alone cannot match

SDK code has a genuine advantage in complex orchestration. Conditional branching, retry strategies, and subagent delegation chains can require more precise control than flat configuration provides. LangGraph’s explicit graph model includes production reliability features: checkpoints, time-travel debugging, and per-node timeouts. A flat YAML file needs a code layer underneath it to express the full model.

Production examples give that expressiveness practical weight. Replit built its Agent 3 agent-builder on Mastra, a TypeScript-first framework, with execution in isolated Docker sandboxes. With this implementation, a much larger share of tasks succeeded across daily sessions. That result demonstrates that an SDK-first architecture can support effective production work. Declarative configuration is not a prerequisite for a capable agent system.

Mozilla’s Firefox team offers another example of custom orchestration. Mozilla found and fixed hundreds of security bugs with Claude Mythos Preview and other AI models, using its own harness built on the fuzzing infrastructure it already had. The example shows the value of adapting an agent to an established technical workflow. It supports preserving room for custom code.

The expressiveness argument is therefore real but scoped. It concerns graph structure, retry behavior, branching, and delegation, rather than which models, tools, budgets, or credentials an agent is authorized to use. Those are different decisions.

Why the hybrid model resolves the trade-off for most production teams

Diagram: The Hybrid Model: What Lives in YAML vs. Code. Visualizes: Visualize the split between two categories in the agents-as-code hybrid pattern: what belongs in YAML (model selection, tool allowlists, permission tiers, budget limits, credential…

YAML holds model selection, tool allowlists, permission tiers, budget limits, and credential scopes. Code holds graph structure, retry strategies, subagent delegation, and conditional branching. Both remain subject to review. Reviewers can inspect authorization as data without first tracing the execution logic that consumes it.

This split maps cleanly onto a PR-native workflow. A policy change puts a governance decision up for review, while an orchestration change alters how the agent does its work. When both change together, the PR exposes both kinds of intent. That separation does not eliminate the need for careful review.

Atlassian’s HULA pilot used human-in-the-loop AI coding agents to work on over 600 real-world JIRA issues in production over two months. The example supports the feasibility of keeping humans involved as agent workloads grow. It does not by itself establish YAML as the cause of that outcome.

Managed execution completes the hybrid architecture when it enforces the declared policy. Isolated sandboxes, session-scoped credentials, hard budget caps, and full audit trails turn repository configuration into operational constraints. The YAML file becomes the authoritative record of permitted behavior, while the platform enforces it without developer instrumentation. Without that enforcement, agents-as-code remains a representation of intent.

The checklist for evaluating an agent platform or framework against your PR workflow

Teams weighing an agent platform should test how well it supports governance before testing its expressiveness. Expressiveness gaps can be addressed in orchestration code, while governance gaps compound across deployments and runs. The first test is policy reviewability. Can a reviewer understand the agent’s authority from the PR diff alone, without executing code or consulting runtime settings? A platform that accepts YAML but assembles the decisive permissions elsewhere has not passed that test.

Budget enforcement and credential scoping need equally concrete answers. Does the platform block spending before tokens are consumed, or send an alert afterward? Is the enforcement rule a reviewable repository artifact or a dashboard setting? Credentials deserve the same scrutiny. Are they scoped to the session and revoked on completion, or are long-lived credentials passed into the agent environment?

Does the platform produce a tamper-evident record of authorization and actual tool calls, or only traces that may be sampled and expire? Compliance claims need their own supporting documentation. Does the platform document evidence generation for relevant frameworks, including the EU AI Act, OWASP Top 10 for Agentic Applications, ISO 42001, and NIST AI RMF?

Isolation and configuration versioning complete the evaluation. Does each agent session run in its own isolated environment, or can one agent’s actions affect another because they share infrastructure? Is the operating configuration versioned in Git, or can a UI setting, environment variable, or build-time argument bypass PR review? These answers define the production boundary. Running Claude Code or any SDK on a laptop is a prototype. Running it on governed infrastructure with YAML-declared policy, scoped credentials, and audit trails is production.

More in Agent-as-Code Patterns