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.

Choosing the Right Resource

AOF provides a composable architecture with four core concepts. This guide helps you choose the right approach for your use case.

Quick Decision Tree

What do you need to do?
├─ Single-purpose task → Use Agent
├─ Multi-agent coordination → Use Fleet
├─ Multi-step workflow → Use AgentFlow (Flow)
└─ Connect chat platforms → Use Trigger (with command bindings)

The Four Core Concepts

ConceptWhat It IsExample
AgentSingle-purpose specialistk8s-agent, prometheus-agent
FleetTeam of agents for a purposedevops-fleet, rca-fleet
FlowMulti-step workflow with nodesdeploy-flow, incident-flow
TriggerPlatform + command routingslack-prod, telegram-oncall

One way to do it: Build focused agents → Compose into fleets → Define workflows as flows → Connect to chat via triggers.


Option 1: Agent (Single-Purpose)

Best for: Focused tasks, testing, building blocks

When to Use

  • Single tool domain (kubectl, docker, git)
  • Reusable building block
  • Testing a specific capability
  • Simple Q&A interactions

Example

apiVersion: aof.dev/v1alpha1
kind: Agent
metadata:
name: k8s-agent
spec:
model: google:gemini-2.5-flash
tools:
- kubectl
- helm
system_prompt: |
You are a Kubernetes specialist.
Focus ONLY on Kubernetes operations.

CLI Usage

aofctl run agent library/k8s-agent.yaml -i "list pods in production"

Option 2: Fleet (Multi-Agent Team)

Best for: Complex tasks requiring multiple specialists

When to Use

  • Task spans multiple tool domains
  • Need multi-model consensus (RCA)
  • Complex investigation requiring different perspectives
  • Parallel data collection and analysis

Example

apiVersion: aof.dev/v1alpha1
kind: AgentFleet
metadata:
name: devops-fleet
spec:
display:
name: "DevOps"
emoji: "🔧"
agents:
- ref: library/k8s-agent.yaml
- ref: library/docker-agent.yaml
- ref: library/prometheus-agent.yaml
coordination:
mode: hierarchical

CLI Usage

aofctl run fleet fleets/devops-fleet.yaml -i "why are pods crashing?"

Option 3: AgentFlow (Workflow)

Best for: Multi-step processes with approval gates

When to Use

  • Sequential steps (validate → approve → deploy)
  • Conditional branching based on results
  • Human approval gates
  • Complex orchestration

Example

apiVersion: aof.dev/v1
kind: AgentFlow
metadata:
name: deploy-flow
spec:
description: "Deployment with approval"
nodes:
- id: validate
type: Agent
config:
agent: validator-agent
- id: approval
type: HumanApproval
config:
message: "Approve deployment?"
- id: deploy
type: Agent
config:
agent: k8s-agent
connections:
- from: start
to: validate
- from: validate
to: approval
- from: approval
to: deploy
condition: approved

CLI Usage

aofctl run flow flows/deploy-flow.yaml -i "deploy v2.1.0"

Option 4: Trigger (Platform Routing)

Best for: Connecting chat platforms to handlers

When to Use

  • Chat bots (Slack, Telegram, Discord)
  • Webhook integrations (PagerDuty, GitHub)
  • Command routing (/kubectl, /diagnose, /deploy)
  • Platform-specific configuration

Example

apiVersion: aof.dev/v1
kind: Trigger
metadata:
name: slack-production
spec:
type: Slack
config:
bot_token: ${SLACK_BOT_TOKEN}
signing_secret: ${SLACK_SIGNING_SECRET}

commands:
/kubectl:
agent: k8s-agent
description: "Kubernetes operations"
/diagnose:
fleet: rca-fleet
description: "Root cause analysis"
/deploy:
flow: deploy-flow
description: "Deployment workflow"

default_agent: devops

Command Targets

Each command routes to exactly one target:

TargetWhen to UseExample
agentSingle-purpose task/kubectl → k8s-agent
fleetMulti-agent coordination/diagnose → rca-fleet
flowMulti-step workflow/deploy → deploy-flow

Comparison Table

FeatureAgentFleetFlowTrigger
PurposeSingle taskMulti-agentWorkflowPlatform routing
ComplexitySimpleMediumMediumSimple
ReusabilityHighHighMediumPer-platform
Multi-stepNoNoYesRoutes to others
Approval gatesNoNoYesVia flow
Multi-modelNoYesVia fleetVia fleet

Architecture Summary

┌──────────────────────────────────────────────────────────────────────┐
│ Complete Architecture │
├──────────────────────────────────────────────────────────────────────┤
│ │
│ AGENTS FLEETS FLOWS TRIGGERS │
│ (building blocks) (compositions) (workflows) (routing) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌───────────┐ ┌────────────┐ │
│ │ k8s-agent │──▶│devops-fleet │ │deploy-flow│◀─│slack-prod │ │
│ ├─────────────┤ └─────────────┘ └───────────┘ ├────────────┤ │
│ │docker-agent │ │ │ │
│ ├─────────────┤ ┌─────────────┐ │ /deploy │──▶│
│ │ git-agent │──▶│ rca-fleet │◀────────────────│ /diagnose │ │
│ ├─────────────┤ └─────────────┘ │ /kubectl │ │
│ │prometheus │ └────────────┘ │
│ └─────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────┘

Migration Path

Start Simple

# Test a single agent
aofctl run agent library/k8s-agent.yaml -i "list pods"

Add Fleet Composition

# Use a fleet for complex tasks
aofctl run fleet fleets/devops-fleet.yaml -i "diagnose pod crash"

Add Workflows

# Use flows for approval workflows
aofctl run flow flows/deploy-flow.yaml -i "deploy v2.1.0"

Connect to Chat

# Start daemon with triggers
aofctl serve --config daemon.yaml

Summary

ApproachSetup TimeUse Case
Agent2 minSingle tool testing
Fleet10 minMulti-agent tasks
Flow15 minApproval workflows
Trigger5 minChat platform bots

Recommendation: Build focused agents → Compose into fleets → Define workflows as flows → Connect to chat via triggers.


See Also