Agent of Empires
by @njbrake
Manage AI coding agent sessions via Agent of Empires (aoe)
clawhub install aoeπ About This Skill
name: aoe description: Manage AI coding agent sessions via Agent of Empires (aoe) metadata: openclaw: requires: bins: - aoe - tmux homepage: https://github.com/njbrake/agent-of-empires
Agent of Empires (aoe) Skill
Use aoe to create, manage, and monitor AI coding agent sessions (Claude Code, Codex, OpenCode, etc.) in tmux. Prefer aoe over raw tmux commands for agent management.
When to use this skill
Do NOT use this skill for general tmux window/pane management unrelated to coding agents.
Core concepts
claude), and project path./, e.g. backend/api).-p globally or set AGENT_OF_EMPIRES_PROFILE.running, waiting, idle, stopped, error, starting, unknown.Command reference
Adding sessions
# Add a session for the current directory
aoe add . -t "my feature"Add with group, launch immediately
aoe add /path/to/repo -t "API work" -g backend -lAdd with specific tool
aoe add . -t "codex session" -c codexAdd in a git worktree (parallel branch)
aoe add . -t "fix-123" -w fix/issue-123 -lAdd in Docker sandbox
aoe add . -t "sandboxed" -s -lAdd as sub-session of another
aoe add . -t "sub task" -P Enable YOLO mode (skip permission prompts)
aoe add . -t "yolo" -y -l
Listing sessions
# Human-readable list
aoe listJSON output for parsing
aoe list --jsonList across all profiles
aoe list --all
JSON output shape (aoe list --json):
[
{
"id": "a1b2c3d4-...",
"title": "my feature",
"project_path": "/home/user/project",
"group_path": "backend",
"tool": "claude",
"status": "running",
"profile": "default"
}
]
Session lifecycle
aoe session start
aoe session stop
aoe session restart
aoe session attach # interactive attach
Inspecting sessions
# Show session metadata
aoe session show --jsonCapture tmux pane content (key for monitoring)
aoe session capture --json
aoe session capture -n 100 --strip-ansi
aoe session capture # plain text, good for pipingQuick status summary
aoe status --json
aoe status -q # just the waiting count (for scripting)
JSON output shape (aoe session capture --json):
{
"id": "a1b2c3d4-...",
"title": "my feature",
"status": "waiting",
"tool": "claude",
"content": "... pane text ...",
"lines": 50
}
JSON output shape (aoe session show --json):
{
"id": "a1b2c3d4-...",
"title": "my feature",
"path": "/home/user/project",
"group": "backend",
"tool": "claude",
"command": "claude",
"status": "running",
"profile": "default"
}
JSON output shape (aoe status --json):
{
"total": 5,
"running": 2,
"waiting": 1,
"idle": 1,
"stopped": 1,
"sessions": [...]
}
Auto-detection (inside a tmux pane)
When called from within an aoe-managed tmux session, identifier can be omitted:
aoe session show # auto-detects current session
aoe session capture # auto-detects current session
aoe session current --json
Renaming and organizing
aoe session rename -t "new title"
aoe session rename -g "new/group"aoe group create mygroup
aoe group move mygroup
aoe group list --json
aoe group delete mygroup --force
Profiles
aoe profile list
aoe profile create staging
aoe profile delete staging
aoe profile default staging # set default
aoe -p staging list # use inline
Worktrees
aoe worktree list
aoe worktree info
aoe worktree cleanup -f
Removing sessions
aoe remove
aoe remove --delete-worktree --force
Workflow patterns
Single agent
aoe add /path/to/repo -t "feature X" -l
... wait ...
aoe session capture "feature X" --json
Parallel worktree agents
aoe add . -t "issue-100" -w fix/issue-100 -l
aoe add . -t "issue-101" -w fix/issue-101 -l
aoe add . -t "issue-102" -w fix/issue-102 -l
aoe status --json # check all at once
Monitoring loop
Poll all sessions until none are running:
while true; do
status=$(aoe status --json)
waiting=$(echo "$status" | jq '.waiting')
running=$(echo "$status" | jq '.running')
if [ "$running" -eq 0 ] && [ "$waiting" -eq 0 ]; then
echo "All agents finished"
break
fi
echo "Running: $running, Waiting: $waiting"
sleep 30
done
Capture and review
for id in $(aoe list --json | jq -r '.[].id'); do
echo "=== $id ==="
aoe session capture "$id" -n 100 --strip-ansi
echo
done
Group operations via TUI
Groups are primarily managed through the aoe TUI (run aoe with no arguments). The TUI supports bulk start/stop/restart on groups. Use CLI commands above for scripted workflows.