Agent in Production

Declarative Agent Frameworks Ranked by How Little Runtime Logic Escapes Into Code

Ranks agent frameworks by how much logic stays reviewable in YAML.

· 8 min read
Cover illustration for “Declarative Agent Frameworks Ranked by How Little Runtime Logic Escapes Into Code”
Agent-as-Code Patterns · November 11, 2026 · 8 min read · 1,904 words

Agents-as-code means keeping agent definitions as YAML configuration files in Git and using pull requests and code review to manage changes. Declarative agent frameworks rank most usefully by how much routing, sequencing, and approval logic those files expose without requiring a reviewer to open application code. Google AX anchors the fully declarative end, while Microsoft Agent Framework makes a deliberate split between declarative orchestration and code-first extensions.

Why "how much logic escapes into code" is a more useful procurement signal than a general feature comparison

A routing change or approval gate that requires a code rebuild and redeploy exposes a boundary that feature comparisons often hide. The team may have YAML agent definitions but still need a developer to change the workflow. Configuration alone does not establish declarative control. The useful procurement signal is how much routing, sequencing, and conditional logic escapes into builder chains and private helpers.

General scorecards mix orchestration style, language support, cloud affinity, and ecosystem size. Those characteristics describe a framework, but they do not establish whether security reviewers can inspect its behavior or product owners can propose a handoff change. The Auton Agentic AI Framework paper identifies the underlying tension between rigid hard-coded scripts and opaque frameworks whose internal logic resists inspection, testing, and maintenance. Declarative purity isolates that tension. It is a narrow ranking.

What "declarative purity" actually means for an agent framework, and what logic leakage looks like in practice

A framework is declaratively pure on this axis when its routing decisions, sequencing rules, conditional branches, and approval gates can be read, diffed, and reviewed in configuration without opening application code. Logic leakage is the inverse. It includes routing inside a Python builder chain, branching in a private helper, or an approval requirement documented in a comment but left for a developer to implement. A YAML file containing only names and prompts does not meet this standard.

Three tests make the distinction observable in practice. First, a non-developer, such as a product owner or security reviewer, should be able to read the orchestration and describe the intended behavior. Second, teams should be able to change an approval gate or handoff path with a configuration diff, without a control-flow rebuild and redeploy. Third, operations should have a reviewable artifact to reference when explaining the behavior configured at a given moment.

The Auton paper formalizes a related separation between the Cognitive Blueprint and the Runtime Engine. The blueprint is a declarative, language-agnostic specification of agent identity and capabilities, including tool bindings, memory configuration, and safety constraints in YAML or JSON. The engine supplies the platform-specific execution substrate. These are distinct responsibilities. The ranking turns on how completely a framework keeps orchestration in the specification.

Why declarative purity is not just a developer-convenience preference — it is a governance requirement that is becoming mandatory

Agents complicate the assumption that a task follows a predictable workflow. The same agent doing the same task may take steps in a different order on each run. Prompts can reduce the probability of unwanted behavior while leaving path execution discretionary and reviewers without an explicit account of the decision logic. Reviewable routing and approval rules give governance a firmer basis than instructions whose execution remains discretionary.

Regulatory and security initiatives sharpen that distinction. The EU AI Act’s high-risk provisions take effect in December 2027 for Annex III standalone systems and August 2028 for Annex I embedded products, after the Digital Omnibus pushed back the original August 2026 deadline. The NIST AI Agent Standards Initiative was announced on February 17, 2026. CISA, NSA, ASD’s ACSC, and NCSC partners jointly published “Careful Adoption of Agentic AI Services” in May 2026. These developments do not make YAML itself a compliance requirement, but frameworks with reviewable routing and approval rules have a structurally easier path to producing governance artifacts without reconstructing control logic from logs.

Fully declarative runtime: Google AX (v0.3.1, September 25, 2026)

Google AX establishes the fully declarative benchmark in this comparison. Teams declare a Task, a Workspace, and a Model in YAML, then use ax apply, following the interaction model of Kubernetes resource management. They do not write agent logic inside AX. Its Workspace objects pre-wire Git repositories, MCP servers, and skill packages so agents begin with context already loaded. Version 0.3.1, which came out on September 25, 2026, is open source under the Apache 2.0 license.

Against the three tests, the declaration is the central artifact. A non-developer can read the Task to understand the specified work, a behavior change is a YAML diff and re-apply, and the declared specification is available for review.

That completeness imposes a real limit on customization. A bespoke state machine or non-standard control flow has nowhere to live inside AX’s model. AX ranks highest because orchestration stays within its declarative model. Its strongest governance property is also its principal tradeoff.

Declarative orchestration over code-first agents: Microsoft Agent Framework Declarative Workflows 1.0 (July 23, 2026)

Microsoft Agent Framework Declarative Workflows 1.0 places the boundary differently. Python’s agent-framework-declarative 1.0.0 shipped on July 21, 2026, and was announced on July 23, when the.NET Microsoft.Agents.AI.Workflows.Declarative package was already stable. Both load the same YAML dialect and use the runtime that executes code-first graphs. Declarative orchestration is therefore not a separate execution model. It is a reviewable representation of the workflow model.

The support-router example makes that representation tangible in a screenful of YAML. The declarative layer supports loops, InvokeFunctionTool for local functions, MCP and HTTP tool calls, human-in-the-loop approval pauses, and checkpoint and resume. Power Fx-style formulas operate over System.*, Local.*, Workflow.Inputs.*, Workflow.Outputs.*, and Agent.* scopes. Routing becomes an explicit review surface. A non-developer can read and propose changes to it, while changing an approval gate becomes a YAML diff.

