β‘ Workflows
Checkpoint / Snapshot
Save immutable snapshots of workflow state at defined points so long-running workflows can pause and resume, branch into parallel variants, or roll back to a known-good point without restarting from scratch.
Bundle files
πORCHESTRATION.mdβ Orchestration
1# ORCHESTRATION.md
2
3## Diagram
4
5 ββββββββββββββββββββββββββββββββββββββββββββ
6 β Workflow Orchestrator β
7 ββββββββββββββββββββββ¬ββββββββββββββββββββββ
8 βΌ
9 ββββββββββββ ββββββββββββββββ ββββββββββββ
10 β Phase 1 βββ>β CHECKPOINT 1 βββ>β Phase 2 β
11 β Agents β β (snapshot) β β Agents β
12 ββββββββββββ ββββββββ¬ββββββββ ββββββ¬ββββββ
13 β βΌ
14 β ββββββββββββββββ ββββββββββββ
15 β β CHECKPOINT 2 βββ>β Phase 3 β
16 β β (snapshot) β β Agents β
17 β ββββββββ¬ββββββββ ββββββββββββ
18 β β
19 resume β β resume
20 from C1 β β from C2
21 βΌ βΌ
22 βββββββββββββββββββββββββββββββ
23 β Snapshot Store β
24 β (immutable, named, versioned)β
25 βββββββββββββββββββββββββββββββ
26
27
28## Workflow
29Checkpoint / Snapshot
30
31## Objective
32Save immutable snapshots of workflow state at defined points so long-running workflows can pause and resume, branch into parallel variants, or roll back to a known-good point without restarting from scratch.
33
34## Roles
35- **Workflow Orchestrator:** manages phase transitions, triggers snapshot creation, and handles restore requests.
36- **Phase Agents:** execute work within each phase and signal completion to the Orchestrator.
37- **Snapshot Agent:** serializes and stores the full workflow state (context, partial outputs, decisions) at each checkpoint.
38- **Restore Agent:** loads a named snapshot, validates its integrity, and hands control back to the Orchestrator.
39- **Snapshot Store:** immutable, versioned store of all snapshots (append-only).
40
41## When to use
42- Long-running workflows (hours/days) that may be interrupted.
43- High-cost workflows where restarting from scratch on failure is unacceptable.
44- Experimental workflows where you want to branch at a decision point and explore multiple paths.
45- Regulatory workflows requiring point-in-time audit snapshots.
46- Workflows with human-in-the-loop gates where work must pause until approval.
47
48## Protocol
491. Orchestrator defines checkpoint locations and snapshot naming scheme before starting.
502. Phases execute; when a phase completes, Orchestrator triggers Snapshot Agent.
513. Snapshot Agent captures:
52 - All agent outputs produced so far.
53 - Workflow metadata (phase, step, config, timestamps).
54 - Pending decisions and their context.
554. Snapshot is stored with a unique ID, name, and timestamp. Orchestrator logs checkpoint event.
565. Orchestrator continues to next phase.
576. On resume (after interruption or explicit rollback):
58 a. Restore Agent loads the target snapshot.
59 b. Validates snapshot integrity (checksum).
60 c. Orchestrator restores state and resumes from the checkpoint's next step.
617. For branching: Restore Agent loads a checkpoint; Orchestrator starts a new workflow branch from that point with a different parameter set.
62
63## Snapshot contents
64- `snapshot_id`: unique, immutable identifier.
65- `workflow_id` + `checkpoint_name`.
66- `phase_outputs`: all agent outputs produced before this checkpoint.
67- `pending_context`: everything needed to continue from here.
68- `config_hash`: ensures restored workflow uses same configuration.
69- `created_at`: timestamp.
70- `checksum`: integrity verification.
71
72## Rules
73- Snapshots are immutable: never overwrite, only append new snapshots.
74- A snapshot must be verified (checksum check) before any restore.
75- Orchestrator must log every checkpoint creation and restore event.
76- Branch workflows from snapshots must get a new `workflow_id` to avoid ID collisions.
77- Define checkpoint locations before starting β no retroactive snapshots.
78- Snapshot Store must retain snapshots for the defined retention period before purging.
79
80## Deliverables
81- Completed workflow output (from last phase or branch).
82- Checkpoint manifest: all snapshots created, their IDs, phases, and timestamps.
83- Restore log: any checkpoints used for resume or branching.
84- Storage usage report per snapshot.
85
Lines: 85 | Words: 525
Install
Copy bundle to your OpenClaw workspace.
curl -fsSL https://raw.githubusercontent.com/cerealskill/openclaw-agents/main/install.sh | bash -s workflow checkpoint-snapshot ENRate this agent
Loading...
Sign in to rate this agent
Includes
- β ORCHESTRATION.md
Info
- Slug
- checkpoint-snapshot
- Lines
- 85
- Words
- 525
