Skip to main content

Core Concepts

AOF has three main building blocks: Agents, AgentFleets, and AgentFlows. If you know Kubernetes, these will feel familiar.

Agent

An Agent is a single AI assistant with specific instructions, tools, and model configuration.

Think of it like a Kubernetes Pod - it's the smallest deployable unit.

apiVersion: aof.dev/v1
kind: Agent
metadata:
name: my-agent
spec:
model: openai:gpt-4
instructions: "You are a helpful assistant"
tools:
- type: Shell

When to Use

  • Simple, focused tasks (code review, Q&A)
  • Single-purpose automation
  • Interactive chat sessions
  • Quick prototyping

Key Components

ComponentDescriptionExample
modelLLM to useopenai:gpt-4, anthropic:claude-3-5-sonnet-20241022
instructionsSystem prompt"You are a K8s expert"
toolsWhat the agent can doShell, HTTP, MCP servers
memoryConversation persistenceIn-memory, file, database

AgentFleet

An AgentFleet is a team of agents working together on a shared task.

Think of it like a Kubernetes Deployment - multiple replicas working in parallel.

apiVersion: aof.dev/v1
kind: AgentFleet
metadata:
name: code-review-team
spec:
agents:
- name: security-reviewer
model: openai:gpt-4
instructions: "Focus on security vulnerabilities"

- name: performance-reviewer
model: anthropic:claude-3-5-sonnet-20241022
instructions: "Focus on performance issues"

- name: style-reviewer
model: ollama:llama3
instructions: "Focus on code style and readability"

When to Use

  • Complex tasks requiring multiple perspectives
  • Parallel processing of data
  • Consensus-building (multiple agents vote)
  • Specialized expertise (security + performance + style)

How It Works

  1. You submit a task to the fleet
  2. Each agent processes it independently
  3. Results are aggregated (consensus, summary, or all responses)

AgentFlow

An AgentFlow is a workflow that orchestrates agents, tools, and integrations in a directed acyclic graph (DAG).

Think of it like an n8n workflow or Argo Workflow - visual automation.

apiVersion: aof.dev/v1
kind: AgentFlow
metadata:
name: incident-response
spec:
trigger:
type: Webhook
config:
path: /pagerduty

nodes:
- id: diagnose
type: Agent
config:
agent: diagnostic-agent

- id: notify-slack
type: Slack
config:
channel: "#incidents"

connections:
- from: diagnose
to: notify-slack

When to Use

  • Event-driven automation (webhooks, schedules, file changes)
  • Multi-step workflows with conditional logic
  • Integration with external systems (Slack, PagerDuty, GitHub)
  • Human-in-the-loop approval flows

Node Types

Node TypeDescriptionExample Use Case
AgentRun an AI agentDiagnose incident, write code
FleetRun agent fleetParallel code review
HTTPMake HTTP requestCall external API
ShellExecute commandRun kubectl, git
SlackSend Slack messageNotify team
GitHubGitHub automationCreate PR, add comment
ConditionalIf/else logicRoute based on severity
TransformData transformationFormat output
HumanApprovalWait for approvalCritical actions

Trigger Types

TriggerDescriptionExample
WebhookHTTP endpointPagerDuty, GitHub webhooks
ScheduleCron scheduleDaily reports, health checks
FileWatchFile changesConfig updates
ManualCLI invocationAd-hoc runs
SlackSlack eventsBot mentions
GitHubGitHub eventsPR created, issue opened
PagerDutyPagerDuty eventsIncidents triggered
KafkaKafka messagesEvent streaming

Tools

Tools extend what agents can do. AOF supports three types:

1. Built-in Tools

Pre-configured tools that work out of the box:

  • Shell: Execute terminal commands
  • HTTP: Make HTTP/REST requests
  • FileSystem: Read/write files
tools:
- type: Shell
config:
allowed_commands: ["kubectl", "helm"]

- type: HTTP
config:
base_url: https://api.github.com
headers:
Authorization: "token ${GITHUB_TOKEN}"

2. MCP Servers

Model Context Protocol servers for specialized functionality:

  • kubectl-mcp: Kubernetes operations
  • github-mcp: GitHub API access
  • postgres-mcp: Database queries
tools:
- type: MCP
config:
server: kubectl-mcp
command: ["npx", "-y", "@modelcontextprotocol/server-kubectl"]

3. Custom Integrations

Platform-specific integrations:

  • Slack
  • PagerDuty
  • Jira
  • Datadog
tools:
- type: Slack
config:
token: ${SLACK_BOT_TOKEN}

Models

AOF supports multiple LLM providers. Use the format provider:model:

OpenAI

model: openai:gpt-4
model: openai:gpt-4-turbo
model: openai:gpt-3.5-turbo

Anthropic

model: anthropic:claude-3-5-sonnet-20241022
model: anthropic:claude-3-5-haiku-20241022
model: anthropic:claude-3-opus-20240229

Ollama (Local)

model: ollama:llama3
model: ollama:mistral
model: ollama:codellama

Groq

model: groq:llama-3.1-70b-versatile
model: groq:mixtral-8x7b-32768

Provider Environment Variables

ProviderEnvironment Variable
OpenAIOPENAI_API_KEY
AnthropicANTHROPIC_API_KEY
GroqGROQ_API_KEY
OllamaNone (runs locally)

Memory

Memory lets agents remember conversation context across sessions.

Memory Types

TypeDescriptionUse Case
InMemoryRAM-based (default)Testing, short sessions
FileJSON file storageDevelopment, small scale
SQLiteEmbedded databaseProduction, single instance
PostgreSQLExternal databaseProduction, multi-instance

Example

spec:
memory:
type: SQLite
config:
path: ./agent-memory.db

# OR PostgreSQL for production
memory:
type: PostgreSQL
config:
url: postgres://user:pass@localhost/aof

YAML Structure

All AOF resources follow Kubernetes-style structure:

apiVersion: aof.dev/v1          # API version
kind: Agent # Resource type (Agent, AgentFleet, AgentFlow)

metadata: # Resource metadata
name: my-resource # Unique identifier
labels: # Key-value labels
env: production
team: platform
annotations: # Additional metadata
description: "My agent"

spec: # Resource specification
# Resource-specific configuration

kubectl-Style CLI

AOF's CLI mirrors kubectl for familiarity:

# Apply configuration
aofctl apply -f agent.yaml

# List all agents
aofctl get agents

# Get specific agent
aofctl get agent my-agent

# Describe details
aofctl describe agent my-agent

# View logs
aofctl logs agent my-agent

# Run interactive chat
aofctl run agent my-agent

# Delete resource
aofctl delete agent my-agent

Next Steps

Now that you understand the concepts, try building something:

Quick Comparison

FeatureAgentAgentFleetAgentFlow
Use CaseSingle taskParallel tasksComplex workflows
ComplexitySimpleMediumAdvanced
K8s AnalogPodDeploymentWorkflow/Pipeline
ExampleCode reviewMulti-reviewerIncident response
TriggersManual/CLIManual/CLIWebhooks, schedules

Ready to build?First Agent Tutorial