Skip to content

Six patterns for building workflow AI agents — sub-agents, CLI interfaces, and status commands

Insight: Building production workflow agents requires systematic decomposition: (1) sub-agents for different tasks within a workflow, skills for smaller steps within a single task — skills are loaded only when needed and share context with the main agent; (2) CLI as universal interface for both humans and agents, enabling exact reproduction of agent commands for debugging; (3) status commands that guide agents by showing current state. The CLI approach eliminates the double development cost of building separate GUIs for humans and tool interfaces for agents.

Detail: Zhu Liang's practical insight: start with CLI, add GUI later for human-in-the-loop tasks. Sub-agents run in separate sessions with own system prompts while skills share context within a session. Skills can be dynamically generated from catalogs or knowledge bases. Different LLM models can power different CLI commands (e.g., Gemini 2.5 Pro for video analysis). This aligns with the progressive disclosure pattern emerging in the Agent Skills standard.

Sources