Basic Workflow
workflow.ts
Workflow Options
| Option | Type | Description |
|---|---|---|
name | string | Unique identifier for the workflow |
description | string | Human-readable description |
inputSchema | ZodSchema | Zod schema for input validation |
outputSchema | ZodSchema | Zod schema for output validation |
fn | function | The workflow implementation |
options | object | Advanced Temporal activity options |
Workflow Rules
Workflows must be deterministic. This means:Do
- Call steps and evaluators
- Use conditionals and loops
- Import from whitelisted files
Don't
- Make API calls directly
- Use
Date.now()orMath.random() - Import arbitrary modules
Allowed Imports
Workflows can only import from: Components:steps.js— Step definitionsevaluators.js— Evaluator definitionsshared_steps.js— Shared steps across workflows
types.js,consts.js,constants.jsvars.js,variables.jsutils.js,tools.js,functions.js,shared.js