Minimal Agent
The smallest valid Agent Format definition. This is a good starting point for understanding the required fields.
schema_version: "1.0.0"
metadata:
id: "hello-agent"
name: "Hello Agent"
version: "1.0.0"
description: "A minimal agent that answers questions"
interface:
input:
type: object
properties:
query:
type: string
description: "The user's input"
required: [query]
output:
type: object
properties:
response:
type: string
description: "The agent's response"
required: [response]
execution_policy:
id: agf.react
config:
instructions: "You are a helpful assistant. Answer the user's question concisely."
model: "gemini-2.0-flash"
Walkthrough
schema_version
Every .agf.yaml file starts with schema_version. This tells parsers and runtimes which version of the Agent Format specification the file conforms to.
metadata
Required identification fields:
| Field | Purpose |
|---|---|
id | Machine-readable identifier (must match ^[a-z0-9][a-z0-9_-]*$) |
name | Human-readable display name |
version | SemVer version string |
description | Short description of what the agent does |
interface
Defines the agent's input and output contracts using JSON Schema. Runtimes use this to validate data before passing it to the agent and after receiving results.
execution_policy
Declares how the agent runs. Here we use agf.react — a ReAct (Reasoning + Acting) loop where the LLM can reason and call tools iteratively. The minimal config requires only:
instructions— the system promptmodel— the model identifier
Scaffold It
The agf CLI will be publicly available soon. See the CLI Reference for the command reference. You can validate this example now using the Playground.
agf init --id hello-agent --name "Hello Agent" -f hello-agent.agf.yaml
Validate It
agf validate hello-agent.agf.yaml
# ✓ hello-agent.agf.yaml: valid
agf lint hello-agent.agf.yaml
# ✓ hello-agent.agf.yaml: 0 errors, 0 warnings