Build type-safe AI pipelines with Workflows
Workflows in @voltagent/core enable the creation of multi-step AI pipelines with full TypeScript inference for data flow. They are created using createWorkflowChain and support various step types:
andThen: Execute a TypeScript function.andAgent: Run an AI agent for structured output.andWhen: Conditional execution.andAll/andRace: Parallel execution (wait for all vs first win).andTap: Side effects without altering data flow.
Workflows support Zod schemas for input/output validation and can be paused/resumed for human-in-the-loop interactions. They can be executed via a REST API at POST /workflows/{id}/execute.