Run a workflow
Execute a registered workflow with runWorkflow after connect() on an HTTP-configured DNotifier instance.
Method
runWorkflow({
workflow: Workflow,
input: *,
senderId?: string, // defaults to notifier.userId
sessionId?: string, // continue workflow state / memory
mode?: "run" | "resume" | "retry" | "replay",
fromCheckpointId?: string,
})Return value
Field
Description
result
Return value of the workflow entry function
state
Final ctx.state object after execution
executionId
Present when observability: true — dashboard correlation id
sessionId
Present when a session was passed or minted
checkpointId
Latest checkpoint when session/checkpointing is on
→ Checkpoints, sessions & resume
Minimal run
Input types
input can be any JSON-serializable value:
Type
Example use
string
User question for intent router
object
Blog brief { topic, keywords, audience }
array
Batch items (process in entry)
Error handling
Uncaught errors in entry or agent run propagate from runWorkflow. Use try/catch at the call site:
Language guides
Language
Guide
JavaScript / TypeScript
Dart / Flutter
Next steps
Last updated