AR-Enabled Catalogs

Agent Format: A Declarative Standard for AI Agents

Ten months ago, three engineering teams at Snap were independently building AI agents. One team used LangChain. Another picked Google ADK. A third wrote custom Python scripts. All three agents did something similar and all three worked well.

But as the number of agents grew, we spotted an opportunity. Each team was solving the same problems in isolation: wiring up tools, implementing retry logic, tracking token budgets, building output parsers. Every new agent meant rebuilding many of the same components. And every platform upgrade — a new model provider, a different tool protocol, a runtime migration — meant touching every agent's code. We were moving fast — but we weren't scaling.

The pattern was familiar. We'd seen the same thing happen with infrastructure before containers, with deployments before CI/CD, with configuration before Infrastructure-as-Code. The agent ecosystem was in its "imperative scripts" era: powerful but fragmented, with every team building bespoke solutions that couldn't be shared, composed, or standardized.

The intuitive solution was clear: let agent developers describe what their agent is, and let the platform figure out how to run it. A clean contract between agent owners and platform owners — so that agent definitions never have to change just because the infrastructure underneath them changed. And the idea behind that contract is inspired by an unlikely source: Kubernetes.

Three Teams, Three Frameworks, One Problem

This is what agent development looks like across the industry today:


Same concept. Three completely incompatible implementations. This isn't just an aesthetic difference — the agent's definition (what it does, what tools it can access, what limits it has) is tangled up with its implementation. You can't extract one without the other.

For a platform team, this creates real pain:

  • No portability — An agent prototyped in a Python notebook can't be deployed to a production Java service without a full rewrite. There's no way to move an agent between runtimes.

  • No shared tooling — Every framework has its own validators, linters, and debugging tools. There's no universal way to inspect, diff, or compare agents.

  • No standardized governance — Guardrails are implemented per framework. The intent is the same, but enforcing a consistent policy means understanding each team's bespoke implementation.

The Kubernetes Moment

The inspiration came from Kubernetes. Before Kubernetes, infrastructure was managed with imperative scripts — "ssh into this box, install nginx, open port 80." It was fragile, non-portable, and difficult to govern at scale. Kubernetes changed everything by introducing a clean separation: declare the desired state, and the system continuously reconciles reality toward it.

We realized agents had the same structural problem. Their cognitive blueprint — tools, constraints, input/output contracts, execution strategy — was trapped inside imperative code. What if we could pull it out into a declarative schema, the same way Kubernetes pulled infrastructure out of shell scripts?

What Goes in the Declaration?

Kubernetes taught us to go declarative. The next question was: what should the declarative artifact actually contain?

Many agent platforms already offer declarative definitions — the most common being the graph model of nodes and edges, which is powerful for expressing complex execution flows with branching, merging, and cycles. However, graph-based definitions can be hard to understand without a visualization tool, especially as agent complexity grows. More fundamentally, graphs emphasize the execution flow — how steps connect — rather than the agent itself.

We wanted to start from a different question: what is an agent?

This question has been studied for decades in the field of decision-making under uncertainty. The established answer is the Partially Observable Markov Decision Process (POMDP) — a mathematical framework for agents that observe partial information, maintain beliefs about their state, take actions, and receive feedback. A POMDP defines the core structure of any agent: its action space (what it can do), its observations (what it can see), its policy (how it decides), and its reward/cost model (what it optimizes for). Every modern agent framework — ReAct loops, sequential pipelines, parallel tool calls — can be understood as a specialization of this model, whether they name it or not.

We used the POMDP formalism as the starting point for our schema design, then extended it with the practical concerns that production agents need: identity, versioning, governance, and approval gates. The result is a schema where each section maps to a well-defined concern:

Concern

.agf.yaml Section

What it Captures

Identity

metadata

Who the agent is, versioning, classification

I/O contract

interface

Observable inputs and expected outputs

Action Space

action_space

Tools, MCP servers, sub-agents the agent can invoke

Execution Strategy

execution_policy

How the agent selects actions (ReAct, sequential, etc.)

Boundaries

constraints

Budgets, limits, governance policies

That's the core idea behind Agent Format — an open, vendor-neutral standard for defining AI agents. Think of it as an Interface Definition Language (IDL) for AI agents: human-readable documentation and machine-readable configuration in one artifact.


The spec is backed by a JSON Schema, so definitions can be expressed as YAML, JSON, stored in a database, or generated programmatically.

Agent Format in Practice

Here's an actual agent we built — an Ads Campaign Performance Analyzer. Notice how everything about this agent is declared, not coded:

Read it top to bottom, and you know everything: who this agent is, what it accepts and returns, which tools it can touch (and only those tools), how it reasons, and how much it's allowed to spend. No source code required.

The format is designed for graduated complexity. A hobby project might use 10 lines — just metadata, a model, and instructions. An enterprise deployment uses 100 — adding governance policies, budget constraints, approval gates, and multi-agent orchestration. You only pay for what you need.

We're strict about what goes into the schema. Every field must pass three questions:

  1. Can it be set at authoring time — without knowing which runtime will execute it?

  2. Is it portable — does it mean the same thing on every runtime?

  3. Does it describe WHAT, not HOW — does it declare a need, not an implementation?


If any answer is no, it belongs in the runtime, not the definition.

Execution Policies

Agent Format defines six built-in execution policies — composable building blocks that cover most real-world patterns:

Policy

Pattern

Use Case

agf.react

Think → Act → Observe loop

