An agentic workflow is a sequence of LLM calls, tool invocations, and decisions that together accomplish a task no single prompt could handle. The challenge isn't writing the steps โ it's making the workflow reliable, observable, and safe when things go wrong.
Four core workflow patterns
1. Sequential Pipeline
Step A โ Step B โ Step C. Output of each step is input to the next. Simplest pattern, easiest to debug. Use when steps have strict dependencies.
2. Parallel Fan-Out + Merge
Multiple steps run concurrently (e.g., research 5 competitors simultaneously), then results are merged. Dramatically reduces total latency for independent subtasks.
3. Plan-Then-Execute
First LLM call produces a structured plan (a list of steps). Subsequent calls execute each step in order. Handles tasks where the exact steps aren't known upfront.
4. Human-in-the-Loop (HITL)
Agent pauses at designated checkpoints, presents output for human review, and only continues after approval. Critical for high-stakes workflows where errors are costly.
Parallel workflow with HITL on MoltBot
Error recovery patterns
- Retry with backoff: Transient failures (timeouts, rate limits) should auto-retry with exponential backoff. Max 3 retries before escalating.
- Step-level checkpointing: Save state after each successful step. On failure, resume from the last checkpoint โ don't restart the whole workflow.
- Fallback steps: If an LLM call fails, fall back to a simpler model or a cached result rather than failing the whole workflow.
- Dead letter queue: Failed workflows that can't recover should be routed to a review queue with full state for manual intervention.
Visual workflow builder on MoltBot
Drag-and-drop pipeline builder, parallel execution, HITL checkpoints, step-level retry, and full observability. 14-day free trial.
Start Free Trial โ