Nick describes Mastra as a framework for production AI applications, with typed workflows, tools, and conversational agents. Its playground, persistence, memory, observability, and evaluations help developers build and inspect applications. Workflows handle ordered steps; agents can choose tools or run a workflow when given access to it.
AI Pipelines and Agents in Pure TypeScript with Mastra.ai
Speakers
Nick Nisi, developer experience at WorkOS, and Zack Proser, an application and infrastructure developer focused on GenAI, MLOps, and RAG at WorkOS, lead a hands-on AI Engineer workshop on building TypeScript pipelines and agents with Mastra.ai.
Zack lays out the workshop project: turn a workplace frustration into a meme by analyzing the input, selecting an Imgflip template, generating captions, and publishing the result. The presenters use OpenAI and Imgflip, and say developers can test each step separately before connecting it to an agent. The workshop materials include a Markdown guide and Git branch checkpoints.
Nick explains that Zod schemas validate and shape model output at runtime, while Mastra also includes a structured output layer to improve generation. In the playground, developers can inspect each workflow step's inputs and outputs, adjust prompts and model settings, and debug locally. The demo shows a frustration analysis flowing through four steps to generate a meme.
In response to a question, Nick distinguishes workflows, which run steps in an intended sequence, from tools that an agent can choose among at runtime. Mastra can give an agent access to both, though Nick cautions that presenting an agent with many tools can make its choices less predictable. The presenters also discuss workflows as a way to compose steps and branching logic.
Nick connects the completed workflow to a conversational meme generator agent, which can run it and show the image and execution details in chat. Zack describes Mastra's TypeScript foundation, evaluations, local playground, and deployment options, including Hono, Cloudflare, Netlify, and Mastra Cloud. They suggest applying the same patterns to internal tools and routine tasks, while encouraging experimentation and code review.
Takeaways
- Use workflows when a task needs a defined sequence of steps; expose tools when an agent should choose actions at runtime.
- Validate model output with runtime schemas before passing it to later steps.
- Test and inspect individual workflow steps in the playground before wiring them into an agent.
- Give agents only the tools and workflows they need for a task.
- Try small internal automations, then review generated code and evaluate pipeline quality.
Mentioned in this talk
Search inside this talk
What was claimed 10
- works atZack Proser works at
WorkOSAI Engineer, Applied AI“We’re both AI engineers at WorkOS”
0:13inLifestyles of the AI-NativeYouTube Verified7 sources· Talk, Web, GitHub· archived
- works atDX / AI (Developer and Agent Experiences); GitHub README says Developer Experience Engineer
“I'm a developer experience engineer at WorkOS.”
0:17inAgents, Access, and the Future of Machine IdentityYouTube Verified7 sources· Talk, Web· archived
- featureMastra: Framework for production AI applications with typed workflows, tools, agents, persistence, memory, observability, evaluations, and a local playground
“Mastra is a framework for building production AI applications in an agentic manner.”
YouTube Unverified1 source· Talk
- integrates withMastra integrates with Vercel AI SDK
“the team wisely chose to build upon [the] Vercel AI SDK”
YouTube Unverified1 source· Talk
- usesNick Nisi uses
Claude Code
runs it alongside Vim in a tmux split“I'll have Vim open and open a split for Claude Code.”
YouTube Unverified1 source· Talk
- integrates withexperimental workflow integration
“Inngest is first. You should use it. It's experimental”
YouTube Unverified1 source· Talk
- featureMastra: Supports adapters for Cloudflare and Netlify and can be deployed in a Docker container or other server frameworks
“We also have adapters for Cloudflare and Netlify.”
YouTube Unverified1 source· Talk
- usesdefault server bundle
“By default, Mastra will bundle into a Hono server.”
YouTube Unverified1 source· Talk