Single agent with tools (most common)

agf.sequential

A → B → C pipeline

Researcher → Writer → Reviewer chains

agf.parallel

Fan-out → Merge

Running multiple analyses concurrently

agf.loop

Iterate until condition

Refinement cycles, retry patterns

agf.batch

Map agent over array

Processing 100 campaigns with one definition

agf.conditional

Route based on condition

Language detection, priority triage

Custom Policies

Production systems hit edge cases. Agent Format supports vendor-specific policies via the x-<vendor>.* namespace:

Custom policies are first-class citizens. They go through the same validation and governance layer as built-in policies. The x-myorg. prefix makes it immediately clear this is an extension, and other organizations can define their own without collisions.

From Specification to Running Agent

A specification is only useful if runtimes can execute it. The question is: how do you make LangChain, Google ADK, PydanticAI, and every other framework understand the same .agf.yaml file?

The answer is adapters. Any framework can implement an adapter that parses an .agf.yaml and converts it into its native agent type. The Agent Format parser has zero dependency on any runtime SDK — the adapter is the bridge.

The agent definition stays the same. Only the adapter changes. A team using LangChain doesn't have to switch frameworks — they just add an Agent Format adapter and gain standardized definitions, shared governance, and cross-framework portability.

How We Use It at Snap

Here's how we've applied this at Snap.

At Snap, we use Agent Format in two ways.

First, we use adapters with open-source frameworks. Teams already running agents on Google ADK or LangChain don't have to migrate. They add an Agent Format adapter to their existing framework and immediately get standardized definitions and governance — without changing a line of agent code.

Second, we built the Auton Agentic AI Platform — our own production stack for building, running, and monitoring agents. It has three layers, each independent and composable:

Agent Format is the foundation — the declarative specification that defines what each agent is.

Auton SDK is our own agent-building SDK, powered by a policy-driven runtime. It recognizes .agf.yaml natively — no adapter needed. The SDK handles tool wiring via MCP, model provider connections, and the execution loop. A built-in interceptor pipeline — budget enforcement, guardrails, circuit breaking, retry, and execution tracing — ensures that every agent gets production-grade reliability out of the box.

Agentic Console is our visualization and debugging tool. Load any .agf.yaml, send a prompt, and watch the agent work in real-time — every reasoning step, tool call, and decision as it happens. An interactive execution graph shows the agent's DAG lighting up node by node. A built-in chat interface supports streaming responses and human-in-the-loop approval.

The Console connects through a unified WebSocket protocol, so it isn't tied to the Auton SDK. We've built internal adapters for Google ADK, LangChain, and PydanticAI as well — any team can plug their preferred framework into the same observability layer.

Auton SDK and Agentic Console are internal Snap systems. Only the Agent Format specification is public.

Governance That Scales

We started this blog with three pain points — no portability, no shared tooling, and no standardized governance. The adapter model solves portability. A common schema solves shared tooling. Now let's talk about governance.

When agent definitions are declarative, constraints become part of the definition itself — easy to review, easy to enforce uniformly. The constraints section of an .agf.yaml declares exactly what the agent is allowed to do:

Because these constraints live in a structured, machine-readable file, the runtime can enforce them before the agent acts — not after. This is governance by construction, not by inspection.

The Tighten-Only Invariant

When an orchestrator agent delegates to a sub-agent, the sub-agent cannot exceed the orchestrator's constraints. Ever. Governance boundaries can only become more restrictive as task delegation goes deeper — never more relaxed

This is enforced at multiple levels. At parse time, a sub-agent that declares less restrictive constraints than its orchestrator can fail validation before it ever runs. At runtime, the system automatically applies the stricter of the two constraints — so even if a delegated agent doesn't explicitly declare limits, the orchestrator's boundaries are never exceeded.

Two-Layer Governance

Agent Format separates what the agent owner declares from what the organization requires. Agent owners set base constraints in the .agf.yaml. The organization defines platform-wide governance policies independently. Neither touches the other's config. Any compliant runtime composes both layers at execution time, always taking the stricter of the two.

Constraints are declared in the .agf.yaml and enforced by the runtime — which means auditing what an agent can do is as simple as reading its definition. Because agent capabilities and constraints are structured and machine-readable, teams can automate compliance checks, track capability changes over time in version control, and answer governance questions without reading source code.

Human-in-the-Loop

Requirements for human review can be set within Agent Format. Approval gates are first-class — per-tool, conditional, and composable. For example, consider a hypothetical trading agent:

Small trades go through automatically. Large trades pause for human review. The definition declares what needs approval. The runtime decides how — Slack notification, email, CLI prompt, or a custom UI. Same definition, any delivery mechanism.

Where Agent Format Fits in the Ecosystem

Layer

Standard / Protocol

Purpose

Definition

Agent Format

What the agent is

Communication

A2A Protocol

How agents talk to each other

Tools

MCP

How agents use external tools

MCP standardizes how agents connect to tools. A2A standardizes how agents communicate with each other. Agent Format standardizes the agent itself — its identity, capabilities, constraints, and execution strategy. Together, they form a complete, vendor-neutral stack of standards for production AI agents.

Join the Conversation

Agent Format is our proposed answer to the definition layer — a vendor-neutral way to describe what an agent is, independent of the framework that runs it. We'd love for this specification to grow with input from the broader community.

Check out the full specification, the JSON Schema, and the interactive playground — or join the conversation on GitHub Discussions.

Define once. Run anywhere. Audit by design.