Skip to main content
Like AOF? Give us a star!
If you find AOF useful, please star us on GitHub. It helps us reach more developers and grow the community.

AOF Examples

Copy-paste ready YAML configurations for common use cases.

Note: AOF supports running agents with aofctl run agent and fleets with aofctl run fleet. AgentFlow support is planned for future releases.

Quick Start Examples

1. Hello World Agent

File: hello-agent.yaml Use Case: Getting started with AOF

Quick Start:

# Set your API key
export GOOGLE_API_KEY=AIza... # For Gemini
# OR
export OPENAI_API_KEY=sk-... # For OpenAI

# Run the agent
aofctl run agent examples/hello-agent.yaml --input "Hello, what can you do?"

2. Gemini Agent with Tools

File: test-gemini-with-tools.yaml Use Case: Agent with file system and shell access

Features:

  • Shell command execution
  • File reading
  • Directory listing
  • Google Gemini model

Quick Start:

# Set Gemini API key
export GOOGLE_API_KEY=AIza...

# Run agent with tools
aofctl run agent examples/test-gemini-with-tools.yaml --input "List the files in the current directory"

# Check git status
aofctl run agent examples/test-unified-tools.yaml --input "What is the current git status?"

3. Kubernetes Operations Agent

File: kubectl-agent.yaml Use Case: K8s cluster management using kubectl-ai MCP server

Features:

  • kubectl commands via MCP
  • Pod/deployment diagnostics
  • Service health checks

Quick Start:

# Ensure kubectl-ai is installed
# Install: brew install kubectl-ai

# Set your API key
export OPENAI_API_KEY=sk-...

# Run the agent
aofctl run agent examples/kubectl-agent.yaml --input "Show me all pods"

4. Code Review Fleet

File: examples/quickstart/code-review-fleet.yaml Use Case: Multi-agent code review with security and quality reviewers

Features:

  • 2 specialized reviewers running in parallel
  • Peer coordination with result aggregation (not consensus)
  • Collects and merges ALL review findings

Quick Start:

# Set Gemini API key
export GOOGLE_API_KEY=AIza...

# Run fleet with code to review
aofctl run fleet examples/quickstart/code-review-fleet.yaml --input "Review: function login(user, pass) { const query = 'SELECT * FROM users WHERE name=' + user; return db.query(query); }"

5. MCP Tools Agent

File: mcp-tools-agent.yaml Use Case: Agent with MCP filesystem server

Features:

  • Filesystem MCP server for file operations
  • Read, write, list, search files
  • Directory tree exploration

Quick Start:

# Set Gemini API key
export GOOGLE_API_KEY=AIza...

# Run with filesystem MCP
aofctl run agent examples/mcp-tools-agent.yaml --input "List files in the examples directory"

Note: For advanced MCP configurations (multiple servers, SSE/HTTP transports), see examples/mcp-advanced-example.yaml


Built-in Tools

AOF provides several built-in tools that can be used in agent configurations:

ToolDescription
shellExecute shell commands
read_fileRead file contents
list_directoryList directory contents
gitExecute git commands

Example using built-in tools:

apiVersion: aof.dev/v1
kind: Agent
metadata:
name: dev-helper
spec:
model: google:gemini-2.5-flash
instructions: |
You are a helpful DevOps assistant.
tools:
- shell
- read_file
- list_directory
- git

AgentFleet Examples

AgentFleet enables multi-agent coordination for complex tasks. All fleet examples are tested and working.

Available Fleet Examples

FleetDescriptionLocation
code-review-fleetMulti-specialist code review with aggregationexamples/quickstart/code-review-fleet.yaml
code-review-teamMulti-perspective code review (legacy)examples/fleets/code-review-team.yaml
incident-response-teamIncident triage and response coordinationexamples/fleets/incident-response-team.yaml
k8s-rca-teamKubernetes root cause analysisexamples/fleets/k8s-rca-team.yaml
dockerizer-teamContainerize applicationsexamples/fleets/dockerizer-team.yaml
simple-test-fleetBasic fleet for testingexamples/fleets/simple-test-fleet.yaml

Planned Features (AgentFlow)

Coming Soon: AgentFlow will enable workflow orchestration:

  • Incident Response System - Auto-remediation with PagerDuty integration
  • Slack Bot Flow - Conversational assistant with approval workflows
  • Daily Reports - Scheduled operational reports

Example Comparison

Agents

ExampleComplexityStatusPrerequisites
hello-agent⭐ Simple✅ WorkingAPI key
test-gemini-with-tools⭐ Simple✅ WorkingGemini API key
test-tools-agent⭐ Simple✅ WorkingGemini API key
kubectl-agent⭐⭐ Medium✅ Workingkubectl-ai, API key
mcp-tools-agent⭐⭐ Medium✅ WorkingNode.js, API key

Fleets

ExampleComplexityStatusPrerequisites
simple-test-fleet⭐ Simple✅ WorkingGemini API key
code-review-fleet⭐ Simple✅ WorkingGemini API key
code-review-team⭐⭐ Medium✅ WorkingGemini API key
incident-response-team⭐⭐ Medium✅ WorkingGemini API key
k8s-rca-team⭐⭐⭐ Advanced✅ WorkingGemini API key, kubectl
dockerizer-team⭐⭐ Medium✅ WorkingGemini API key

Customization Tips

Change the Model

spec:
model: google:gemini-2.5-flash # Default - fast and capable

# Alternatives:
model: openai:gpt-4o # OpenAI GPT-4o
model: openai:gpt-4o-mini # Cheaper/faster
model: anthropic:claude-3-5-sonnet-20241022 # Claude Sonnet
model: ollama:llama3 # Local (free)

Add Built-in Tools

spec:
tools:
- shell # Execute shell commands
- read_file # Read file contents
- list_directory # List directories
- git # Git operations

Add MCP Servers

spec:
mcp_servers:
# Filesystem MCP server
- name: filesystem
transport: stdio
command: npx
args:
- "-y"
- "@modelcontextprotocol/server-filesystem"
- "/workspace"
timeout_secs: 30

# kubectl-ai MCP server
- name: kubectl-ai
transport: stdio
command: kubectl-ai
args:
- "--mcp-server"
- "--mcp-server-mode=stdio"

Environment Variables

Common variables used across examples:

# LLM Providers
export GOOGLE_API_KEY=AIza... # Google Gemini
export OPENAI_API_KEY=sk-... # OpenAI
export ANTHROPIC_API_KEY=sk-ant-... # Anthropic

# Kubernetes
export KUBECONFIG=~/.kube/config

# GitHub (for GitHub MCP server)
export GITHUB_TOKEN=ghp_...

Add to your ~/.zshrc or ~/.bashrc to persist across sessions.


Testing Examples

Run an Agent

# Run agent with input
aofctl run agent examples/hello-agent.yaml --input "test query"

# Run with JSON output
aofctl run agent examples/hello-agent.yaml --input "test" --output json

List Available Agents

# List agents (from configured directory)
aofctl get agent

Getting Help


Contributing Examples

Have a useful agent configuration? Submit it!

  1. Create your YAML file in examples/
  2. Test it: aofctl run agent your-agent.yaml --input "test"
  3. Add documentation comments in the YAML
  4. Submit a PR with description and usage examples

Ready to build? Start with hello-agent.yaml and add tools from there!