Cover Image for Define Complex Tasks Step by Step with Mastra Workflows
Cover Image for Define Complex Tasks Step by Step with Mastra Workflows
Avatar for Mastra
Presented by
Mastra
The open-source TypeScript framework for building AI agents

Define Complex Tasks Step by Step with Mastra Workflows

Virtual
Registration
Welcome! To join the event, please register below.
About Event

Not everything should be left to an agent's reasoning. When you know the steps, the order, and the data that needs to flow between them, you want control — not inference. That's what Mastra workflows give you.

Workflows let you define structured sequences of tasks with typed inputs and outputs, branching, parallel execution, loops, suspend and resume, and streaming — all in TypeScript. You get the predictability of a pipeline with the flexibility to call agents, tools, or external APIs from any step. Whether you're building a multi-step RAG pipeline, a human-in-the-loop approval flow, or a data processing job, workflows give you fine-grained control over what runs, when, and how data moves between steps.

In this workshop, you'll learn how to build workflows from scratch and compose them into real applications.

You'll learn how to:

  • Create steps with typed input and output schemas using createStep()

  • Chain, branch, parallelize, and loop steps with .then(), .branch(), .parallel(), .foreach(), .dountil(), and .dowhile()

  • Map data between steps when schemas don't align

  • Suspend and resume workflows for human-in-the-loop or async callbacks

  • Nest workflows inside other workflows for reusable, composable pipelines

  • Stream workflow execution and inspect runs in Mastra Studio

Q&A throughout and at the end.


Hosted by

Recording and code examples will be available to everyone who registers.

Avatar for Mastra
Presented by
Mastra
The open-source TypeScript framework for building AI agents