Getting Started
Get up and running with Agent Format in 5 minutes. Define an agent in YAML, validate it, and parse it with an SDK.
Create Your First Agent
Create a file called my-agent.agf.yaml:
schema_version: "1.0.0"
metadata:
id: my-agent
name: My Agent
version: "1.0.0"
description: "TODO: describe your agent"
labels:
team: "TODO"
environment: "development"
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: |
TODO: write your agent's instructions.
model: "gemini-2.0-flash"
provider: "google"
max_steps: 10
tool_choice: auto
action_space:
local_tools:
- alias: example_tool
description: "TODO: describe what this tool does"
constraints:
budget:
max_token_usage: 100000
max_duration_seconds: 300
Validate
You can validate your agent definition using the interactive playground in your browser.
info
The agf CLI will be publicly available soon. See the CLI Reference for the command reference.
Parse with an SDK
info
SDKs for Go, Python, Java, and TypeScript will be publicly available soon. The examples below show the planned API.
- Python
- Go
- Java
- TypeScript
from agent_format import AgentFormatParser
definition = AgentFormatParser.parse("my-agent.agf.yaml")
print(definition.metadata.name) # "My Agent"
print(definition.execution_policy.id) # "agf.react"
print(definition.execution_policy.config) # ReactConfig(...)
parser := agentformat.NewParser()
def, err := parser.Parse("my-agent.agf.yaml")
if err != nil {
log.Fatal(err)
}
fmt.Println(def.Metadata.Name) // "My Agent"
fmt.Println(def.ExecutionPolicy.ID) // "agf.react"
var parser = new AgentFormatParser();
var def = parser.parse(Path.of("my-agent.agf.yaml"));
System.out.println(def.metadata().name()); // "My Agent"
System.out.println(def.executionPolicy().id()); // "agf.react"
import { AgentFormatParser } from '@agent-format/core';
const parser = new AgentFormatParser();
const def = await parser.parse('my-agent.agf.yaml');
console.log(def.metadata.name); // "My Agent"
console.log(def.executionPolicy.id); // "agf.react"
What's Next?
- What is Agent Format? — Understand the vision and ecosystem
- Design Principles — The WHAT vs HOW principle
- Field Reference — Every schema field documented
- Examples — Real-world agent definitions at increasing complexity
- Playground — Validate YAML in your browser