Declarative Agent Definitions Compared by What They Actually Let You Skip
Three declarative formats each take over a different layer of agent harness work.

Agents-as-code means defining AI coding agents in version-controlled configuration files. GitHub Agentic Workflows, CrewAI-style YAML, and managed API contracts remove different burdens, from CI wiring to inter-agent coordination to deployment infrastructure. The practical choice depends on what a team needs to stop owning, but none of these formats makes a reviewed definition equivalent to a governed production runtime.
Why engineering teams are drowning in agent harness code before their agents do anything useful
The gap between an agent demo and production is infrastructure plumbing. A working prompt and model still need tool registration, an orchestration loop, conversation history, memory storage, packaging, and a deployment pipeline. The team owns that surrounding machinery. In an imperative SDK, even a minimal agent can require model instantiation, tool decoration, memory configuration, MCP client wiring, and conversation manager setup before a single task runs.
That machinery is the agent harness, the code that turns a prompt and a model into something that can act autonomously. Writing it is only the initial expense. When requirements expand to include new tools, secrets, observability, or persistent sessions, each addition extends the harness. Packaging and deploying those connections, then keeping them working, become a large part of the work of running agents in production. Ellipsis, a cloud agent platform that runs Claude Code and Codex on managed infrastructure instead of a bare VM with an API key, takes that burden on.
Declarative definitions respond directly to this accumulation of undifferentiated work. Instead of implementing every connection, the team describes what the agent should do and what it may touch, while a framework or platform supplies the execution machinery. The work moves across an ownership boundary. To compare formats, teams therefore need to start with which connections leave their codebase and which they still have to manage.
How do teams define AI agents as version-controlled config files instead of code?
A declarative agent definition expresses the model, instructions, tools, and configuration in YAML or JSON. The architectural distinction is the starting point. Declarative control specifies a desired result or explicit rule, then narrows execution paths to fit. The configuration describes a bounded task and the capabilities available to complete it.
For agents-as-code, those definitions become repository files that can be diffed, reviewed in a pull request, and tracked in Git. Review applies to behavior as well as syntax. A change to instructions, tool access, or a role’s goal can change what the agent does even when no implementation code changes. Plain-text configuration lets teams see those changes in the review tooling they already use, but seeing a change does not prove it is correct.
Constrained scope can reduce opportunities for misuse, unexpected side effects, and policy drift. It does not make execution safe by default. Rules with gaps, unclear instructions, or too many privileges can still lead to bad outcomes, and a schema cannot tell whether an instruction says what the policy was meant to say. Declarative definitions eliminate particular forms of harness code, while a governance stack remains necessary to enforce and demonstrate acceptable behavior.
GitHub Agentic Workflows: what the YAML-frontmatter contract skips and what it still requires you to wire
GitHub Agentic Workflows place the declarative contract inside a markdown file. YAML frontmatter specifies triggers, permissions, tools, safe output limits, and engine configuration, while the natural-language body describes the task. That split defines the ownership boundary. The structured portion sets when the agent runs and what it can do, but the author still has to describe the task accurately.
At the CI layer, this replaces custom GitHub Actions YAML that invokes a coding agent CLI. Permissions become declarations. Tools are listed rather than wired into the invocation by the workflow author, and triggers belong to the same contract. Compared with a custom invocation that grants more privileges than the task requires, the format makes task-specific permission boundaries explicit.
Teams still own tool definitions and the meaning of the instructions that use them, even though the workflow format handles their selection and invocation contract. This is a CI-native abstraction.
Outside that boundary, the format does not supply memory, session persistence, or a cross-workflow audit trail. A repository review can establish what the workflow was authorized to request, but it cannot establish everything that happened across executions. That gap remains a runtime and governance concern.
Role-based YAML (CrewAI-style): what crew configuration skips at the orchestration layer and where it pushes complexity
Role-based YAML targets coordination between agents. Frameworks such as CrewAI organize agents into crews whose configuration specifies roles, goals, backstories, and tool assignments. The crew becomes a configuration artifact. This pattern removes the orchestration code that would otherwise assign tasks, pass outputs between agents, and set the order in which they run.
The remaining complexity shifts into the definitions themselves. A goal that is poorly spelled out causes the same problem in YAML as it does in a prompt embedded in Python. The file format cannot repair the intent. A schema validator can check whether a role definition has the required structure, but it cannot establish whether that role and its goal will produce the desired result.
YAML is plain text with a well-defined schema, so teams can inspect changes in a pull request and retain their history in Git without additional instrumentation. The review surface becomes easier to inspect. However, the semantic correctness of a crew still depends on the quality of its roles, goals, and tool assignments.
The promise of defining agents without Python therefore has a boundary. Crew configuration can replace coordination code, while teams still own the tool implementations, their credentials, and the runtime infrastructure. Sandboxing, credential scoping, spend controls, and audit trails also sit outside the crew definition. Role-based YAML takes over a different layer of harness work from the CI-native pattern, without taking over more of every job.
Fully managed declarative runtimes: what a platform API contract (like Amazon Bedrock AgentCore) offloads beyond YAML
Amazon Bedrock AgentCore Harness accepts an agent definition through an API, removing orchestration code, container builds, and deployment pipelines. The component boundary is essential here. The broader AgentCore Runtime still requires a container image, so the Harness promise should not be applied to the entire platform.
AWS describes the Harness contract through CreateHarness to define an agent and InvokeHarness to run it. The platform handles invocation, credentials passed to tools, result passing, session management, and scaling. Teams still own the agent definition itself, including which model to use, the instructions, and the tool list. This removes substantially more infrastructure work than declaring a workflow or a crew.
Passing credentials at invocation time is different from issuing credentials for one session and revoking them when it ends. Teams must verify the scope of the platform’s implementation described by the word “managed. Audit trails, developer-level or time-period spend caps, and demonstrable sandboxing guarantees likewise remain requirements to assess against what the platform exposes.
Teams with hard data-residency requirements may be unable to use a managed runtime if model inputs or execution traces can cross a prohibited boundary. More offloading is not automatically a better fit. The platform contract sets which infrastructure work the team can hand over, while the organization’s requirements set whether it can use the resulting execution environment.
What all three formats leave unaddressed: the governance stack that YAML cannot encode
Sandboxing, guardrails, monitoring, and auditing are separate layers. A configuration can express a policy without enforcing it. The runtime must isolate execution, authorization mechanisms must control what the agent can do, and monitoring must record evidence for auditing. Treating these responsibilities as one capability obscures the gaps between them.
Sandboxing is the most mature layer. MicroVM-backed environments using Kata Containers and Firecracker, and user-space kernel approaches such as gVisor, address runtime isolation. Isolation limits the execution environment rather than deciding whether a particular tool call is justified. Guardrails answer that separate question through pre-action authorization and approval workflows, including policy engines that run evidence grounding checks before execution. Those mechanisms exist, but they are not standard.
Monitoring is growing, yet remains architecturally additive. SDK instrumentation or proxy configuration adds visibility into tool calls, diffs, and token usage on top of an existing agent system. Auditing depends on that recorded activity. A system can have 50 or more automation scripts without an audit trail, a rollback surface, or a way to establish what an agent did at a particular time, regardless of how carefully its definitions were reviewed.
Helio illustrates one approach to filling this gap. The open-source, Apache-2.0 governance proxy operates in front of unmodified agents and MCP servers, applying policy checks, evidence grounding, approval workflows, and cross-tool spend budgets that deplete one shared pot across tools and servers. Those controls feed an audit trail. The example shows how governance can be added outside the definition format. Monitoring links the sandbox to the compliance report, since isolation alone leaves no audit trail showing that the agent followed the rules.
Spend and credentials: the axis declarative formats address least but teams feel most acutely
An agent’s API key, available tools, and readable data determine both its spending capacity and its potential for damage. These are shared governance concerns. Scoped credentials, logs, and approval steps serve finance, security, and compliance because they constrain the same execution and establish who authorized it. Treating them only as operational conveniences understates their role.
A YAML tool list states which tools an agent may call. It does not establish how often they can be called, what those calls may cost, or the scope of the credentials used. Permission is not a spending limit. None of the definition formats reviewed natively provides the full set of enforced session caps, per-developer budgets, and time-period controls that stop execution.
Most declarative formats accept environment variables or secret references, which can supply long-lived credentials that stay valid after a session ends. A reference does not determine credential lifetime. Session-scoped credentials require issuance at session start and revocation on completion, which depends on runtime behavior.
Spend and credentials converge in a session-scoped credential tied to a declared spend cap, with a log attributing each tool call to a person or trigger. Without that connection, reviewing the tool list leaves unanswered how much authority an execution actually received and how its use will be attributed.
What a production-grade agent definition actually looks like when you account for what declarative formats leave out
A production-grade definition combines repository configuration with a runtime that enforces isolation, credential scope, spending limits, and auditability. Each layer has a distinct job. The repository holds the declaration that reviewers can inspect, while the governed runtime supplies the controls and evidence that a file cannot produce.
In that pattern, the config records agent identity and version so audit events can be attributed to a specific definition. It also declares the tool list with scope narrowed to the task’s minimum requirements and trigger conditions that make execution attributable to an event. Budgets belong in the reviewed declaration too. Session, developer, and time-period caps can then be assessed together with the capabilities they constrain.
The runtime must enforce those declarations during execution. Each session needs an isolated environment without shared state, residual credentials, or cross-session contamination, and credentials must be minted fresh and revoked on completion. Tool calls, diffs, and token usage need attributable logs and a tamper-evident audit trail. Spend enforcement must stop execution at the cap. A budget field without that enforcement is only a statement of intent.
For teams already using declarative formats, the practical starting point is incremental. They can add spend declarations to existing configs, route sessions through a sandboxed runtime, and attach a governance proxy for tool-call logging without rewriting agent logic. Teams running Claude Code or Codex on a managed platform that provides these controls can offload the governance infrastructure build as well as the harness. The resulting division is concrete, with a pull request showing what changed and a compliance report showing what ran.