Custom executors, bespoke state machines, and control flow beyond conditions and loops still belong in C# or Python. The YAML provides the reviewable orchestration artifact, but it does not make those extensions declarative. Microsoft’s position is consequently below AX on purity while allowing custom behavior that AX’s model excludes. Teams can see where configuration ends instead of discovering that boundary through accidental leakage.

YAML-configured skill pipelines: AgentForge (arXiv:2601.13383)

AgentForge, documented in arXiv:2601.13383, makes YAML a first-class surface for individual agent specification. Its definitions contain metadata, an LLM backend, and a skill pipeline. The configuration parser validates schema conformance, resolves skill references against a registry, and instantiates the configured agent. Environment variable interpolation avoids hardcoding credentials in definitions. The skill composition mechanism is a directed acyclic graph, with expressiveness proved for arbitrary sequential and parallel task workflows.

That coverage satisfies the rubric within a narrower boundary. A reviewer can inspect which skills fire in which order, and changing pipeline composition is a configuration edit. The YAML is a reviewable agent-definition artifact. But routing between agents falls outside this declarative layer and would have to go in application code. AgentForge therefore declares what an individual agent does, rather than supplying the same multi-agent orchestration coverage as AX or Microsoft’s framework.

This distinction also creates room for a separate control layer. Kestra provides YAML-driven, self-hosted orchestration with native approvals and multi-vendor agent integration through MCP. It manages agent lifecycle, scheduling, human approval gates, and audit trails without dictating how the underlying agents are built. Its scope is the execution envelope. Routing and approvals can be readable in YAML while agents running beneath it still contain code-based logic, making declarative governance possible without replacing an existing framework.

What the Stripe Minions architecture reveals about declarative purity in production at scale

Stripe’s autonomous coding system, Minions, shows why an explicit boundary is more useful than a blanket claim of declarativeness. It produces pull requests at scale, with every pull request human-reviewed but containing zero human-written code. Its blueprints resemble state machines that intermix deterministic and agentic steps. Linters run and changes are pushed through deterministic nodes, while agents implement tasks and fix failing tests. Required steps are structural.

A central Toolshed MCP server contains a large tool library, but each task receives a small, pre-configured subset curated for its agent type. Links in the prompt are scanned to prefetch context through MCP tools before the run. Tool scoping thus constrains the task independently of the model’s choices during execution.

The sandbox provides another enforced boundary around those choices. Agents run without confirmation prompts because the environment is quarantined, limiting mistakes to the blast radius of one devbox. The blueprint also limits attempts through CI. The agent gets one pass through the suite and, after failure, exactly one more attempt to read logs and fix locally. A second failure sends the pull request back to a human, so the rule stops the run.

These mechanisms make the production form of declarative purity concrete. Blueprints, tool scoping, and CI budget rules express the boundary in reviewable, versioned artifacts, while deterministic code enforces required steps. For procurement, that distinction is more revealing than whether a system uses YAML somewhere in its configuration.

The heavily code-first end of the spectrum: CrewAI, LlamaIndex Workflows, and Smolagents

CrewAI, LlamaIndex Workflows, and Smolagents place substantially more orchestration in Python. CrewAI’s role-based multi-agent delegation is well suited to rapid prototyping, but routing lives in Python builder patterns rather than a declarative artifact that non-developers can review. LlamaIndex Workflows uses event-driven control flow and is strong for document-heavy, data-intensive pipelines. Its orchestration is likewise expressed in Python.

Smolagents occupies the most logic-in-code position in this comparison. It is explicitly code-generation-first and has no native approvals, leaving behavior opaque to reviewers who cannot read its Python. Against the shared rubric, all three require code literacy to understand orchestration and code changes to alter approval behavior. None supplies a declarative orchestration artifact for that audit purpose. Code remains reviewable by developers, but that is a different governance surface.

These frameworks serve teams whose immediate needs favor rapid experimentation, particular pipeline structures, or direct control in Python. Teams reach that limit when people outside the team that built the system need access to its routing and approvals. At that point, configuration files elsewhere in the project do not resolve the gap. The relevant behavior still resides in code.

Diagram: Declarative Purity Spectrum: Five Frameworks Ranked. Visualizes: Show five agent frameworks ranked from most to least declarative purity along a single horizontal axis (or vertical stack).

How should teams manage agent YAML in Git as they move to governed production?

The transition from a laptop experiment to governed production changes who must understand and approve behavior. One developer may control an agent in an experiment, while in production several teams run agents in CI, review pull requests, and trigger workflows from Slack or the terminal. Procurement therefore depends on where behavior stops being readable without opening code. Operations, security reviewers, and product owners can participate directly in governing the system where behavior remains readable without opening code.

The practical choice follows from that boundary. Teams that need non-developers to propose or review framework-level routing changes should favor the AX or Microsoft end of the spectrum. Teams that cannot migrate existing code-first agents can use an external layer such as Kestra to govern their execution envelope. For prototypes without governance constraints, code-first frameworks can be faster to start with. Their later migration cost should nevertheless enter the decision before production requirements arrive.

The agents-as-code pattern puts agent configuration in the repository and subjects changes to pull requests and code review, so the specification participates in the same version-control process as other code. Declarative design alone is insufficient. Ad-hoc deployment infrastructure loses much of its governance benefit, just as storing YAML in Git does not expose routing hidden in helpers.

Sources

  1. A Lightweight Modular Framework for Constructing Autonomous Agents Driven by Large Language Models: Design, Implementation, and Applications in AgentForge
  2. The Auton Agentic AI Framework A Declarative Architecture for Specification, Governance, and Runtime Execution of Autonomous Agent Systems

More in Agent-as-Code Patterns