Skip to content

Commit 9e4f73e

Browse files
initcronclaude
andcommitted
docs: Rewrite getting-started with zero-setup examples
- Rewrote getting-started.md with practical zero-setup examples: - Docker health check agent (2 minutes) - Code review fleet (5 minutes, no external repo needed) - Docker troubleshoot flow (5 minutes, no Slack required) - Created new quickstart examples: - docker-health-agent.yaml - git-assistant-agent.yaml - code-review-fleet.yaml (inline agents, broadcast coordination) - docker-troubleshoot-flow.yaml (multi-step pipeline) - Fixed existing examples for spec compliance: - k8s-ops.yaml: v1alpha1 → v1, system_prompt → instructions - code-review-team.yaml: Fleet → AgentFleet, ref → config - hello-world-agent.yaml: Updated to current spec All examples now use: - apiVersion: aof.dev/v1 - google:gemini-2.5-flash model (free Google AI Studio) - Proper field names (instructions, not system_prompt) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 03cb2bd commit 9e4f73e

8 files changed

Lines changed: 581 additions & 239 deletions

docs/getting-started.md

Lines changed: 200 additions & 178 deletions
Large diffs are not rendered by default.

examples/agents/k8s-ops.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# - Helm chart deployments
1818
# - GitOps workflows (ArgoCD, Flux)
1919

20-
apiVersion: aof.dev/v1alpha1
20+
apiVersion: aof.dev/v1
2121
kind: Agent
2222
metadata:
2323
name: k8s-ops
@@ -28,20 +28,15 @@ metadata:
2828
tier: core
2929

3030
spec:
31-
# Using Gemini 2.5 Flash for fast, cost-effective operations
3231
model: google:gemini-2.5-flash
3332
max_tokens: 4096
34-
temperature: 0 # Deterministic for operations
33+
temperature: 0
3534

36-
description: "Kubernetes operations expert for cluster management, troubleshooting, and deployments"
37-
38-
# Available tools
3935
tools:
4036
- kubectl
4137
- helm
4238

43-
# Agent's system prompt
44-
system_prompt: |
39+
instructions: |
4540
You are an expert Kubernetes operations engineer. You help users with:
4641
4742
## Core Capabilities

examples/fleets/code-review-team.yaml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,34 @@
77
# aofctl apply -f fleets/code-review-team.yaml
88
# aofctl run fleet code-review-team "review deployment manifest"
99

10-
apiVersion: aof.dev/v1alpha1
11-
kind: Fleet
10+
apiVersion: aof.dev/v1
11+
kind: AgentFleet
1212
metadata:
1313
name: code-review-team
1414
labels:
1515
category: development
1616
purpose: code-review
1717

