AgentSkillsCN

designing-agent-workflows

设计多步骤工作流,统筹协调代理行动,助力达成复杂目标。适用于规划代理的任务序列、决策树,或构建用于自主运行的状态机时使用。

SKILL.md
--- frontmatter
name: designing-agent-workflows
description: Design multi-step workflows that orchestrate agent actions toward complex goals. Use when planning agent task sequences, decision trees, or state machines for autonomous operation.

Designing Agent Workflows

Quick start

Collect or infer:

  • Workflow goal and success criteria
  • Required steps and their dependencies
  • Decision points and branching conditions
  • State that must be tracked across steps
  • Failure modes and recovery strategies
  • Human checkpoints (where to pause for approval)

Then produce output using TEMPLATES.md. Validate with RUBRIC.md.

Workflow

  1. Define the workflow goal and measurable success criteria.
  2. Map all steps and their dependencies (what must complete before what).
  3. Identify decision points and document all branches.
  4. Define state that persists across steps.
  5. Add failure handling for each step.
  6. Insert human checkpoints for irreversible or high-risk actions.
  7. Run the rubric check. Revise until it passes.

Degrees of freedom

  • Low freedom: Decision criteria must be explicit and deterministic.
  • Medium freedom: Step ordering can adapt to dependencies.
  • Allowed variation: Diagram style and notation as long as logic is clear.

Failure modes to avoid

  • Undefined behavior at decision points
  • Missing failure handling for any step
  • State not explicitly tracked between steps
  • No human checkpoint before irreversible actions
  • Infinite loops without termination conditions
  • Implicit assumptions about step ordering

References