Examples
AI Pipeline Checkpoint
4-stage document pipeline with checkpointing, retry backoff, and failure injection.
Try it
Loading example…
Use “Auto-Run All” to process all 4 stages, or “Advance Stage” to step through manually. Save checkpoints and restore them after resetting.
How it works
A 4-stage document processing pipeline (extract, summarize, classify, archive) with full checkpoint support using InMemoryCheckpointStore from @directive-run/ai.
- Checkpointing – Save pipeline state at any stage, restore it later to resume from that point
- Retry with Backoff – Failed stages retry with exponential backoff (500ms base, 2x multiplier, configurable max retries)
- Failure Injection – Force any stage to fail to observe retry behavior and pipeline halt after max retries exhausted
- Progress Tracking – Visual progress bar, per-stage token costs, and completion percentage derivation
Source code
main.ts
// Source file "main.ts" not found