1818
spec:
19-
description: "Security scanner + K8s ops for comprehensive code and manifest reviews"
20-
21-
# Reference agents from agents/ directory
2219
agents:
23-
- ref: agents/security.yaml
24-
- ref: agents/k8s-ops.yaml
25-
26-
# Fleet-level coordination
20+
- name: security-reviewer
21+
role: specialist
22+
config: agents/security.yaml
23+
24+
- name: k8s-validator
25+
role: validator
26+
config: agents/k8s-ops.yaml
27+
2728
coordination:
28-
strategy: collaborative
29-
# Security agent reviews first, then K8s agent validates deployment
30-
workflow:
31-
- agent: security
32-
role: lead
33-
tasks:
34-
- scan_code
35-
- check_dependencies
36-
- validate_configs
37-
- agent: k8s-ops
38-
role: validator
39-
tasks:
40-
- validate_manifests
41-
- check_resource_limits
42-
- verify_security_contexts
29+
mode: tiered
30+
distribution: round-robin
31+
tiered:
32+
tiers:
33+
"1":
34+
agents: [security-reviewer]
35+
consensus:
36+
strategy: unanimous
37+
"2":
38+
agents: [k8s-validator]
39+
consensus:
40+
strategy: unanimous
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Code Review Fleet - Zero Setup
2+
#
3+
# A fleet of 2 agents that review code files in parallel:
4+
# 1. Security Reviewer - checks for vulnerabilities
5+
# 2. Quality Reviewer - checks for best practices
6+
#
7+
# Prerequisites:
8+
# - Google AI Studio API key (free): https://aistudio.google.com/apikey
9+
#
10+
# Usage:
11+
# export GOOGLE_API_KEY=AIza...
12+
#
13+
# # Review a single file
14+
# aofctl run fleet code-review-fleet.yaml --input "Review: $(cat main.py)"
15+
#
16+
# # Review with file path context
17+
# aofctl run fleet code-review-fleet.yaml --input "Review src/auth.py: $(cat src/auth.py)"
18+
#
19+
# Try these:
20+
# - Review any Python, JavaScript, Go, or Rust file
21+
# - Paste code directly: aofctl run fleet code-review-fleet.yaml --input "Review: function login(user, pass) { ... }"
22+
#
23+
# The fleet runs both reviewers in PARALLEL and combines their findings.
24+
25+
apiVersion: aof.dev/v1
26+
kind: AgentFleet
27+
metadata:
28+
name: code-review-fleet
29+
labels:
30+
category: quickstart
31+
difficulty: beginner
32+
setup: zero
33+
34+
spec:
35+
agents:
36+
# Security-focused reviewer
37+
- name: security-reviewer
38+
role: specialist
39+
spec:
40+
model: google:gemini-2.5-flash
41+
temperature: 0.1
42+
instructions: |
43+
You are a security code reviewer. Analyze the provided code for:
44+
45+
CRITICAL (must fix):
46+
- SQL injection vulnerabilities
47+
- Command injection
48+
- Hardcoded secrets/passwords
49+
- Authentication bypasses
50+
51+
HIGH (should fix):
52+
- XSS vulnerabilities
53+
- Insecure direct object references
54+
- Missing input validation
55+
- Weak cryptography
56+
57+
MEDIUM (consider fixing):
58+
- Missing rate limiting
59+
- Verbose error messages
60+
- Missing security headers
61+
62+
Format your response as:
63+
## Security Review
64+
65+
### Critical Issues
66+
[List or "None found"]
67+
68+
### High Severity
69+
[List or "None found"]
70+
71+
### Medium Severity
72+
[List or "None found"]
73+
74+
### Summary
75+
[1-2 sentence overall assessment]
76+
77+
# Quality-focused reviewer
78+
- name: quality-reviewer
79+
role: specialist
80+
spec:
81+
model: google:gemini-2.5-flash
82+
temperature: 0.2
83+
instructions: |
84+
You are a code quality reviewer. Analyze the provided code for:
85+
86+
STRUCTURE:
87+
- Function length (should be < 50 lines)
88+
- Nesting depth (should be < 4 levels)
89+
- Code duplication
90+
91+
READABILITY:
92+
- Variable/function naming
93+
- Comments where needed
94+
- Consistent style
95+
96+
ROBUSTNESS:
97+
- Error handling
98+
- Edge case coverage
99+
- Null/undefined checks
100+
101+
Format your response as:
102+
## Quality Review
103+
104+
### Issues Found
105+
[List specific issues with line references if possible]
106+
107+
### Suggestions
108+
[List improvements]
109+
110+
### Score: X/10
111+
[Brief justification]
112+
113+
coordination:
114+
mode: peer
115+
distribution: broadcast
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Docker Health Check Agent
2+
#
3+
# Zero-setup agent that checks Docker container health.
4+
# Works with any local Docker installation.
5+
#
6+
# Prerequisites:
7+
# - Docker installed and running
8+
# - Google AI Studio API key (free): https://aistudio.google.com/apikey
9+
#
10+
# Usage:
11+
# export GOOGLE_API_KEY=AIza...
12+
# aofctl run agent docker-health-agent.yaml --input "check running containers"
13+
#
14+
# Try these prompts:
15+
# - "list all running containers"
16+
# - "show container stats"
17+
# - "check logs for any container that exited recently"
18+
# - "what containers are using the most memory?"
19+
20+
apiVersion: aof.dev/v1
21+
kind: Agent
22+
metadata:
23+
name: docker-health
24+
labels:
25+
category: quickstart
26+
difficulty: beginner
27+
setup: zero
28+
29+
spec:
30+
model: google:gemini-2.5-flash
31+
temperature: 0.1
32+
33+
instructions: |
34+
You are a Docker health checker. You help users understand what's
35+
running in their Docker environment.
36+
37+
Your capabilities:
38+
- List running containers with `docker ps`
39+
- Show container stats with `docker stats --no-stream`
40+
- View container logs with `docker logs <container>`
41+
- Inspect container details with `docker inspect <container>`
42+
43+
Always:
44+
1. Start by showing what containers are running
45+
2. Explain what you find in simple terms
46+
3. Suggest fixes for any issues you spot
47+
48+
Keep responses concise and actionable.
49+
50+
tools:
51+
- docker
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Docker Troubleshooting Flow - Zero Setup
2+
#
3+
# A multi-step workflow that diagnoses Docker container issues:
4+
# 1. Check container status
5+
# 2. Analyze logs if container is unhealthy
6+
# 3. Recommend fixes
7+
#
8+
# Prerequisites:
9+
# - Docker installed and running
10+
# - Google AI Studio API key (free): https://aistudio.google.com/apikey
11+
#
12+
# Usage:
13+
# export GOOGLE_API_KEY=AIza...
14+
#
15+
# # Diagnose all containers
16+
# aofctl run flow docker-troubleshoot-flow.yaml --input "diagnose"
17+
#
18+
# # Diagnose specific container
19+
# aofctl run flow docker-troubleshoot-flow.yaml --input "diagnose container nginx"
20+
#
21+
# This flow demonstrates:
22+
# - Multi-step agent orchestration
23+
# - Sequential node execution
24+
# - Conditional branching (if issues found)
25+
26+
apiVersion: aof.dev/v1
27+
kind: AgentFlow
28+
metadata:
29+
name: docker-troubleshoot-flow
30+
labels:
31+
category: quickstart
32+
difficulty: beginner
33+
setup: zero
34+
35+
spec:
36+
description: "Diagnose Docker container health issues"
37+
38+
nodes:
39+
# Step 1: Check container status
40+
- id: check-status
41+
type: Agent
42+
config:
43+
inline:
44+
name: status-checker
45+
model: google:gemini-2.5-flash
46+
temperature: 0
47+
instructions: |
48+
Run `docker ps -a` to list all containers.
49+
50+
Report:
51+
1. Number of running containers
52+
2. Number of stopped/exited containers
53+
3. Any containers in unhealthy state
54+
55+
If there are stopped containers, list their names and exit codes.
56+
57+
Output format:
58+
RUNNING: [count]
59+
STOPPED: [count]
60+
UNHEALTHY: [list of container names or "none"]
61+
tools:
62+
- docker
63+
64+
# Step 2: Analyze logs for unhealthy containers
65+
- id: analyze-logs
66+
type: Agent
67+
config:
68+
inline:
69+
name: log-analyzer
70+
model: google:gemini-2.5-flash
71+
temperature: 0.1
72+
instructions: |
73+
Based on the container status, analyze logs for any unhealthy
74+
or recently exited containers.
75+
76+
For each problematic container:
77+
1. Run `docker logs --tail 50 <container>`
78+
2. Look for error patterns
79+
3. Identify the root cause
80+
81+
If no problematic containers, confirm all is healthy.
82+
tools:
83+
- docker
84+
85+
# Step 3: Recommend fixes
86+
- id: recommend-fixes
87+
type: Agent
88+
config:
89+
inline:
90+
name: fix-recommender
91+
model: google:gemini-2.5-flash
92+
temperature: 0.3
93+
instructions: |
94+
Based on the log analysis, provide actionable recommendations.
95+
96+
For each issue found:
97+
1. Explain the problem in simple terms
98+
2. Provide the exact command to fix it
99+
3. Explain any risks or considerations
100+
101+
Format:
102+
## Issue: [brief description]
103+
**Cause:** [explanation]
104+
**Fix:** `[exact command]`
105+
**Notes:** [any warnings or tips]
106+
107+
If everything is healthy, confirm and suggest preventive measures.
108+
tools:
109+
- docker
110+
111+
connections:
112+
- from: start
113+
to: check-status
114+
- from: check-status
115+
to: analyze-logs
116+
- from: analyze-logs
117+
to: recommend-fixes

0 commit comments

Comments
 (0)