
Long Horizon Workflows
Design and run multi-hour, multi-phase autonomous agent pipelines with checkpoints, progress visibility, error recovery, and human approval gates.
Overview
Long-Horizon Workflows is a journey-wide agent skill that designs multi-hour autonomous pipelines with checkpoints, progress tracking, and human gates—usable whenever a solo builder needs durable agent runs before commit
Install
npx skills add https://github.com/itallstartedwithaidea/agent-skills --skill long-horizon-workflowsWhat is this skill?
- Multi-hour, multi-phase autonomous pipelines beyond one conversation turn
- Checkpoint management to resume after mid-run failures without redoing completed work
- Progress tracking for visibility into stage completion and remaining work
- Human-in-the-loop gates at critical decision points before irreversible changes
- DeerFlow-inspired architecture with production-style examples (e.g., large Google Ads account analysis)
- Example scale: dozens of campaigns and thousands of keywords in one autonomous workflow
- Explicit reliability framing: failure near end of a 3-hour run without recovery is unacceptable
Adoption & trust: 1 installs on skills.sh; 18 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your agent task takes hours and many phases, but a late failure wipes progress and you cannot see where it stalled or when a human must approve.
Who is it for?
Indie builders shipping agent products or internal automations that analyze large accounts, generate long reports, or apply batched changes over multiple hours.
Skip if: One-shot code edits or sub-minute chat tasks where checkpointing and HITL overhead add more cost than value.
When should I use this skill?
You need AI agents to execute multi-hour, multi-phase autonomous pipelines with checkpoints, tracking, recovery, and human gates.
What do I get? / Deliverables
You structure a staged plan with resumable checkpoints, observable progress, recovery paths, and explicit human-in-the-loop gates for critical decisions.
- Staged execution plan with checkpoint and HITL gate definitions
- Progress-tracking model and error-recovery approach for the pipeline
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
Sketch checkpointed stages before choosing whether an overnight account audit fits your indie automation roadmap.
Implement resume tokens and progress events so your agent can analyze thousands of keywords without losing prior phases.
Run recurring multi-hour optimization pipelines that emit reports and change sets with human approval before apply.
Recover a failed long job from the last checkpoint instead of restarting a three-hour pipeline from scratch.
How it compares
Orchestration and reliability patterns for autonomous agents—not a single integration skill or a hosted workflow SaaS by itself.
Common Questions / FAQ
Who is long-horizon-workflows for?
Solo and indie builders implementing autonomous multi-phase agent pipelines who need checkpoints, recovery, and approval gates at production-like durations.
When should I use long-horizon-workflows?
Whenever work spans multiple hours or phases—during Build when wiring agent tooling, during Grow for recurring account optimizations, during Ship when batch analysis must survive failures, or during Validate when an overnight prototype run needs resume support.
Is long-horizon-workflows safe to install?
The skill describes patterns that may drive shell, APIs, and automated changes—review the Security Audits panel on this page and enforce HITL gates before production mutations.
SKILL.md
READMESKILL.md - Long Horizon Workflows
# Long-Horizon Workflows Part of [Agent Skills™](https://github.com/itallstartedwithaidea/agent-skills) by [googleadsagent.ai™](https://googleadsagent.ai) ## Description Long-Horizon Workflows enable AI agents to execute multi-hour, multi-phase autonomous pipelines that far exceed the scope of a single conversation turn. Inspired by the DeerFlow architecture and production patterns from [googleadsagent.ai™](https://googleadsagent.ai), these workflows decompose complex objectives into staged execution plans with checkpoints, progress tracking, error recovery, and human-in-the-loop gates at critical decision points. A long-horizon workflow might analyze an entire Google Ads account (dozens of campaigns, thousands of keywords), generate a comprehensive optimization report, and prepare implementation-ready change sets — all autonomously over several hours. The core challenge of long-horizon execution is reliability. A workflow that takes 3 hours but fails at hour 2.5 with no recovery is worse than useless — it wastes time and compute. Checkpoint management ensures that work completed before a failure is preserved and can be resumed. Progress tracking provides visibility into what the agent is doing and how far along it is. Human-in-the-loop gates allow a human to validate critical decisions (like budget changes) before the agent proceeds, preventing catastrophic errors in unattended operation. DeerFlow's contribution to this pattern is the concept of hierarchical task decomposition — a planner agent breaks the objective into phases, each phase into tasks, and each task into atomic operations. Each level of the hierarchy has its own checkpoint, timeout, and error handling policy. This creates a robust execution model that can survive individual task failures without losing the broader workflow state. ## Use When - The objective requires more computation than fits in a single agent conversation - Multi-campaign or multi-account analysis needs to run unattended - The workflow has natural phases with different tool and data requirements - Critical decisions require human approval before proceeding - Long-running workflows must survive interruptions and resume cleanly - You need audit trails showing what the agent did, decided, and produced at each stage ## How It Works ```mermaid graph TD A[Objective] --> B[Planner Agent] B --> C[Phase 1: Data Collection] B --> D[Phase 2: Analysis] B --> E[Phase 3: Recommendations] B --> F[Phase 4: Report Generation] C --> G[Checkpoint 1] G --> D D --> H[Checkpoint 2] H --> I{Human Gate} I -->|Approved| E I -->|Rejected| J[Revise Analysis] J --> D E --> K[Checkpoint 3] K --> F F --> L[Final Output] M[Progress Tracker] --> C M --> D M --> E M --> F N[Error Recovery] --> C N --> D N --> E N --> F ``` The planner agent receives a high-level objective and decomposes it into ordered phases. Each phase executes a distinct part of the workflow (data collection, analysis, recommendation generation, report writing). Checkpoints between phases persist the intermediate state so the workflow can resume after interruptions. Human gates pause execution at high-stakes decision points, waiting for explicit approval before proceeding. A progress tracker provides real-time visibility into the workflow's status. Error recovery at each phase can retry failed tasks, skip non-critical tasks, or escalate to the human operator. ## Implementation **Workflow Definition:** ```typescript interface WorkflowPhase { id: string; name: string; tasks: WorkflowTask[]; checkpoint: boolean; humanGate: boolean; timeout_ms: number; onError: "retry" | "skip" | "abort" | "escalate"; } interface WorkflowT