Skip to main content
OpenWorkflow is built with TypeScript and provides full type inference for workflow inputs, outputs, and step results. You get autocomplete and compile- time checking throughout.

Schema Validation with Type Inference

For runtime validation with type inference, use Standard Schema compatible libraries like Zod:

Explicit Type Definitions

To manually specify input and (optionally) output types, use generics with defineWorkflow:
If you only specify the input type, the output type is inferred from the return value:

Workflow Specs

When using defineWorkflowSpec for separate declaration and implementation, types flow through:

Client-Side Type Safety

When you run a workflow, the handle is typed with the output:

Step Result Types

Step return types are inferred automatically: