Core concepts
Workflows
Declarative graphs with checkpoints, pauses, and rewind.
Workflows are JSON state graphs interpreted by the engine — stateful graph orchestration, made fully declarative so packs can ship workflows safely. Steps are fixed, safe primitives; transitions are conditions over run data.
| Step kinds | Conditions |
|---|---|
ask_user · classify · extract · retrieve · knowledge_answer · summarise · tool_call · confirm · set_data · checkpoint · progress · end | always · field_equals · field_exists · field_missing · approved · rejected · tool_ok · tool_failed · confidence_below |
- Durable: auto-checkpoint after every state; paused runs survive app restarts (
attach_workflow_run). - Interruptible:
ask_userandconfirmpark the run; the nextsubmitInput/resolveApprovalresumes it. - Time travel: rewind a run to any checkpoint, or fork a new run from one.
- Bounded:
max_stepsis enforced by the engine; runaway loops fail safely.
Rewind / fork
const runs = await lybo.listWorkflowRuns(); const ckpts = await lybo.listCheckpoints(runs[0]); await lybo.forkWorkflow(runs[0], (ckpts[0] as any).checkpoint_id);