# [Workshop] AI Pipelines and Agents in Pure TypeScript with Mastra.ai — Nick Nisi, Zack Proser

AI Engineer · 2025-07-12

<https://aie.addtry.com/1c794f51-2f79-42cb-a93e-8704f5254b38>

This hands-on workshop introduces Mastra.ai, a TypeScript framework for building production AI agents and pipelines, and demonstrates how to build an AI meme generator using composable workflows, tools, and agents. Hosts Nick Nisi and Zack Proser walk through creating a multi-step workflow: extract user frustration, find a base meme via ImageFlip, generate captions, and publish the meme at a stable URL. They show how to chain steps with Zod schema validation for deterministic output, then wrap the workflow in an agent that accepts natural language requests. The workshop also covers MCP (Model Context Protocol) and a live demo of MCP.shop for ordering a shirt, emphasizing local iteration with Mastra's playground, built-in memory, and evaluation tools. Real-world patterns include building internal AI assistants for data cleaning, email drafting, and document summarization with minimal code.

## Questions this episode answers

### What is Mastra and what makes it appealing for building AI applications?

Zack Proser describes Mastra as a TypeScript framework for production-ready AI agents, built on the Vercel AI SDK. It provides composable workflows, tools, and agents, along with built-in persistence, memory, observability, and evaluation. A local playground enables rapid iteration, and the pure TypeScript approach catches errors at compile time, making it ideal for reliable, scalable AI pipelines.

[2:57](https://aie.addtry.com/1c794f51-2f79-42cb-a93e-8704f5254b38?t=177000)

### In Mastra, what's the difference between using tools and workflows with an agent?

During the workshop, Nick Nisi and Zack Proser explain that workflows are deterministic pipelines of steps executed in a fixed sequence, whereas tools are individual functions the agent can invoke at its discretion. You can give an agent both, but workflows offer more control and reliability, while tools provide flexibility for simpler, ad‑hoc tasks.

[14:29](https://aie.addtry.com/1c794f51-2f79-42cb-a93e-8704f5254b38?t=869000)

### How does Mastra's local playground help debug and iterate on AI agents?

Zack Proser points out that the Mastra playground, running on localhost:4011, allows you to test individual workflow steps, view input/output graphs, adjust prompts and model parameters on the fly, and see results immediately. This eliminates the need for a deployment during development and speeds up iteration.

[34:00](https://aie.addtry.com/1c794f51-2f79-42cb-a93e-8704f5254b38?t=2040000)

### How does Mastra ensure structured, reliable output from non-deterministic LLMs?

Nick Nisi and a Mastra team member note that the framework uses Zod schemas to validate and coerce LLM outputs at runtime, and includes a structured output layer that reduces errors. They also mention built-in retry logic, which helps when models fail to respect detailed constraints like string length or exact types.

[47:15](https://aie.addtry.com/1c794f51-2f79-42cb-a93e-8704f5254b38?t=2835000)

## Key moments

- **[0:00] Welcome & Intros**
  - [0:15] Nick Nisi and Zack Proser introduce building an AI-powered meme generator with Mastra.ai in TypeScript.
  - [0:26] Zack Proser says the patterns used in the meme generator are the same for production AI applications.
  - [1:27] Nick Nisi explains WorkOS builds developer tools for enterprise features like SSO, SAML, and is now securing AI agents and MCP.
  - [1:48] Zack Proser illustrates WorkOS value: drop in JavaScript to add enterprise SSO when selling to customers with 2,000 users.
  - [2:30] Nick Nisi: 'I'm a TypeScript enthusiast and a Vim user.'
- **[2:57] Mastra Concepts**
  - [2:57] Zack Proser explains Mastra is a framework for building production AI applications with agents, workflows, tools, and built-in persistence, memory, observability, and evaluation.
  - [4:15] Zack Proser: Workflows are composable pipelines of discrete steps that happen in a certain order, with transforms and validation via Zod.
  - [4:56] Zack Proser: LLMs are powerful but non-deterministic; we use Zod to validate and coerce their output for dependable building.
  - [5:16] Nick Nisi: Mastra workflow API reminds me of RxJS, with steps chained to add determinism.
  - [5:37] Nick Nisi: Tools are functions agents can call for file system access, API calls, or custom business logic, similar to MCP.
  - [6:05] Zack Proser: MCP excels at granting Claude or OpenAI context not in training data, improving AI systems.
- **[10:45] Meme Generator**
  - [10:45] Zack Proser: We'll build an AI meme generator that takes your workplace frustration, finds a base meme, generates captions, and publishes a new meme at a stable URL.
  - [11:17] Zack Proser: The meme generator patterns are production ready; we'll use OpenAI for understanding and ImageFlip's free API.
  - [11:49] Nick Nisi: Mastra allows testing a single step in a workflow without an agent, then testing the agent independently, enabling iterative development.
  - [12:16] Zack Proser: The workshop is self-paced with Git branch checkpoints; if you fall behind, you can checkout the next phase's branch.
  - [13:03] Zack Proser: In this in-person workshop, understanding is more important than completing everything; we'll take questions.
- **[14:12] Workshop Setup**
  - [14:29] Q: Is a workflow like a tool? Zack Proser: Tools are individual functions agents decide to call; workflows are fixed sequences of steps you always want in order.
  - [15:34] Q: Can agents use both tools and workflows? Zack Proser: Yes, but granting 100 tools might cause non-deterministic behavior, making workflows beneficial for pipelines.
  - [16:45] Nick Nisi: I installed the Mastra MCP doc server in Claude Code and Claude Desktop, and it instantly made my tooling smarter with zero hallucinations.
  - [26:25] Q: Why Mastra compared to other frameworks? Zack Proser: It's pure TypeScript, built on Vercel AI SDK, includes built-in evals, and enables rapid internal tooling.
  - [27:05] Nick Nisi: 'I still don't have to figure out what pip is, so it's prolonging that.'
  - [27:52] Nick Nisi: After our company's AI moment, we held a workshop and 10 people immediately built demos with Mastra, showing its speed.
- **[34:27] Step 1: Workflow**
  - [34:27] Nick Nisi: In step 1, we'll create a basic workflow with one step to extract frustration from user input and see it in the Mastra playground.
  - [35:41] Q: Have you played with AI integrations into Neovim? Nick Nisi: I use Avanti for in-editor chat, but prefer Claude Code in a TMUX split with Vim for better ergonomics.
  - [37:27] Nick Nisi: I'd love to hear how everyone uses AI tools daily—we're all in our own bubbles and can learn amazing tips from each other.
  - [38:51] Speaker 5: 'I'm afeared of somebody coming down from on high with like this is the golden framework. Everybody use this.'
  - [39:24] Nick Nisi: Mixing and matching AI tools is powerful right now; the winners will bubble up through experimentation.
  - [40:12] Nick Nisi: Cursor rules could evolve like tests, preventing bad code as your codebase grows, though I haven't used Cursor myself.
- **[53:07] Step 2: Pipeline**
  - [55:35] Nick Nisi: In the next step, we'll chain all four workflow steps to go from user frustration to an actual meme published on ImageFlip.
  - [59:26] Q: What is this JSON output? Zack Proser: It's the structured data you define, passed to the next step in the pipeline.
  - [1:00:16] Q: Can I change output format? Zack Proser: Yes, you define the schema with Zod, which helps coerce LLM output into the exact structure you need.
  - [1:01:12] Nick Nisi: This step determines frustration level and type, which will be used to find an appropriate meme template from ImageFlip's API.
  - [1:02:22] Zack Proser: Knowing the meme's caption box slots is critical for later steps; Zod schema ensures that data is present.
  - [1:03:12] Nick Nisi: Building the multi-step workflow is the biggest part; adding an agent on top is straightforward.
- **[1:27:52] Step 3: Agent**
  - [1:27:52] Nick Nisi: In the final step, we'll create an agent with a prompt and grant it the workflow, so users can chat instead of using the workflow UI.
  - [1:28:13] Zack Proser: By building an agent on top of the workflow, colleagues can just chat to get the task done automatically.
  - [1:29:38] Attendees share generated memes in Slack, like 'We finally catch up on Slack messages, but there's already 20 more waiting.'
  - [1:31:48] Mastra team member: 'Most of us at Mastra were previously building Gatsby. It's humbling when someone else gives a workshop on your tool.'
  - [1:32:28] Nick Nisi: We didn't know the Mastra team would be here until yesterday, but it's great for live Q&A.
  - [1:32:46] Zack Proser polls audience: A couple have agents in production; one use case is a chatbot for operational server issues to get logs.
- **[1:45:52] Wrap-Up & Q&A**
  - [1:46:25] Nick Nisi: The agent provides human-like feedback, inline image, and clickable link, not just raw JSON.
  - [1:46:40] Nick Nisi: 'I highly recommend you deploy this and use it because it's cathartic to really vent to it. Your data's safe probably.'
  - [1:47:14] Nick Nisi: Key takeaways: workflows for typed pipelines, agents as interfaces, Zod validation for reliable outputs, and Mastra's debugging tools.
  - [1:47:52] Zack Proser: Mastra's site has a 37-line RAG pipeline example, a drastic improvement over gluing multiple libraries two years ago.
  - [1:48:25] Nick Nisi: In two hours we only scratched the surface; explore tool creation, vector databases, RAG, and MCP deployments.
  - [1:48:45] Zack Proser: Share the agent you built with coworkers and see what they use it for.

## Speakers

- **Nick Nisi** (guest)
- **Zach Proser** (guest)

## Topics

Agent Engineering, Model Context Protocol (MCP)

## Mentioned

OpenAI (company), WorkOS (company), Claude (product), ImageFlip (product), MCP (product), Mastra (product), TypeScript (product), Vercel AI SDK (product), Zod (product)

## Transcript

### Welcome & Intros

**Nick Nisi** [0:15]
Allright, should we get it going?

**Zach Proser** [0:16]
Let's do it.

**Nick Nisi** [0:17]
Allright, welcome everyone. Uh, this is "AI Pipelines and Agents in Pure TypeScript" with Mastra.ai. Uh, today's mission, do you want to talk?

**Zach Proser** [0:26]
Sure. Um, so what we're going to do today is we're going to build an AI-powered meme generator, and yes, that's humorous. Sounds like a toy, but the patterns that we're going to use here, uh, both with the Mastra framework and in terms of using TypeScript to build a production agent, are the same patterns that we've used and that you can use, um, to deploy to production with, uh, AI applications.

Um, so the rough format that we're going to follow here is we're going to do like a 20-minute intros and concept just to make sure everyone's level set. Feel free to, you know, stop us, ask questions, and then, um, the majority of the time this workshop is going to be spent coding, uh, together, um, collaboratively, and then we'll have about 10 minutes wrap-up and Q&A and a little fun demo for you at the end to get some swag.

**Nick Nisi** [1:04]
Yep. And, uh, yeah, so this is a true workshop format. Uh, we'll be building together. If you have questions, uh, reach out to us. We're happy to help. And, uh, just so you can get kind of a head start on it, if you go to "Workshop AI Agents with Mastra," uh, the Slack channel in the AI Engineer Slack, all the materials are in the pinned link there, and we can have discussions there as well, continuing.

Uh, so we work at a company called WorkOS. Um, we build developer tools and make enterprise features happy—uh, enterprise developers happy—with easy-to-use tools like SSO and SAML, directory sync, audit logs, fine-grained auth. Uh, and we're really getting into AI, uh, and securing your AI, uh, things like securing your MCP, attaching identity to those agents so that they can act on your behalf and know who you are.

**Zach Proser** [1:48]
Yep. Um, another good way to think about WorkOS is if you—like, let's say Nick and I built the ultimate app this weekend, we're ready to go sell it, and then the first time we demo it to somebody, they say, "Can you give us, uh, single sign-on for our 2,000 users over here in a different path over here?"

Um, so then we would go and buy WorkOS or use WorkOS, drop the JavaScript in, and we would have those features, uh, ready to sell.

**Nick Nisi** [2:09]
Uh, so my name's Nick Nisi. I'm Developer Experience at WorkOS. Uh, I'm also a host on the Dysfunctional.fm podcast, formerly JS Party. Any JS Party listeners ever? Huh? Nice. Um, uh, I also do conference MC-ing and speaking. Um, I'll be at Squiggle Conf MC-ing that, uh, which is a dev tools-focused conference in Boston later this year.

Uh, I'm also a TypeScript enthusiast, as you'll see. I'm a Vim user, by the way, and I'm Nick Nisi everywhere.

**Zach Proser** [2:38]
Hey everyone. I'm Zack. Um, really excited to be here with you all. I've mostly been an application and infrastructure developer, uh, my career, but for the last two years I've really been focused on GenAI, uh, MLOps, and then retrieval-augmented, uh, generation pipelines or RAG pipelines.

So, um, yep, really excited to be here and building with you today.

### Mastra Concepts

**Zach Proser** [2:57]
Uh, okay, so what is Mastra? Um, I'll just embarrass, uh, two folks quickly and just point out that we have some core Mastra team members here, so this is very exciting. So you'll not only be able to get some assistance from us, hopefully, but also, uh, from the Mastra core team for any questions that go over our heads.

Mastra is a framework, um, and so it's a framework for building, you know, production AI applications in an agentic manner. And these are the components that we're all going to learn and get hands-on with today in this workshop and understand very well by the time we leave here.

So we're going to build workflows. Just think of them as, um, composable and typed pipelines, which are very exciting. Uh, tools that you can optionally use, uh, and give to agents. Agents are like the interfaces that we're chatting with.

Um, they're the ideal interface for humans to work with. And then, uh, the Mastra framework does some incredibly cool things, uh, out of the box with batteries included that we'll see. Um, so not just, you know, a playground that makes it super easy to debug everything, but built-in persistence, memory, observability, and even, um, evaluation so that you can determine over time how healthy your pipeline is, which is critical for, you know, successfully deploying an AI application in production.

**Nick Nisi** [3:59]
Yep. And we'll be—we'll be focusing on, uh, pieces of this. We don't have time in two hours to go over everything, but there's a lot of really cool tools in there. Uh, so we're going to be focusing on some core concepts for the, uh, example app that we're building, um, and we'll kind of understand some of those building blocks as we get going.

**Zach Proser** [4:15]
Cool. So let's start off, uh, what are workflows? Um, workflows are composable pipelines. So the way that I think about this is I map it in my head mentally to if a coworker says, "I just keep on having to go scrape the site and download people that look interesting and look up their info and then take an image and then write an email."

You know, that sounds to me like a, a workflow,right? It's a pipeline of discrete steps. You want them to happen in a certain order. And as we can begin to see with this example code on the screen, you can even have control over transforms that happen in the middle of your pipeline.

So the idea is you're chaining multiple steps together to get some work done. You can pass data between steps. And then, very importantly, because as we know, LLMs are incredibly powerful, but they're non-deterministic. And so how do we rely on their output?

How do we coerce their output into something that we can actually build against dependably? That's, uh, where we're going to validate inputs with Zod, but we're also going to learn how Zod can even coerse, uh, at runtime and then handle errors, uh, errors gracefully.

But really, the key i-idea here is that workflows are a discrete set of ta uh, steps to get a task done.

**Nick Nisi** [5:16]
Yep. And the, the API is very similar. Uh, it reminds me of, like, RxJS. Like, very similar. You're starting with one thing and then doing something and then mapping to something else and then doing something else, uh, and running through all of that to give a little bit of determinism to the, the call of all of these tools as they're being called by your agent or some other tool.

Um, and speaking of tools, uh, tools are just functions that agents can call. Uh, they can give you things like file system access, API calls, database queries, uh, custom business logic. If you've used MCP, uh, MCP calls tools, and, uh, so that's like a really cool thing.

It gives the, the LLM a bit the ability to act on your behalf or to read in data that it doesn't just inherently know from its latent space, uh, so that it can do more things and be more powerful for you.

**Zach Proser** [6:05]
Yep. Um, absolutely. I'll just say that, you know, we, we think of, like, uh, AI systems getting better the more data and context they have access to. And, and one of the things that MCP is really excellent at doing is, is giving granting context to Claude to OpenAI, uh, that it normally wouldn't have, and that's not in its training data.

**Nick Nisi** [6:22]
Yep. And one note for today's workshop: we did build everything using tools, uh, but then we switched as we brought in an agent, uh, to call, and we had the agent call a workflow rather than the tools independently.

So we wanted to touch on them there. There's something powerful that you should look into on your own, uh, and figure out your use case for them, but we didn't really use them in, uh, the final version of this workshop.

**Zach Proser** [6:44]
Um, and then finally, what are agents? So we've all probably seen and used the chatbot, um, type demos, but, you know, the way that we're thinking of agents, uh, these days is really that they're kind of an ideal human interface.

So if I set up a workflow, that's a deterministic set of steps to get some discrete task done for my colleague. Let's say that my colleague is in a hurry or they're busy or they're doing this while they're on the phone or they're not technical, then a chatbot can be an ideal interface for that human colleague,right?

Because they can describe their problem or their issue, what they need, with natural language, and then the system can be smart enough to actually do what they want. And so this is the core—this is a very, uh, core kind of pattern that we're seeing in, in a lot of, um, AI applications.

And so we're actually going to build this and understand this here. So after we create our workflow, we'll create an agent, and we'll grant that agent the ability to call the workflow.

**Nick Nisi** [7:32]
Yep. And agents were something that when I first heard of them, like, it like in a lot of these things, like the, the naming adds more confusion than is really necessary. And we spent, like, an hour on the phone call, and I kept being like, "But what is an agent?

What is how is that anything beyond just a simple prompt?" And it's really like the marriage of that prompt plus the workflows or the tools that it can use, uh, to do things in a specialized way.

**Zach Proser** [7:53]
Yeah. The other way I think of it is like if, you know, in the past, maybe five, ten years ago, you might have written deterministic, more deterministic software. With agents, you're expecting that the system overall can kind of interpolate or can understand, introspect what's the state, and then make a decision, um, in like a graph sense of, "We need to actually go here."

So, um, that's the other piece that you'll hear when you're discussing agentic systems.

**Nick Nisi** [8:15]
Yep.

Cool. Uh, another thing: MCP or Model Context Protocol. I told you I'd show you how to spell it. Um, this is a way for you to—it's an open standard for a way to bring, like, universal plugins or these tools to AI agents so that they can be called.

Uh, this was really developed, uh, by Anthropic, and you can use it easily in Claude Code, uh, among other places like Cursor, um, Windsurf, I think.

**Zach Proser** [8:39]
Yep.

**Nick Nisi** [8:40]
Uh, and even OpenAI is, is, uh, adopting these tools as well. So it's really a nice, easy-to-use API that these tools know how to use and call.

**Zach Proser** [8:48]
And to also make it concrete, like you—so you work on the DX team at WorkOS. You're constantly crushing a ton of, of bugs in all various SDKs, and you use Claude Desktop,right? And so, like, what changed the day that you enabled the, the GitHub MCP server for Claude Desktop?

**Nick Nisi** [9:01]
Yeah. The GitHub MCP server was the one that really, like, made me understand what MCP is doing because I was like, "Why do I want to do this? How is this different than just, like, having access to GitHub and, and, you know, calling all of that?"

But it's really an easy way for me to have a conversation with Claude and for it to bring in the context that it needs based on the tool the, uh, issue that I'm working on. For example, if you have an issue on a, a GitHub repo, I can just say, "Hey, can you check out that issue and tell me, uh, you know, here's my example app.

Tell me how I might reproduce this." And it can, like, go figure that out, pull in the comments, understand what's going on, link out to other repos or other examples from there, and then, uh, look at my example repo and tell me how to, uh, to make that change.

**Zach Proser** [9:43]
Cool.

**Nick Nisi** [9:47]
Speaking of MCPs, uh, we built a fun little demo called MCP.shop. You can go there now, and you can use MCP to order a shirt. And it's the only way that you can order this shirt. And for the low, low price of $0, you can get an MCP shirt.

The, the point is you just have to use the MCP. So it's just a fun demo to, to try out MCP, play with it.

**Zach Proser** [10:06]
Yep.

**Nick Nisi** [10:07]
You can add it, uh, it has instructions for adding it into Claude or into any of the, um, MCP servers, uh, sorry, MCP clients that support it.

**Zach Proser** [10:15]
Yep. Totally. Uh, I'll also mention that recently, so MCP is, you know, one of the protocols that's really hotright now in, in the AI space, um, and a lot of folks are, are taking notice. We recently had an MCP night, and it was at the Exploratorium.

It was a ton of fun. We, we blew out, like, the capacity of the event, um, and we had people, like, lined up around the block, which we didn't expect. Um, we're almost certainly going to do something like this again soon, so, uh, be sure to follow us if you want to hear about it.

Um, and yeah, we'd love to see you there in the future.

**Nick Nisi** [10:43]
Yeah.

**Zach Proser** [10:45]
Allright. Um, what we're going to actually build today, though, to, to get into it, is the AI meme generator. Um, so we're going to, uh, if you imagine the input to this is going to be you venting any random frustration, workplace frustration, frustration with your colleagues or boss, um, into the pipeline, and, uh, the workflow will process your frustration.

### Meme Generator

**Zach Proser** [11:04]
Um, it's going to find the best base meme that already exists that would be ideal or might be humorous. It's going to think about how to, um, actually edit and, and create new captions, and it's going to publish a new meme at a stable URL that's, uh, available for you.

And again, I just mentioned, like, this is a toy. We've got two hours. It's a quick demonstration. But the patterns that you see here and the Mastra framework are, are definitely, you know, AI, um, production ready. Uh, we'll use OpenAI just for the understanding, and ImageFlip is the only other API involved here, which you can get free, uh, username and keys for that, and there's information in the workshop MD file for that.

**Nick Nisi** [11:37]
Yep. Yeah. And it's a really fun demo just to kind of showcase some of the tooling that you can do with Mastra, uh, and how easy it is to really get all of this going, but also not just to get your, your tools going, but to test them very easily along the way.

So we can start with just, like, a single step in a workflow and test that without an agent. And then we can test the agent independent too. And we can do all of this and not have to have, like, a full picture, uh, to understand how it's going to work, but kind of iterate along the way.

And the tooling that Mastra provides is just super nice. That's why we love it. We're also huge fans of TypeScript, which makes it awesome as well. And so, yeah, it's just nice and easy.

**Zach Proser** [12:13]
Yep. Absolutely.

Okay. This is the way that we've structured this, uh, workshop. And so, you know, we weren't really sure the level that everyone's coming in at, and some folks are experts and some folks are just getting started. So, uh, it's self-paced learning, and you can go at the speed that you want to go.

If you want to go and fly all the way through it, you're free to do that. Workshop MD in that repo is the entirety of this course, and so you can kind of follow along that way. And then we also created, uh, Git branch checkpoints for you.

So in case, for example, you're to fall behind, uh, you get stuck on something, and then we get to phase two, you can also skip to phase two and stay, stay with everybody just by, you know, Git checking out theright branch.

Um, if you get uns uh, if you get stuck at any point, we're here to help, so please raise your hand. We'll come around.

**Nick Nisi** [12:54]
Come to the mic.

**Zach Proser** [12:54]
And then if you yeah, if you have questions that other folks likely have or might benefit from in the future, please be sure to come up to a mic and, uh, we'll make sure that your question is heard.

Uh, and then, you know, the other way we're thinking about this, this workshop is, again, it's, it's a anyone can read online. We can all talk online anytime, but we're actually here in person today. So, you know, please shout out questions and raise your hand and ask us things you want to know.

Um, we feel that understanding is more important than completing stuff here, and it's okay to explore, so.

**Nick Nisi** [13:20]
Yeah. We're all very new to this. This is all very new stuff, very new tools, and it's very cool. It's also changing every single week, so it's, uh, it's fun, like, snapshot in time to play with this stuff.

Um, and if you have, uh, like I said, you, you don't have to finish it. Uh, we do have the whole workshop.md that you can follow step by step all the way through to the end, uh, and then those, those branches to, um, to get us there.

And if you just look at the main branch, that's the completed version, but it's more fun to build along the way. So with that, let's get started. Um, like I said, everything is in the, uh, workshop AI agents with Mastra channel on Slack.

So if you're in there, uh, you can go grab it. There's also, uh, the Git clone commandright there to grab the repo, and, uh, we can get started with that. Um, just go to the step/step0 branch. That has everything kind of as a baseline to start from.

### Workshop Setup

**Nick Nisi** [14:12]
Uh, and then you can npm install from there and get going with the workshop.md. So here, I think we can stop and, uh, you, you can get started. We'll give you some time to build. Um, but if there are any questions, um, please come to the mics, and we'd be happy to continue the chat.

**Guest** [14:29]
Hey, I had a quick question.

**Nick Nisi** [14:30]
Yeah.

**Guest** [14:31]
Um, so the before you were you showed the example of an agent and.

**Nick Nisi** [14:34]
Uh-huh.

**Guest** [14:34]
Workflows. That's kind of different from what I'm used to seeing in these, like, agent SDKs where they usually have tools.

**Nick Nisi** [14:40]
Mm-hmm.

**Guest** [14:41]
So is the workflow kind of like a tool that I can use, or?

**Zach Proser** [14:43]
Yeah. I mean, to I feel like correct me if I'm wrong here. I feel to some degree that, like, the create tool and create step APIs are, are somewhat similar. And in my mind, at leastright now, it's sort of like an organizational preference.

Like, if I have a simple, um, use case and there might be three different tools, and I want the agent to decide theright time to call those tools, I might create three separate, mostly fun essentially functions, name them tools, grant them to the agent, and then start chatting with the agent and ask for things and let the LLM determine at runtime which, which ones to call.

The difference is with the workflow is I'm saying, "I always want you to proceed in exactly this sequence with these steps and these transforms." And then you can also in Mastra, at least, you can optionally grant an agent the ability to call that workflow.

So and then also in my conversation recently with, with Sam, that's kind of like, you know, these are these are various tools that you can build up and, and kind of assemble into the exact, uh, paradigm that you need.

**Guest** [15:34]
Can you do both tools and workflows? Like.

**Zach Proser** [15:36]
I think so. Yeah. You can grant because, uh, it's basic like, you, you're passing, like, this giant, uh, JSON object to the agent saying, "You can call these tools and you can call these workflows." And then.

**Nick Nisi** [15:45]
Cool.

**Zach Proser** [15:45]
The tricky part is, like, if you give something 100 tools and then ask an LLM, like, "You've got 100 tools. Let's, like, go to Disneyland." I don't know exactly what we're going to get out of that, but that's where, like, the determinism of a of a pipeline can be of a a workflow can be beneficial.

**Guest** [15:59]
Cool. Thanks.

**Zach Proser** [16:00]
Thanks. Great question. Um, anybody want to raise their hand? Any, uh there's no shame here. Anyone having difficulties getting started, um, need help with that?

**Guest 2** [16:10]
Permission issues? Do we expect to have another version?

**Zach Proser** [16:13]
No. Not at all. Uh, what's the permission issue? I'll come by. Uh, yeah, the repo should be fully public. Um.

**Nick Nisi** [16:20]
Yep.

**Zach Proser** [16:21]
So should be able to clone that.

**Nick Nisi** [16:26]
While Zack's doing that, I will also bring up the, um, Mastra docs, um, because these are oops. These are wonderful. Uh, they're really easy to go through. But also, as, uh, Zack and I were working, we, uh, discovered something that was actually really awesome, and that is the MCP doc server.

Um, once I installed this, things like got my tooling got a lot smarter and knew how to work with Mastra, and it made things way easier. Uh, so if you get stuck or if not and you want to see MCP in action, I would recommend installing, uh, the Mastra tools for your IDE.

I installed it into.

**Guest 2** [17:04]
So we did.

**Nick Nisi** [17:04]
Claude Code and into, um, Claude Desktop and played with it in both, and.

**Guest 2** [17:09]
Oh, no.

**Nick Nisi** [17:09]
It immediately knew a lot.

**Guest 2** [17:10]
It was easy for the workshop.

**Nick Nisi** [17:12]
Okay.

**Guest 2** [17:12]
Gotcha. You can can you clone with HDPS? Can you clone, um, not over SSH? Try the HDPS.

What specifically? Um, so if you if you go back to the repo, uh, look at the GitHub repo, like, in the browser, it should have a different option. Oh, you found it,right? Yep. So what do you want to do?

Um, so go to github.com, WorkOS, and then Mastra agents. You have to change that from a colon to a forward slash thing. So, like, grab this whole grab everything after the ampersand.

Where's my ampersand? You mean after the at? At the at. Sorry. Yeah. Grab everything after that. And then go, yeah. And then go up here. And so, uh, make put together change the URL. So do HDPS.

And then github.com. Yep. And then change. Yep. Hit that.

Sorry, I'm having trouble seeing the.

**Nick Nisi** [18:14]
Oh. You're doing well.

**Guest 2** [18:15]
Oh, that's why.

**Nick Nisi** [18:16]
Go ahead.

**Guest 2** [18:17]
Thank you. Um, it searched for that URL instead of going directly. So make that a HDPS. And then change this from a colon to a forward slash and then get rid of that final Git dot Git. That should go.

Okay. Now this. If you hit there.

And then go local. You should have that option. And then.

**Guest 3** [19:08]
ChatGPT, welcome to his office.

Come up and HDPS version of the GitHub repo.

**Guest 2** [19:18]
Oh.

**Guest 3** [19:18]
Because people are getting confused and they don't have SSH configured on their work laptops.

**Guest 2** [19:22]
Yeah, it's.

**Guest 3** [19:23]
And no one knows how to get to the repo for it.

**Guest 2** [19:25]
Yeah.

**Zach Proser** [19:28]
Anybody else, uh, any setup issues or everyone, everyone good?

**Nick Nisi** [19:35]
I'll post the HTTP, uh, s clone command in the.

**Guest 2** [19:39]
Yep. Thanks.

**Nick Nisi** [19:40]
Uh, in the Slack as well.

**Zach Proser** [19:41]
Yeah. In case anyone's having trouble with, um, SSH clone because you're on a work laptop, we'll, uh, put in the instructions for HTTPS too.

**Guest 3** [19:58]
Do I do it at a time at a time set? Do I do it at a time set? Like, do we do it at a time? Oh, yeah, we're doing it. We're ahead by five minutes.

**Nick Nisi** [20:08]
Cool.

**Zach Proser** [20:13]
Allright. We're going to do about five more minutes setup. Um, feel free to raise your hand if you have an issue. Yeah.

**Guest 2** [20:17]
Actually, it's not too bad. So just use all packages over the table. Yeah.

**Zach Proser** [20:21]
Oh, sorry. What's that?

**Guest 2** [20:25]
Oh, the Wi-Fi's bad.

**Nick Nisi** [20:27]
The yeah, the comment is the, the Wi-Fi is bad. Uh, I wish we could do something about that.

**Zach Proser** [20:31]
Sorry. Sorry. Yes.

**Nick Nisi** [20:33]
Classic conference Wi-Fi.

**Zach Proser** [20:40]
For Claude Code, yeah. Um, you if you open Claude Code, you just need that. You still need that, like, JSON object, I think. I mean, that's what I use for my MC client, but it should, uh yeah.

**Guest 2** [20:50]
Yep.

**Guest 3** [22:06]
Allright. 65, version 65, 65.

**Zach Proser** [24:20]
Going to do about two and a half minutes until we move on. Anybody have any issues? Everyone good?

**Guest 2** [24:27]
Slow internet.

**Zach Proser** [24:28]
Slow internet still. Okay.

**Nick Nisi** [24:29]
Yeah. We can give more time. We got.

**Zach Proser** [24:33]
We'll do a queuing system. Everyone turn off their Wi-Fi. One person download packages. Move to theright.

**Nick Nisi** [24:38]
Put it on a flash drive and then we'll pass it around.

**Zach Proser** [24:40]
Yeah. That's that'll be a sneaker net.

**Guest 2** [24:43]
The repo's 77% cloned.

**Zach Proser** [24:46]
Nice.

**Guest 2** [24:47]
Yeah. Get in there.

**Zach Proser** [24:48]
This guy clones.

**Nick Nisi** [24:49]
Whoa.

We will. We, we can give more time.

**Zach Proser** [24:54]
Excellent. These are great numbers.

**Nick Nisi** [25:03]
The end goal of this first step is really just seeing the playground, and we'll kind of show that here in a minute.

**Zach Proser** [25:08]
Yeah.

**Nick Nisi** [25:08]
Uh, but it's there's not going to be any tools or agents or anything yet, and we'll build those out. Uh, but it's just seeing kind of what Mastra gives youright out of the box so that you have everything you need to get going fast.

**Zach Proser** [25:20]
Absolutely.

**Guest 3** [25:25]
That's kind of less press 60. I think it won.

**Zach Proser** [25:27]
Question.

**Guest 3** [25:28]
Press 60 or 75?

**Zach Proser** [25:29]
Yes. Why, why Mastra compared to all the other frameworks? I can tell you why I'm excited about it.

**Guest 3** [25:33]
Why?

**Zach Proser** [25:34]
So the first couple of things I heard were pure TypeScript,right? And I'm already kind of bought into that with I like compilers finding my errors before I ship them. Um, then there's, uh, the Vercel AI SDK that they I think that the team wisely chose to build upon.

Um, my experience with that has been excellent. It's kind of mind-bending to kind of wrap my head around. But the idea that I can multiplex between any LLM provider. I mean, when, when GPT-4.0 came out, I shipped a two-character change in a PR, and my entire pipeline got way smarter.

And that was the day where I was like, "This, this SDK." Then I found out that the, you know, Mastra came out and it was like Vercel AI SDK and, uh, pure TypeScript. And, uh, I can tell you that there's a ton of stuff that they put in there, like including evals that are just, uh, baked in.

So that's one of OpenAI's own recommendations about theright way to deploy agents at, at enterprise and at scale, uh, is to start with a evaluated pipeline. Um, and I can also I can tell you from working in, like, vector database companies too, that that's people that are actually in prod are, are using evaluations to determine the health of their pipeline and the health of each individual generation.

And Mastra has those baked in. So it's like, import and then, like, also evaluate my pipeline. And then finally, so it's like because of that, um, and it's on the Vercel AI SDK, then being able to deploy it quickly, um, and then have a good experience that way too.

And, and honestly, what we'll see just in the, the local, uh, playground was pretty great. Um.

**Nick Nisi** [26:57]
Okay.

**Zach Proser** [26:57]
Yeah. Very complete in my in my experience. Like, every everything has issues, but that was the experience I've had with it so far.

**Nick Nisi** [27:03]
And real quick.

**Zach Proser** [27:04]
Yep.

**Nick Nisi** [27:05]
Uh, I think that for me, like, TypeScript's moving fast with that. I still don't have to figure out what pip is, so it's prolonging that.

**Zach Proser** [27:12]
Prolonging that.

**Nick Nisi** [27:14]
Um, but also, like, we had how many of you have had these, like, come-to-AI moments within your company? Like a big, "Hey, we're going to have everybody, we're going to work hard with AI."

**Zach Proser** [27:24]
We're all doing AI now, whether you like it or not.

**Nick Nisi** [27:25]
Yeah. That Shopify post came out and then, like, we had it. Uh, my wife's company's had it. Like, everybody that I've talked to, like, "Oh, we're, we're going to have this meeting where we're going to do everything with AI.

We're going to see how AI can, you know, solve every problem in every domain." And, um, after we had that, we did like an open workshop thing and we had, uh, like immediately we showed Mastra and then we had like 10 people just like.

**Zach Proser** [27:49]
10 individuals.

**Nick Nisi** [27:49]
Start going off with 10 individual demos and it was just like fast.

**Zach Proser** [27:52]
That'sright. And because they successfully built the exact workflow they were looking to build. And so then for me, the reason I'm the most excited about that piece of it is that I think it's an ideal platform for internal tooling.

I think all of us are rapidly experimenting with this stuff. And, you know, do I want to live in a world where Nick's writing bespoke LLM scripts while I'm sleeping and I wake up and I'm like, "What is this spaghetti mess?"

And he has to do the same with my, you know, crap or, or are we all using yeah, I'm bad. Or are we all using like, you know, an actual framework that we can agree on certain primitives? It makes us faster to use.

There's, there's even forethought I can see, um, in, in the way it's been organized so that once you've defined an agent, a different project can reach in and call that agent via code or API. So, um, all those reasons, I'm kind of excited to use it as sort of a unifying internal tools platform.

But we'll see. Uh, yes. Yes, sir.

Yeah. Just a quick question on steps.

Yeah.

This might be a little premature, but, um, step one, number five, where you so you create a workflow, you pass a discrete array of steps.

Mm-hmm.

Um, which of which there's only one, which makes sense to me. And I would think you would just I guess I'm asking the desi the design decision behind then needing to just also explicitly do test workflow.then and then invoke the step.

Yeah.

Is that not implicit in the array of steps?

That's a good question. The commit the ergonomics around are you asking about the ergonomics around the commit method itself? Like why I actually have to find the commit?

Right. Why, why explicitly say, "Here's workflow."

What is what is going on? What's the gentleman, what's the decision behind that? No, I'm just kidding. I'm sorry. I actually don't know. Um, I've looked at it recently and I actually checked that API today.

I'm just curious.

Because I was curious about the same thing. I was like, "Oh, does it return?" I actually argued with Nick because he correctly said, "No, it commit finalizes your pipeline, returns it." And I argued with him incorrectly.

Gotcha.

So I'm not certain. What's the what's the final idea behind commit?

**Guest 2** [29:34]
Uh, that then I mean, so for sort of the local dev server, it's kind of like a visualization. Um, so the commits like page.

**Zach Proser** [29:44]
It's synchronized. It's synchronized. It's synchronized. Okay. Got it. It's the final step that's like actually creates the whole object and adds the steps and returns the final output. Okay.

Gotcha. But why sorry, I don't mean to berate this, but like why the .then and then the name of the step? Is that is that step not already in the workflow steps array there?

**Guest 2** [30:02]
Uh, so we should be able to, um, so there's, there's sort of two ways of defining steps.

**Zach Proser** [30:09]
Can you I'm sorry. Would you mind coming to the mic? Just so we sorry. I apologize.

**Guest 2** [30:12]
No, no, no.

**Zach Proser** [30:16]
So there's, uh, there's two ways of, uh, coming to of defining, um, steps. You can either give it a step array, um, which as you might expect is kind of, um, the most a lot of times we just have these linear pipelines of steps.

And so you can just give it a step array and it will execute things in a linear pipeline. Um, or if you want to add sort of like branching and conditionals and a lot of that kind of thing, um, we have this like fluent syntax where you can do .then and then you can do .if.

**Guest** [30:45]
.branch.

**Zach Proser** [30:46]
.do.y and like loop and, and do conditionals and, and all the fun complex stuff. You know, but a lot of times you're just you're running through a pipeline. So the steps.

Do you do you also just do test workflow.commit and then it would run that.

Yeah.

All the steps?

Yeah. Yeah, yeah, yeah.

Okay.

For, for what it's worth, I have also recently had the experience where I had built two different GenAI apps like experimentally internally and realized that I had implemented a pipeline concept in both of them. And that was another reason why I was like, "Okay, I'm excited now about a single framework with one pipeline."

**Nick Nisi** [31:16]
We're learning.

**Zach Proser** [31:17]
Yeah.

How are we doing on time?

Okay. We mostly got packages installed or still waiting on code.

**Nick Nisi** [31:28]
Anybody get 200?

**Guest 2** [31:30]
Yeah. Yeah. That added to the odds.

**Zach Proser** [31:32]
Nice. Nice. Okay. Excellent. And you're selling access, uh, for $5,right? Okay.

**Guest 3** [31:46]
Do we have any more time?

**Zach Proser** [31:48]
I think we're good.

**Nick Nisi** [31:54]
Allright. We'll kind of show what's, what's happening. Um, feel free to keep working on it. It's not, uh, you'll be able to catch up quickly or you can skip to the next step, which I'll show here. Um, oops.

Allright. So I'm going to just, um, switch over to steps/step, uh, one, which is the end of step zero. That's where it would bring you to. Um, and so

I don't know what's happening. Okay. Nope. I'm not on.

**Guest 3** [32:29]
I think it's like switch.

**Nick Nisi** [32:33]
There we go. I didn't know how to spell switch apparently. Um, okay. So once you have it all installed, then, uh, you really should just have kind of a Mastra index. It also has memory, um, set up for you automatically.

Uh, but this just creates the Mastra instance. Um, currently we have nothing enabled, no agents, no workflows, uh, no tools. And that's okay. And when we oops. When we run npm dev,

uh, we will get this URL, localhost:4011. And if we go there, this nope. This is the, the end of step one, which is maybe there we go. Uh, you look here, you have agents, networks, tools, MCP servers, workflows, and then this runtime context.

And currently we have nothing in there. Um, and that's currently by design because we've done nothing. We've just gotten the project set up, but now we have all of these tools to help us with building along the way.

And so, um, once you get this set up, uh, you should be able to switch over to step one or just continue on in your branch. I think it might actually be the same because it's just npm installing.

Um, and then you should be able to continue on in the, uh, the steps.

**Zach Proser** [33:56]
Uh, this is I'll just say that this is one of my favorite things though about Mastra, like the local playground. And if you look in the console, you'll see that there's also a couple other things spun up. There's the API endpoint.

There's also an, uh, Swagger spec that you get automatically. And so, like, the amount of thought that's been put into this, and you can see how once everyone's comfortable with it, you could, you know, very rapidly deploy applications in a standardized way that other tools can consume, uh, reliably.

So that's, um, another exciting feature of it. And again, this is like without us having built anything yet.

**Nick Nisi** [34:27]
So the goals that we're going to do in, in step one now, uh, is just create our first workflow. And this is just a very basic workflow. We'll end up throwing it away, uh, but it's going to be one workflow with a single step and it's not going to do anything else, but we'll see kind of the power of it.

### Step 1: Workflow

**Nick Nisi** [34:41]
Uh, and then we'll build upon that in the next step to add additional steps. We're using steps a lot. Um, and then we will, we'll, uh, be able to put that together into a full workflow in the next step.

But we will more importantly, we'll be able to see it in the Mastra playground and start really seeing the power of that.

**Zach Proser** [35:00]
Yep. Testing.

As always, any questions, uh, feel free to shout them out. Anyone get stuck, just raise your hand.

**Nick Nisi** [35:23]
Yep.

**Zach Proser** [35:23]
We'll run past.

**Nick Nisi** [35:26]
We really tried to give ample time for this, not, uh, not including Wi-Fi issues. Um, and so, um, yeah, if you have questions, we'd love to, to chat or just ideas of this stuff because I think there's a lot of really cool powers, uh, that you can do with this.

**Zach Proser** [35:41]
Sure. Do you want do you want to hop, hop up to the thanks.

**Guest 2** [35:45]
Uh, I'm just kind of curious since you're upset using Vim and kind of deepen the hole.

**Nick Nisi** [35:49]
Yeah.

**Guest 2** [35:49]
Have you played around with any of like the AI integrations into Neovim? Kind of like how what's your current workflow?

**Nick Nisi** [35:56]
Yeah.

**Guest 2** [35:56]
What are you kind of adopting?

**Nick Nisi** [35:58]
I thought nobody would ask.

**Zach Proser** [36:00]
What have you done?

**Nick Nisi** [36:01]
Um, yeah, I'm a big fan of Vim. I haven't used Cursor yet at all because it's not Vim. Um.

**Zach Proser** [36:09]
There's Vim mode.

**Nick Nisi** [36:10]
It's not great. Um, but I have played with the tools. There, there's one, I'm forgetting, a goose, I think, that in Vim. I haven't played with that one yet, but it's on my list to play with. Uh, the one that I have played with is Avanti, uh, which I think I have still set up.

Uh, yeah. So it gives you kind of that like chat-like interface here. So I can just start having, uh, a chat with this code. Uh, I don't know.

**Zach Proser** [36:35]
There's also was it NeoAI? Have you used that for Neovim? Even a year and a half ago, you could do that before, before most of the tools allowed you to chat in IDE.

**Nick Nisi** [36:43]
Yeah.

**Zach Proser** [36:44]
Yeah. That's always going to be the benefit of open source. Is it lands first,right?

**Nick Nisi** [36:47]
Yep. Um, but I honestly, like, I didn't like the ergonomics of playing with this and like switching buffers and things like that. And I honestly felt that, uh, for me, uh, a better workflow was just not using this at all.

Uh, I'm also a big TMUX user, so, um, you know, I will have like Vim open and then I'll just open a split and Claude, Claude code, um, gives me that kind of the same thing. And it's often like its own TMUX split.

So I can work in Vim as I normally would without like weird buffer things. And then it's just off doing things and I can, uh, you know, oops, use, um, use TMUX to like full screen Vim when I need it.

Claude's out of the way. And then when I want it, I just bring it back in and go.

I would also be interested in hearing how all of you are using these AI tools just for like not just what you're building, but how you're interacting with them day-to-day because they're changing our workflows. And I feel like everybody's like in their own bubble doing their own thing.

And then we like we have this opportunity to come together and learn like amazing new tips and tricks.

**Guest 2** [38:41]
Yeah. I'm all for that. I, I don't know that I'm all for everybody getting on the same, you know, uh, plus.

**Nick Nisi** [38:51]
Yeah.

**Guest 2** [38:51]
I think I think it should depend on, on, you know, product or, or, you know, service or whatever, but, um. I'm, I'm afeared of, of, you know, somebody coming down from on high with like this is the golden framework.

Everybody use this.

**Nick Nisi** [39:07]
Yeah.

**Guest 2** [39:08]
We've been through that for decades.

**Zach Proser** [39:10]
Yep. For sure.

**Guest 2** [39:11]
So that's my personal.

**Zach Proser** [39:13]
You like to mix and match and let everyone kind of choose their own lane. That's exactly.

**Guest 2** [39:17]
Even with coding agents.

**Zach Proser** [39:18]
Yeah.

**Guest 2** [39:18]
I'm, I'm like here and there and everywhere.

**Zach Proser** [39:20]
Yep.

**Guest 2** [39:21]
AI, same thing. Here and there, everywhere.

**Nick Nisi** [39:24]
Yeah. To, to summarize for the video, mixing and matching tools is good. And I think that that's really what is like powering thisright now, especially among like us hackers,right? We're like there's all these cool new things. It's a whole new world of figuring out what to do, how to do it.

And you're not just being prescribed. Oh, just, you know, go use random. I don't want to shame any specific editor, but like.

**Guest 2** [39:44]
Not anybody specifically.

**Nick Nisi** [39:46]
Yeah.

**Zach Proser** [39:46]
Yep.

**Guest 2** [39:46]
But I mean, the leaders come forward.

**Nick Nisi** [39:49]
Yeah, for sure.

**Guest 2** [39:50]
You have those choices, you know.

**Nick Nisi** [39:51]
For sure.

**Zach Proser** [39:52]
Absolutely.

**Guest 2** [39:52]
In the meantime, I'm going to play around.

**Nick Nisi** [39:54]
Yeah.

**Zach Proser** [39:54]
Yeah. It's all about experimentation, I think. Yep.

**Nick Nisi** [39:56]
Yeah. There's all sorts of experimentation, all sorts of fun. Um, and, and the, the winners will bubble up for sure. Um, also, I, I do worry that it's like, uh, you know, the, the first hit is free and then we're, we're all like, oh no.

**Zach Proser** [40:10]
Becoming dependent on it now.

**Nick Nisi** [40:12]
Yes, sir.

**Guest** [40:12]
Uh, question for you guys. Do you have a framework specific like set of rules like that would integrate not that everyone has to use Cursor, but just like also in like, um, at my company, we've started to essentially say, "Hey, here's the top 10 tools that we use and here's Cursor rules to do all those the same kind of way."

And it's not so much trying to like box people in, but it's more trying to say, give them like in Mario Kart, it's like you get the, the three booster packs. It's like how can we give people, people booster packs from the beginning?

**Nick Nisi** [40:44]
Yeah. We, we were talking about this earlier actually with Nick Taylor. Um, we were talking about like Cursor rules growing and evolving kind of like tests. And then it's like this thing that, that evolves with your, your code base to prevent you from doing bad things.

Um, I don't know what that means though 'cause I've never used Cursor.

**Zach Proser** [41:01]
It's not exactly the question you asked, but I will just say that that's also, uh, like when you run, you know, npx install Mastra, it asks you if are you going to use Cursor? Are you going to use WinServe?

'Cause if so, I know I can inject the MCP server for our docs. And then the experience that I had after accepting that, I saw it's like, oh, it enabled that. I checked in my MCP in, in Cursor.

And then that session where I coded, um, there were zero hallucinations. And so that means that every time I asked for a feature, it was one-shotted correctly. Furthermore, because it was in TypeScript, I could quickly lint it and compile it and know it was good.

And so that's almost like I we were almost starting to Nick and I were starting to suspect that MCP might be more powerful because the other problem is that Cursor rules are specific to Cursor,right? So what if like half your team's on WinServe, half's on Cursor?

You know, we've got tons of licenses for Cursor internally, so it's kind of like, but it's not prescriptive. I think the MCP doc server so far is more powerful of a pattern because it is the it's almost like the, the guarantee that the end user dev is going to get your latest docs and is not going to get a hallucination.

**Nick Nisi** [42:05]
And I really wonder if that's like, like there's so much excitement around that. We saw that at MCP night a couple weeks ago. Like there's so much excitement around that. And I'm, I'm just starting to wonder, is it really just because it's like a standard emerging, um, and that's the reason?

'Cause it's, it's very simple. Uh, but it's, it's enabling all of these tools across, you know, it's not just an Anthropic thing anymore.

**Zach Proser** [42:25]
Yep.

**Nick Nisi** [42:26]
Uh, which makes it super powerful.

**Zach Proser** [42:27]
Absolutely. Totally agree. Yes, sir.

**Guest 2** [42:30]
Yeah. I'm not sure if this is a better question for y'all or for the Mastra team, but I saw that Mastra has experimental support for ingest, which is a durable execution backend, but that it's labeled as experimental. And I was curious like how experimental that is 'cause I'm.

**Zach Proser** [42:43]
Great question.

**Guest 2** [42:44]
Really excited about durable execution for agents. You know, if you've read the 12-factor agents manifesto, it's really good.

**Zach Proser** [42:49]
Oh, no. I haven't. Where's that? Who published that?

**Guest 2** [42:51]
Uh, it's on GitHub. Uh, Dex from Human Layer. Um, originally did a lot of the work on that. Um, but yeah, just was curious about jamming on that.

**Zach Proser** [42:59]
Awesome. Great question. Thank you. Unfortunately, we haven't the folks in the room for that. Okay.

**Guest 3** [43:03]
Yeah. I'll, I'll send Dex to shout him out. He'll be happy to hear that. Um, uh, so the we shipped in, uh, sort of a what we call workflows VNext about three, four weeks ago now. Um, the idea being that basically it allows you to have the same syntax, but switch out the, the workflow, um, engine.

So the first, um, the, the first, uh, integration that we shipped, we, we sort of initially had we initially built our workflow engine using XState as a backend because it kind of makes sense. Um, and then we kind of we, we need to make a couple of syntax changes.

And then we also kind of realized that, uh, people started asking us, "Hey, like I love the syntax, but I'd love to have this work with, and I love the visualization in the dev server, but I would love to have this work with ingest or temporal, um, or Cloudflare workflows or dot, dot, dot, dot, dot."

Um, and so we're like, "Yeah, that's a really good idea." So then we shipped workflow VNext that was like again, three, four weeks ago. And then now we're just starting to, you know, do the list of integrations. And so ingest is first.

Um, it's you should use it. Like it's experimental 'cause we shipped it like a week ago, but I would be surprised if the API changed after a week from now.

**Guest 2** [44:17]
Thank you.

**Zach Proser** [44:19]
I actually have a question. Um, just curious, what how is the team thinking about, uh, deployments going forward? Like are you targeting specific platforms first? Are you going serverless first? Like are you thinking about trying to go everywhere?

Like what's top of mind for you there?

**Guest 3** [44:32]
Uh, so by default, um, by, by default, like Mastra will bundle into a Hono server. Put the Hono server in a Docker container and put it on EC2 or DigitalOcean or wherever you want to put, uh, put it.

We also have adapters, uh, for Cloudflare, um, Netlify or Sal. Um, we also heard on, uh, Mastra Cloud. Um, we also so those are kind of the two, um, you know, the, the two we also like Hono's not a, you know, if you want to use Hono great, but also you can put it in Express or, um, whatever, whatever you can, um, you know, put it in the backend of a, you know, Next.js operator app, you know.

Uh, in general, I think like you can't really I mean, you can call it open source and it cannot work everywhere, but like these days you should actually make it work everywhere. So that's just our philosophy on things.

**Zach Proser** [45:23]
Yep. Awesome. Thanks. Yes, sir.

Certainly. Yes.

Hi. Hey.

Okay. And then, uh, what's the full error?

**Guest 2** [46:07]
I was going to say I heard my hands shirt for you.

**Nick Nisi** [46:10]
Oh, nice. Yeah. What are your MCP shirts?

Such a fun demo.

**Guest 2** [46:55]
So we have 74 minutes.

**Nick Nisi** [46:57]
Yep. I think we're good.

**Guest 3** [47:15]
Um, I had a question. So I saw I was just reading ahead a little bit. Um, so I noticed that you sp you're specifying like Zod schemas, but also adding instructions to the prompt, um, to kind of follow that schema.

**Zach Proser** [47:29]
Yep.

**Guest 3** [47:29]
So I was wondering, is there anything sort of inbuilt into the framework that ensures that the output of each step matches the schema kind of by default? Because what if like you specif like, you know, let's say in the prompt you've you kind of forgot what your schema was and you like how does it reconcile that as well?

**Zach Proser** [47:48]
Yeah, great question. Um, so I, I think the answer to that is essentially the Zod schema,right? And the way that I look at that is, um, like LLMs are non-deterministic. That's part of why we love them. But then it's at the point where they're so useful, we're trying to get specific JSON out of them while coding too,right?

And the Zod, um, package and, and like validation library is now ubiquitous in AI engineering, at least in JavaScript. Like you'll see it literally everywhere. So it's doing the work under the hood. Um, my understanding is that the OpenAI team couldn't get to a certain level of accuracy without adding on top of training the Zod, uh, runtime validation, which can also do coercion into theright types.

So that's kind of doing the heavy lifting there. Um, I don't think there's anything framework specific that's doing structure generation, but correct me if I'm wrong, but you can define like the transform steps between the workflow.

**Guest 3** [48:40]
Um, yeah, there's actually we actually just did a blog post on this, but it's funny that the models don't always actually respect the schemas that you give them, especially there's some, you know, yeah, okay, z dot string, like they'll respect that, but if you, you know, z dot string dot, you know, length, you know, four or whatever, like they're not necessarily going to respect that like level of, of nuance.

Um, so we actually added, uh, uh, we, we added sort of for, for this is especially challenging. This is mostly works, works reasonably well with structure generation. It's more challenging with, with tool calling, um, for reasons that are not quite clear to us, but we're clear when we ran 16, uh, you know, uh, with the 30 schemas across 16 models.

So we added like a tool compatibility structured output layer that reduced that like reduced the error rate a lot.

**Zach Proser** [49:32]
Um, so in addition, on top of the side, like there's also Mastra side like optimizations to ensure structure generation.

**Guest 3** [49:39]
The, the longer version of this is in a blog post we published over the last week if you're if you want to dive into the, the details.

**Nick Nisi** [49:45]
And I, I don't know if it's related to this, but one thing that we were running into constantly, uh, while we were developing this was, um, we were like, as you'll see, we were accidentally sending, sending like a base 64 encoded image, uh, which was huge and, and failing, and it would retry a lot.

So I assume that there's some retry logic built into it to if like it wasn't getting back what was expected from the schema. Um, is it built into the, the schema validation piece?

**Guest 3** [50:10]
I mean, I would assume probably what was happening was that the agents has like a max steps.

**Nick Nisi** [50:15]
Yeah.

**Guest 3** [50:15]
And so you was running until in a loop until it hit max steps.

**Nick Nisi** [50:20]
But I, I guess what I'm asking is if you, if you said, "I want a string that's length four," and I, it gave back a length five, would it automatic would Mastra automatically retry?

**Guest 3** [50:28]
There are cases in which it would, it would retry. I don't know if that particular case is one of them.

**Nick Nisi** [50:33]
Okay.

**Guest 3** [50:33]
Yeah.

**Zach Proser** [50:35]
Does that?

**Guest 3** [50:35]
Yeah, that does answer, um, my question.

**Zach Proser** [50:37]
Cool.

**Guest 3** [50:38]
To kind of to add to that with if you were to specify, uh, certain things into the schema that aren't inherently like supported, for example, the, the length, would that, um, would that be kind of error? Like would that error be displayed in compile time at all?

**Zach Proser** [50:55]
Uh, let's try it. I don't know. I, I would expect Zod to coerce it actually at runtime, um, but I'm not sure.

**Guest 3** [51:04]
Usually the model will fail silently and just give you an output that doesn't conform to the.

**Zach Proser** [51:10]
Okay.

**Guest 3** [51:10]
To the, um, to the, uh, to the schema. And we kind of made a decision, should we error or not? And we're like.

**Zach Proser** [51:19]
Makes sense.

**Guest 3** [51:20]
You, you maybe you should decide if you want to error.

**Zach Proser** [51:22]
Yeah.

**Guest 3** [51:22]
Allright. Thank you.

**Zach Proser** [51:23]
Thank you. Yeah. Great question.

Sorry, just talking about deployment again, I, I noticed the serverless deployments, there's no like AWS Lambda or anything. It's all through Netlify or.

Yeah.

**Guest 3** [51:43]
Um, there's also an AWS Lambda, um, deployer that the community had.

**Zach Proser** [51:48]
Okay.

**Guest 3** [51:48]
If you, if you Google, you'll probably find that you have issue.

**Zach Proser** [51:51]
Okay. And how does the, the serverless deploy work? Does each step kind of map onto its own Lambda function or how's that?

**Guest 3** [51:58]
Yeah. I mean, we just sort of pack bundle it in a, in a, in a, a platform specific way that works for those platforms. So like Cloudflare has like a 300 meg, um, uh, bundle size limit. And so we need to do some specific things to get down under that.

**Zach Proser** [52:16]
I guess I'm just meaning in terms of the runtime model, each step kind of maps logically to a function or are you putting multiple steps inside a single function?

**Guest 3** [52:24]
I did not work on that part of that.

**Zach Proser** [52:26]
Okay.

**Guest 3** [52:26]
So I was just asked for it.

**Zach Proser** [52:27]
I'm assuming they're all bundled into one, but could be wrong.

**Guest 3** [52:30]
I mean, I, I think they are all bundled into one, but yeah.

**Zach Proser** [52:34]
Really? Okay.

**Guest 3** [52:35]
Yeah.

**Zach Proser** [52:35]
That would just be weird for long running stuff 'cause there's timeline or something.

**Guest 3** [52:39]
Yeah. I mean, we, yeah, that's yeah, we, I think we, we, we all, we bundle it all into one. I'm pretty sure.

**Zach Proser** [52:44]
Okay. Thanks.

Cool.

**Nick Nisi** [52:57]
How are folks doing on step, uh, step one?

**Zach Proser** [53:01]
Good.

**Nick Nisi** [53:01]
Good?

**Zach Proser** [53:02]
Awesome. Okay. Allright. We got functioning Wi-Fi. Excellent.

**Nick Nisi** [53:07]
So we can kind of show that. I'll go to, um, step two. Did I spell thatright? Yep. Uh, which is the end of step one. Um, and so now like looking at the code, uh, we've got if I update this, we've now got our test workflow in our Mastra object.

### Step 2: Pipeline

**Nick Nisi** [53:29]
Um, and then we've got a workflows directory with the test workflow and the schema for it. And it's just going to have you, um, basically extract from the user input, uh, the type of frustration that you're experiencing. And the really cool thing now is like without building anything else, uh, we can go to our Mastra playground, refresh it, and go to workflows.

And now we've got our test workflowright there. And you can see the graph here isn't very impressive with just one step in the workflow, but it's there. And we can see that it would accept a raw user input about work frustration.

So does anyone have a work frustration?

**Zach Proser** [54:11]
Use your, your boss by name, please. Please state the company you work for and your boss's name. We won't tell them.

**Nick Nisi** [54:20]
Conference Wi-Fi sucks. Not really. This is a great job, AI engineer.

Um, in general, sometimes though. So we can see just by calling that, it turned green in the, in the graph. And you can see that we click on it and we can see that that's the input that we gave.

It ran the step and it gave us back this output, this, uh, JSON object. Uh, and we can see with the text, conference Wi-Fi sucks. The overall mood is frustrated. I think that's accurate. Uh, and the analyzed frustration is technology.

We're so we're frustrated about technology in this room.

So in the next step, where did I go? Oh yeah, here we go. Uh, in the next step, um, we're going to create our frustration schema with Zod, uh, build our first workflow step. No, that's what we just did.

I have my slides backwards. In this one, we're going to, uh, create all of the workflow steps. Uh, we're going to chain them together with data mapping. Uh, and then we're going to successfully generate a meme. Uh, and we'll understand the composition of that workflow as we go.

Uh, it still won't be like the perfect end result, but it will give us the full workflow where we can like kind of plug it in, in that, uh, workflows tool and see it go through all of the steps from our user input to an actual meme that's, uh, uploaded to image flip.

So you can skip to step two, uh, or continue on in your branch and, uh, continue from there.

**Guest** [59:26]
Oh.

**Nick Nisi** [59:28]
Yeah.

**Guest** [59:28]
I'm not sure what I'm looking at.

**Nick Nisi** [59:34]
Uh, sorry, can you repeat that?

**Guest** [59:35]
I, I did the, uh, uh, frustration,right?

**Nick Nisi** [59:39]
Uh-huh.

**Guest** [59:40]
Put in a topic, ran it, got back to blue box. It's highlighted.

**Zach Proser** [59:45]
Mm-hmm.

**Guest** [59:45]
It says input, output, so I put it on output.

**Nick Nisi** [59:48]
Yep.

**Guest** [59:49]
So I, I got a JSON object.

**Nick Nisi** [59:50]
Yep.

**Guest** [59:51]
Right? And, and so what is this? Is this something, an object that I would then pass to another pass on?

**Zach Proser** [59:58]
Precisely. Precisely. And it's justright now, we're just in the early stages of showing exactly that and that you could have structured this object however you want.

**Guest** [1:00:06]
Right.

**Zach Proser** [1:00:06]
Um, but in our case, because of the pipeline that we're building, this is the data that we found valuable. And so we formed it this way and then we're going to pass it further into the pipeline to do more work based on that.

**Nick Nisi** [1:00:15]
Yeah.

**Guest** [1:00:16]
And so, um, the output is, is, uh,

you can change it.

**Zach Proser** [1:00:25]
Totally.

**Guest** [1:00:26]
I mean, so I.

**Zach Proser** [1:00:26]
It's your, it's your arbitrary schema.

**Guest** [1:00:28]
If I want Markdown, if I want JSON, if I want whatever.

**Zach Proser** [1:00:31]
Yep. Yep. Absolutely. And that's part of what Zod will help you do too 'cause you can define like, you know, maybe you have some giant object and, you know, this may fields and this is a string and this is an array of strings and all that.

Um, but it's really for you to compose together the exact structure that you need.

**Guest** [1:00:46]
You would, you would have to know what the next stage is.

**Zach Proser** [1:00:49]
Yeah. Yeah.

**Guest** [1:00:50]
So there's a little bit of forethought.

**Zach Proser** [1:00:52]
Absolutely. The forethought or the third time you've written that app. You've had enough. You've had two shitty first drafts and you're ready for the third. Um, sometimes I do it that way, but yeah, sometimes I'll plan it out and be like, what's the logical breakdown for these steps?

Yeah.

**Nick Nisi** [1:01:05]
Yep.

**Zach Proser** [1:01:07]
Yep.

**Nick Nisi** [1:01:08]
The main point of this one is to just determine like the level of frustration and what you're frustrated about so that it can be fed in in the next step to, uh, Image Flips API to get back an, an image template, um, that or a meme template that would accurately fit that.

And then we kind of shoehorn it in from there.

**Zach Proser** [1:01:27]
Totally. But the, but again, the, the like I guess the mental mapping that we're all trying to do here too is like to think about how do we take this home and like turn it into something that actually solves a problem or automate something at work so we get promoted before the machines come for us, you know?

That's the general.

**Guest** [1:01:44]
It's a race.

**Zach Proser** [1:01:45]
Pretty much.

**Guest** [1:01:45]
It's a human race.

**Zach Proser** [1:01:46]
Yeah, I think so.

**Nick Nisi** [1:01:51]
And just so we're level setting, this is like the memes that you've seen. Image Flip is a, they have an API for not only finding great memes, uh, but also just having blank templates. So they, they can give us back information about this, the rock meme, the rock, uh, in a taxi meme or whatever.

And those boxes are blank. And then you can post to their API with whatever you want it to say in each of those. And it'll tell, tell you like, oh, I have three boxes. And, uh, then you just post in there.

And that's what we're eventually going to be doing in one of these steps.

**Zach Proser** [1:02:22]
But that's, that's a perfect real world example. It's like knowing those box slots is critical to the rest of the pipeline. If any other step in the pipeline didn't know the box slots correctly,right? Like that'd be a problem.

So you can define that in your schema and make sure that it's there. And like that's part of it. Yeah.

**Guest** [1:02:35]
Okay.

**Zach Proser** [1:02:36]
Yep.

**Nick Nisi** [1:03:08]
Putting this workflow together too is probably the biggest of the steps.

**Zach Proser** [1:03:12]
Yep.

**Nick Nisi** [1:03:12]
Um, once we have this, we'll, we'll create an agent in the next one, and that's pretty straightforward, uh, as you'll see. Um, and so there's, there's time built in also to, to play with this, experiment, tweak things like the, um, like the prompt.

**Zach Proser** [1:03:26]
Temperature.

**Nick Nisi** [1:03:27]
Temperature, things like that.

**Zach Proser** [1:03:28]
Yeah. We'll, we'll look at that in the playground. That's the cool thing is like once we get the agent and start chatting with it, um, you know, like there's just a, a iterating locally is so much faster,right? And that's really what the, the playground's about.

So you can even tweak the prompt on a per request basis. You can change temperature, model, whatever.

**Guest** [1:03:59]
Can you get help with the UI?

**Zach Proser** [1:04:01]
Certainly. Yep.

**Guest 2** [1:05:06]
That's what I did too. It's just so weird. But try that on the other trip.

**Guest** [1:05:10]
It's not unusual.

**Guest 2** [1:05:12]
Okay.

**Guest** [1:05:14]
So I was looking at that.

**Guest 2** [1:05:17]
So it's like

slowly. That's great. And from there, you once you get to the point where you remember the answers, then once you get to stuff that was, um,

what I thought is that. So you might not have that back. You are correct at that point in memory. And people like to do work or do you? Okay. So yeah.

**Guest** [1:05:51]
Precisely.

**Guest 2** [1:05:54]
Correct. And, uh, now there are other, other for example, for example, the actions are there. And actually we're looking at it in our timeline. And it's looking easy to work. It's a work result,right? But the reason we did this here is that we're not able to do it.

Like you said, we have this chat service. It's

if you can, yeah, and if you didn't have that file open before we added it, you, um, you would chat it and then you'd like either read it or you'd go to the,

uh, the, uh, the, uh, the, uh, the, uh, the, uh, the, uh, chat account.

**Guest** [1:06:42]
Yeah.

**Zach Proser** [1:06:51]
Please.

We got it. We have it.

**Guest** [1:07:07]
Oh.

**Guest 2** [1:07:07]
And why?

**Guest** [1:07:10]
I think.

**Guest 2** [1:07:12]
Okay. Good. Uh, did you make a move?

**Guest** [1:07:16]
Nope.

**Guest 2** [1:07:16]
Okay. Probably that. And that's the, the, the other trick is when you get the answers, it's not really knowing.

**Guest** [1:07:25]
Okay.

**Guest 2** [1:07:26]
And the option of that.

**Guest** [1:07:27]
Okay.

**Guest 2** [1:07:28]
So I need to go to image flip.

**Guest** [1:07:29]
It's good if I have the, uh, the.

**Guest 2** [1:07:32]
There's Google and GFO history.

**Guest** [1:07:35]
I just need to.

**Guest 2** [1:07:36]
Their dashboards.

**Guest** [1:07:37]
Stop.

**Nick Nisi** [1:07:39]
Does it sound like the credentials are being rate limited?

**Guest 2** [1:07:41]
Yeah. So in general, if you get an error.

**Zach Proser** [1:07:42]
Uh, at the generate meme stuff and you don't get a clear error message and you have not created an image flip username and password, that's likely the problem.

**Guest** [1:07:51]
I did it first.

**Zach Proser** [1:07:52]
Sweet. Allright. And then if you sign in with Google, which is the same thing I did, that's fine. And then you just have to go into image flip settings after and set a password because you're OAuthing in, so you didn't get to set a password.

**Guest** [1:08:05]
Right. Right. Okay.

**Zach Proser** [1:08:06]
So the complexity is in the UI of image flip. Just.

**Guest** [1:08:10]
Thank you.

**Zach Proser** [1:08:11]
Yes. Absolutely. Let me know if you have another issue. Yes.

**Guest** [1:08:14]
Do we need to set it?

**Zach Proser** [1:08:16]
So, um, in our testing, like, and also there, there's a public, I think it's for image flip, there's a public key that floats around. So there is an anonymous key that's public. Like Git guardian will flag. Others consider it a secret, but apparently it's not and people are using it.

And the reason that we finally asked people to make their username and password is that it gets you a significantly higher rate limit. And so you're less likely to run into this issue in the workshop at least.

**Guest** [1:08:39]
But the error is that.

**Zach Proser** [1:08:40]
Yeah, the error. The, uh, what's, what's the specific error you're getting? Is it opaque?

**Guest** [1:08:45]
Actually, now, now I'm getting just, uh, like 20. Uh, but I don't know. Just like cannot run.

**Zach Proser** [1:08:53]
Oh, if you like, are you on the which branch are you? Are you on the.

**Guest** [1:08:56]
I was, I guess I was

on.

**Zach Proser** [1:09:02]
Okay. I think we're on two. What, we're on two?

**Nick Nisi** [1:09:05]
Mm-hmm.

**Zach Proser** [1:09:05]
Yeah. I think so try doing Git switch and yeah, just do two. I'm going to just stash all that stuff first. Yeah.

**Nick Nisi** [1:09:15]
You have no idea the struggles of trying to do a workshop with, with when API keys are involved. Uh, we originally had a step that it would not, it would take an inspiration from an image flip image and then generate a new meme.

So it was a completely unique meme. Uh, but in order to do that, you would have to go in and verify your OpenAI account, which means like you'd have to scan your passport to be able to do it.

We thought that might be a little much to ask in this workshop.

**Zach Proser** [1:10:12]
Can, um, can you guys say more about like how you're, I guess, like interacting with these workflows and agents like in the cases you've seen? You said something about Vercel. Like are you deploying them and then contacting them through like an API call or like are they actually embedded into your application?

Yeah. Um, what I'm primarily doingright now is, uh, you're still using the Vercel AI SDK. So everything I've got like at least at work that's deployed already, that's mostly Vercel AI SDK. And then we're building a ton of like internal tooling with Mastra that started like two, three weeks ago.

And most of our stuff goes to Vercel, um, just 'cause we already had that and it's pretty fast. Um, and then most of the things I've built so far are web applications that might have a pipeline. So there's a UI and there's still a user kind of requesting generations and asking for things.

Um, what I think would be super cool and powerful though is like the, the workflows expose like an API endpoint to just start them and hit them from anything. And so I think that's also like a pretty powerful pattern.

I've not really used it really fullyright now in prod yet, but that's, um, something I would think about for sure. Like cron jobs almost. Workflows that need to run like every night, you know, maybe have a cron that fires that or something.

Allright. Cool. Thanks.

Yeah. Great question.

Allright. We got about five minutes and then we're going to move to next step. So if anyone's stuck on anything or has questions, don't be shy.

**Nick Nisi** [1:12:06]
Does anybody have the memes generatingright now through the workflow?

**Zach Proser** [1:12:09]
Allright. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13.

**Nick Nisi** [1:12:15]
Nice.

**Zach Proser** [1:12:15]
That's amazing.

**Nick Nisi** [1:12:17]
Post some of your favorites in the, in the Slack.

**Zach Proser** [1:12:19]
Yeah. Uh, there's no filters left on them. So if you like what happened, it's, uh, we did it. And if you are offended, it's not our fault.

**Nick Nisi** [1:12:29]
This is the, when you're dealing with memes like this, it really brings out the non-determinism of, of this. If it generates offensive ones, we tried to, to curb that, but also these AIs are not great sometimes.

**Guest** [1:12:47]
People who initiatively want to raise their hands, I'll go around and give you guys folks.

**Zach Proser** [1:12:51]
If you want a, yeah, a free, a signed. Are we talking autographs here, Sam, or?

**Guest** [1:12:54]
Ooh. Oh, autographs.

**Zach Proser** [1:12:56]
We're talking autograph copies. Are they first edition or second edition?

**Guest** [1:12:59]
Uh, first edition.

**Zach Proser** [1:13:00]
Autograph first edition from, from the CEO of Mastra itself. If you, if you got a meme working and you want, or you just want a book, raise your hand. Excellent.

That's pretty offensive. That's pretty offensive, Nick.

This, this gentleman would like a book as well.

**Guest** [1:13:41]
Awesome. Thank you.

So this is the Bible. This is the Bible.

**Zach Proser** [1:13:51]
On, on building. On, yeah, on building agents in TypeScript. Got it.

Oh, these are all, this is amazing.

Yeah. I got some pretty racy ones by saying, "Why did they put a systems engineer on an open floor plan with the sales folks that are screaming all day?" That's a fun prompt.

I love this.

That's awesome.

Every project is high priority.

Yes, sir.

So I come from a data engineering background and there's something called DAGs in Airflow, which are for whatever reason culturally they've caught on. Um, as you guys have designed workflows, have you thought of DAGs? Are they similar, dissimilar?

Are you talking about direct-to-day cyclic graphs?

Yeah. Control, what does the control flow look like for workflows?

So far, uh, stuff that I've, I've seen, you know, supported by the semantics of like a, a Mastra pipeline. Honestly, um, to be perfectly frank, the place that my mind goes with that is just graph RAG, like a graph plus retrieval augmented generation.

So like some vector database plus a graph, knowledge graph to like do traversal, um, to also answer like structured questions about entities in addition to like semantic search capabilities. Um, that's honestly what I've built mostly or seeing people kind of like, uh, like positing is going to be a next-gen architecture.

But so far what I've needed has just been pretty simple pipelines. Basically run these steps, branch over here if this happens. Um, you know, I see the DAG is like, that's like Terraform in my mind from, from DevOps like land of like it must proceed this way and the entire thing fails if, if like node three, uh, is unhealthy kind of.

**Guest** [1:16:00]
So in my workflow, I see like success instead of one, two, three are super expensive.

**Zach Proser** [1:16:07]
Uh-huh.

**Guest** [1:16:08]
Like an LLM perspective.

**Zach Proser** [1:16:09]
Yeah.

**Guest** [1:16:10]
Is it possible to trigger just step four?

**Zach Proser** [1:16:13]
That's a great question. We were actually, Nick asked if we could, uh, trigger a specific step. I'm not sure. But the other thing I'll say is that in those cases, that's the other reason I love the pipelines and also even just the concept of steps and agents is 'cause I can do a specific model for each one.

So like extracting frustrations is like that's pretty simple and should be fast and cheap. So it's like do 4.0 or even something simpler or maybe even get away with like a 7 billion parameter model that's deployed on like Cloudflare workers,right?

And then which it's like essentially free. Um, that's like, and that, that question by the way, this is like the, uh, like how do youright-size AI application workloads? Like that is top of mind for everybody now. Everyone's asking that question.

It's like how do I get the infra to be what's correct for the workload I have? I think everyone's trying to figure that out.

**Nick Nisi** [1:16:56]
And, and another thing, like you can explore different ways of doing this. Uh, when we first started with this, we had all of these steps as tools and then kind of let the AI decide when it should call them.

Um, so that could be another approach depending on if it can intelligently skip steps, um, it might be able to do that.

**Zach Proser** [1:17:14]
Um, there was a question. Is this is in our chat,right? Or is it, is it, is I'm looking at okay. So there's a question is, is there a way to implement or configure caching with Mastra? I think the answer is yes.

Yeah, for sure.

**Guest** [1:17:26]
Yeah. This, so I, I did, I did implement the, uh, image flip method.

**Zach Proser** [1:17:31]
Mm-hmm.

**Guest** [1:17:32]
And I, and I tried a decent improvement.

**Zach Proser** [1:17:36]
It's the same here. Show me the, your .env file if you would.

Okay. Yeah. Okay.

**Guest** [1:17:50]
Yeah.

**Zach Proser** [1:17:53]
Yeah. Right.

**Guest** [1:17:55]
That looks great to me.

**Zach Proser** [1:17:57]
Assuming those are your actual creds.

**Guest** [1:18:00]
Yeah.

**Zach Proser** [1:18:00]
And then the other thing is did you, uh, did you restart and finish?

**Guest** [1:18:04]
I, I saved it and then I, and then I, uh.

**Zach Proser** [1:18:11]
And I'll use a new password combination.

**Guest** [1:18:14]
So it's still saved.

**Zach Proser** [1:18:16]
Oh, so restart it now 'cause I bet you did you update env while that was running?

**Guest** [1:18:22]
Correct.

**Zach Proser** [1:18:22]
So if you restart it, it should, um, pick up the new .env and let's see if it's the same or not.

**Guest** [1:18:28]
Okay.

**Zach Proser** [1:18:32]
Yep.

Yep.

Yep. Exactly. Yep.

**Guest** [1:18:48]
Uh, what did I say?

**Zach Proser** [1:18:50]
Bad food. Yeah.

**Guest** [1:18:53]
I thought it was because it was two words instead of one.

**Zach Proser** [1:18:56]
Am I still have a, is there an extra space anywhere? And 'cause I had that issue even after I had the correct values. Like there has to be.

**Guest** [1:19:06]
Yeah.

**Zach Proser** [1:19:07]
Still saying that.

**Guest** [1:19:08]
How long should it take for this shirt? Like the MCP shirt?

**Nick Nisi** [1:19:11]
Oh, uh, it'll take a, a few weeks probably.

**Guest** [1:19:14]
Oh, no. I mean like.

**Nick Nisi** [1:19:16]
Oh, is it not going through? Did it try and execute the tool?

**Guest** [1:19:20]
Yeah.

**Nick Nisi** [1:19:21]
Uh, what?

**Guest** [1:19:22]
Try a different key?

**Nick Nisi** [1:19:23]
What, um.

**Guest** [1:19:24]
I don't think it's a problem.

**Zach Proser** [1:19:26]
Right? 'Cause it's a shirt.

**Nick Nisi** [1:19:28]
It should. It should be relatively fast.

**Guest** [1:19:31]
Second time trying is just waiting for approval.

**Nick Nisi** [1:19:35]
Ah, okay. Uh, good to know. Let's try that.

**Guest** [1:19:39]
I don't think you guys have an early active AP for that either.

**Nick Nisi** [1:19:42]
Uh, yeah.

We should.

Um, so I can show this now.

Uh, so if you go, if you have it installed, which I do, um.

**Guest** [1:19:56]
If I change it in here though.

**Nick Nisi** [1:19:58]
Down in here. I have MCP shop set up. This is Claude, by the way. Uh, hey bro, I hear I can get a shirt. Let's see if it works.

**Guest** [1:20:09]
Should I do install or just, you know, just research this over and make sure that's all.

**Nick Nisi** [1:20:14]
Pondering t-shirt potential. That was awesome.

**Guest** [1:20:16]
Thank you.

**Nick Nisi** [1:20:17]
Ah, I can't provide physical shirts or merchandise. That's interesting. I thought you.

Should be connected. Nope. That's the problem.

There we go. Try that again.

**Guest** [1:20:46]
Yeah. Oh, that's okay. Yeah.

**Nick Nisi** [1:20:52]
Hey bro, I hear I can get a sweet MCP shirt now that we're maybe connected. Yeah. Cool. So it pops up. We'll allow that.

You can definitely get an MCP shirt. There's one availableright now. Here's what you can get. Minimal design. I don't know that it says context is everything, but it might.

Yeah. I don't think it says that.

**Guest** [1:21:27]
Yeah. Go to the last one.

**Nick Nisi** [1:21:29]
Oh, oh, yeah. Okay. It does.

**Zach Proser** [1:21:33]
Context is everything.

**Nick Nisi** [1:21:34]
Yep.

**Zach Proser** [1:21:34]
Nice.

**Nick Nisi** [1:21:36]
Cool. Uh, so it just needs for me my company name, my mailing address, and my t-shirt size. So I'll say XL, um, one infinite loop and company name, uh, WorkOS.

Oh, it needs my city, state, and zip code. I don't, I don't know what that is for Apple. Um, so I'll just, I'm, I live in Omaha.

Oh, and look at that. It's going to buy my shirt.

And it's ordered.

**Zach Proser** [1:22:30]
We will, we will actually send you a shirt, so be sure to.

**Nick Nisi** [1:22:32]
Yeah.

**Zach Proser** [1:22:33]
Be sure to submit it while you're here.

**Nick Nisi** [1:22:34]
You can also ask things like, um, can you tell me about my order?

**Guest** [1:22:42]
I have a question. Technically on Cloudflare or technically on WorkOS?

**Nick Nisi** [1:22:47]
Uh, it's deployed on, is, is this.

**Zach Proser** [1:22:49]
You put it on Cloudflare.

**Nick Nisi** [1:22:50]
Yeah. I have a version deployed on Cloudflare. Um, this one I think is, it might be deployed.

**Zach Proser** [1:22:55]
MCP shop?

**Nick Nisi** [1:22:56]
Yeah.

**Zach Proser** [1:22:56]
Probably in Vercel.

**Nick Nisi** [1:22:57]
I think it's, yeah, it's deployed to Vercel. Um, for this specific instance of it. I, I have a talk on Thursday where I'm also, I have the same thing deployed to Cloudflare. So, um, we'll go into the code and I can send out the repo for that.

But, um, yes, that one just saves it, saves the info to a KV store. Uh, and then that's, that's what's used to order the shirts.

**Zach Proser** [1:23:19]
Uh, you can deploy MCP servers to Cloudflare now using WorkOS as the auth layer.

**Nick Nisi** [1:23:23]
Yeah.

**Zach Proser** [1:23:23]
So, so, uh, feel free to check that out. We have a blog post and a couple of tutorials.

**Nick Nisi** [1:23:27]
Yeah.

**Zach Proser** [1:23:27]
Yeah.

**Nick Nisi** [1:23:27]
That's the thing. It's using WorkOS to do that auth. You didn't see it 'cause I'm already authed in, but when I hit connect, it opened up and it was do completing that auth flow to get me a token so that I could, uh, do that here.

And you can see that in here. It's got like my order information. Um, I don't know. Do you know my name and email, which is totally not something I've said yet.

**Zach Proser** [1:23:56]
But, but also to tie it again, uh, back together,right? 'Cause again, like toy, it's fun. Got a t-shirt, but imagine this as an e-commerce workflow,right? This is what people are building. Like this is what everyone's trying to figure out how to do correctly.

What I actually want to do is just go, I'm in a hurry. I want to get on the page and say, it needs to be a product exactly like this. Does it support that? Okay, fine. Go. Not $40, less than that,right?

That's what everyone wants to do. Um, and so that's what this interface is.

**Nick Nisi** [1:24:18]
Yeah. Pretty soon you'll be social engineering your way through LLMs to get a free shirt when it's not free.

**Zach Proser** [1:24:24]
Yep.

**Nick Nisi** [1:24:26]
I can't wait for the future.

**Zach Proser** [1:24:27]
Yeah.

**Nick Nisi** [1:24:30]
Uh, cool.

**Guest** [1:24:30]
These are challenges.

**Nick Nisi** [1:24:32]
Yeah. Let's, let's, uh, look at the workflow. So I switched over to the step three branch, which is the end of step two, uh, where you should be at. And you've got a new meme generation workflow. Uh, and it's got, you know, a bunch of schemas set up for the input and output schemas, uh, and all of the steps set up to run each of these.

And, you know, that's the code for it. Let's go look at the, the actual get out of here. Um, the tools in Mastra. So I'll refresh this and go back to work. Yep. Workflows. There we go. Now we have our meme generation workflow and it's got four steps.

And so this is a little bit better, a little, little more detailed in what, what it's doing. Um, it's got not including these mappings. It's got our extract functions, find base meme, generate captions, generate meme. Oh, come on.

Uh, and then a final mapping. Um, and so I don't know. Someone give me a work frustration.

**Zach Proser** [1:25:36]
Somebody to eat my sandwich out of the fridge.

**Nick Nisi** [1:25:39]
When no one in the workshop is.

**Zach Proser** [1:25:44]
Someone was too busy preparing a workshop to review my PR.

Nick.

**Nick Nisi** [1:25:51]
No, never.

And won't review my PR. That's a made-up one. Um, so yeah, it can run. You can see it running. Um, and then we can go, we can see all of the steps are now green. And so we can see the input and debug the input and output on each of the steps.

So there's the input that we got, and it gave out a frustration, a communication frustration.

And I am all sorts of messing this up. Uh, but we can have it find the base meme and then generate the captions for it. Find out what that is. So when the meeting could have been an email, but everyone is just smiling like it's fine.

That's relatable. Um, but then down in the generate meme one, that's going to receive the captions. It's going to receive apparently a meme called Disaster Girl. And

did I mention that these are non-deterministic and I don't know what it's going to generate?

Ah, the meeting could have been an email, but everyone is just smiling like it's fine. This is fine. Yeah. Um, yeah. So this is fun,right? We can see the workflows, the inputs and outputs of it, and we can debug those steps along the way.

We can see exactly what is what we're starting with and how it progresses through each of the steps, uh, to give us a full workflow, which is awesome. Um.

**Zach Proser** [1:27:25]
We haven't even had to do a deployment yet.

**Nick Nisi** [1:27:27]
No.

**Zach Proser** [1:27:27]
And we can just iterate locally, change the prompts, change the schemas until you get it exactly the way you want. And then you haven't wasted time going back and forth. You've like iterated rapidly.

**Nick Nisi** [1:27:36]
Yeah. And so really easy debugging. That's why we love this tool. Like it's, it's just really fun and easy to do. So in the final step, um, the, the final main step we have, uh, we're going to like take that workflow now and call it with an agent.

### Step 3: Agent

**Nick Nisi** [1:27:52]
So this is a pretty straightforward step. We're just going to create an agent, give it a prompt to work with, and give it the, the knowledge of the this workflow that it can run. And then it'll run it for us.

So instead of having to use that interface, we can use a chat interface, uh, that we're more familiar with and go from there. And so.

**Zach Proser** [1:28:13]
And, and again, to tie it back to actually taking this home and doing something useful with it, like we've gotten to the point where we've described a workflow of steps that completes a discrete task. And maybe that's something that our, our coworker needs.

And then again, maybe they are technical, maybe they're not, maybe they're just in a hurry. So by building them an agent and saying, use this workflow, and you, you have the ability to call this workflow, that becomes an ideal interface to give to our colleagues to start using this.

And then something that they used to have to do piecemealy, they're just now firing off a chat request and it's done for them automatically.

**Nick Nisi** [1:28:43]
Yep. Yeah. So with this you'll learn what agents are, how you give them instructions, um, the memory systems for them, the workflow integration, uh, through Mastra, and then how you can test them in the playground.

**Zach Proser** [1:29:17]
Wow, these are awesome. So these are new community memes pouring in real time. We finally catch up on Slack messages, but there's already 20 more waiting. Nice.

Yeah, that's a great idea.

**Nick Nisi** [1:29:39]
Yeah.

**Zach Proser** [1:29:40]
There's some great, um, feedback on the framework guys in the, in the Slack channel. There's like some UX requests as well. You can see it.

That's great.

**Nick Nisi** [1:30:02]
Ah, too real.

You can also play with the, uh, prompt, uh, the prompts a little bit to tweak it about what it's, how it's like analyzing the frustration, the level of frustration, the type of meme, um, things like that.

It's really fun to get a, a vibe for it.

**Zach Proser** [1:30:31]
Yeah, indeed.

Allright. Does everyone more or less have, uh, what they need? Is anyone still stuck on anything? Any last minute questions or pickups? No? Cool.

That's amazing. I'm going to make a t-shirt with that.

Uh, just a, I guess a comment from us and I guess from the team as well. Like honestly, like thanks everybody for coming and building these. We didn't even know this workshop was happening until last week it was.

But, um, I mean previously like so like most of us at Mastra were previously building Gatsby. Like I was the co-founder. And so we've been doing open source JavaScript stuff for a while, but it's like pretty humbling when you show up for a conference and actually someone else is giving a workshop about how to use the thing that you built.

Um, and I think I speak for all of us. So like thanks everybody.

Thanks a lot.

**Nick Nisi** [1:32:27]
Yeah, thanks.

**Zach Proser** [1:32:28]
Been a pleasure.

**Nick Nisi** [1:32:32]
And on the same side, we didn't know that you were going to be here until I think like yesterday.

**Zach Proser** [1:32:36]
But we got very excited 'cause it's like, hey, you got a question about commit? Let's go ask him.

**Nick Nisi** [1:32:40]
Yeah.

**Zach Proser** [1:32:46]
I'm just personally curious how many folks have or like already have agents deployed at work in prod that they're using for things. How many folks, a couple, how many folks are trying to get them in, into prodright now?

**Nick Nisi** [1:32:59]
I'd be curious to know what you're using them for.

**Zach Proser** [1:33:01]
Yeah. I'd also be curious if anyone wants to share either in the Slack or just call it out or come up to the mic. Like what are the top use cases that you're thinking of for agents or struggling with?

I'd be curious to know too.

**Nick Nisi** [1:33:12]
This is such a fun time 'cause there's like, like you, you have to get your head around what it's doing and then get your head around what it can do. And it just, it starts to feel like the possibilities are endless and just super fun.

**Zach Proser** [1:33:25]
Yep.

Oh, nice.

**Guest** [1:33:33]
Getting around the online and online playing close.

**Zach Proser** [1:33:35]
Yeah.

**Guest** [1:33:36]
Customer

cluster. We have physical servers that have issues operationally.

**Zach Proser** [1:33:44]
Yep.

**Guest** [1:33:44]
And then goal is to have a problem to get logsright now.

**Zach Proser** [1:33:50]
That's awesome. Yeah, that's awesome. So like you've got, um, so you want to be able to chat with your infrastructure and like ask questions, like either an incident, like show up to the incident and even already have like initial guesses maybe.

**Guest** [1:34:01]
Right there.

**Zach Proser** [1:34:02]
Yeah, that's awesome. Cool. Any other use cases? I think that we're finding, um, we're mostly able to just knock out a ton of like low-hanging fruit that folks are doing manuallyright now. It's, you know, especially with tools like this, like you, you know, create a simple agent or even just a pipeline with a few steps and a couple API calls and that can like free up hours of somebody's week.

Um, I think that's the part that I'm most excited aboutright now.

**Nick Nisi** [1:34:27]
Yeah. It's like all the little paper cuts, you can just so quickly iterate on them and get things going.

**Zach Proser** [1:34:32]
Yep.

**Nick Nisi** [1:34:32]
And not just with these, these tools, but just like vibe coding in general. Like you can, you know, be like, I'm going to spend an hour just seeing where I can get to and.

**Zach Proser** [1:34:40]
Yeah.

**Nick Nisi** [1:34:40]
It's amazing.

**Zach Proser** [1:34:41]
Incredible how quickly you can get there.

**Nick Nisi** [1:34:45]
Always review the code though, please.

**Zach Proser** [1:34:48]
What's that?

**Nick Nisi** [1:34:48]
Always review the code, please.

**Zach Proser** [1:34:50]
Yeah, please review the code. Use tools like Git Guardian before you commit.

**Nick Nisi** [1:34:53]
Yeah.

Yeah, we had our, our AI moment, uh, a couple weeks ago at our last onsite and, um, we had like a couple hours just to spend doing something with AI. And it, there was really no prescription to it.

It was just explore and play. And if you can solve a problem, great. If not, you learned something along the way. And, uh, the thing that I worked on was like as the maintainer of several SDKs across several languages, uh, a pain point I saw was like people adding in, you know, very simple PRs to one repo that's like the node repo, the node SDK, and then doing the same thing.

It's like adding a new field to the node SDK and then adding the same field to the Ruby, Go, PHP, Kotlin, like all of the SDKs. I was like, I wonder if we could do something to alleviate that and make it easier.

And after two hours of pure vibe coding with Claude, I had a GitHub action that when you label the first PR that you do, you just add a label to it, it will go and generate the PRs for every other repo and just automatically PR it.

**Zach Proser** [1:36:02]
Every other SDK.

**Nick Nisi** [1:36:02]
Yep.

**Zach Proser** [1:36:03]
That's awesome.

**Guest** [1:36:04]
Were you using like a software engineering framework like Dagger or something to essentially do the changes or QBOD?

**Zach Proser** [1:36:12]
Making the, oh, that's a great question. Making the changes is one thing. And that's something that, yeah, I think Dagger would make a lot of sense. But what were you doing with that?

**Nick Nisi** [1:36:18]
I wasn't, I wasn't doing any of that. Um, I vibe coded it and I actually don't know what the code does.

**Zach Proser** [1:36:24]
And he had to.

**Nick Nisi** [1:36:25]
I didn't review it.

**Zach Proser** [1:36:26]
He had a 4,300 line, uh, GitHub action that's working great.

**Nick Nisi** [1:36:29]
How?

**Guest** [1:36:30]
I want to hear more about that.

**Nick Nisi** [1:36:33]
But to be clear, we didn't ship it. Uh, it's, it's an experiment. Maybe, maybe we will for sure. Um, but the week after that, I think, um, Claude had come out with like the ability to run Claude code as a, uh, like via an API so that you could like spin it up, run it, give it the instructions on what to do, and then let it figure out how to do it.

'Cause like most of the code that it generated was just handling how it was going to do the diffs. And for several hours of that, it was just like it made the changes I wanted and then deleted the rest of the files and that wasn't great.

**Zach Proser** [1:37:13]
Um, we're also for what it's worth finding, uh, incredible utility with tools like V0 Dev. So if you're already in the Vercel ecosystem or have used Next.js, there's now, there, they were originally conceived of as like rapid prototyping tools that maybe for designers or maybe for developers.

But like an example is that somebody on our marketing and sales team was trying to figure out who would be interesting engineers that are already doing work with MCP to contact about conferences like this. And their workflow is completely manual and they're, you know, talking to me about it on a, on a call.

And four minutes after they started telling me about it, I had it working like in V0 Dev and handed it to them and they had a completely separate, you know, tool that's available on a URL that they can just paste in whatever they need essentially and get like the analysis done.

Um, and so that was very eye-opening for me 'cause it's in some cases now it's faster to create the tool that your colleague needs than it is to continue talking about the tool that your colleague needs and even ticketing it or saying next Tuesday we should try and like sometimes you can literally sit down in V0 Dev with like a paragraph, very discrete prompt and get what you need.

Nice. That's pretty good.

**Guest** [1:38:26]
So then question.

**Zach Proser** [1:38:26]
Yes.

**Guest** [1:38:28]
Do salespeople do this process and they're creating a keyboard? Now I want to be next to you.

**Zach Proser** [1:38:33]
No.

**Guest** [1:38:34]
And I'm.

**Zach Proser** [1:38:34]
Not in my experience. Not yet.

**Guest** [1:38:36]
Cold call.

**Zach Proser** [1:38:37]
Yeah, totally. I think that's, that's a fascinating question. Yeah. The question is like when, um, folks in other roles that are not traditionally technical see how quickly you can scaffold this stuff? Are they all clamoring for the keyboard?

That's not been my experience yet. There, I think that's also like part of what the trepidation and anxiety is around is like, well, now everyone can do it. But then I also comfort myself and say that I define a pleasurable evening as like sitting down for 12 hours on one of these machines and going back and forth to try and get it to go the way I want.

And that's not most people's description of a fun time. So like even when the tools are better, I, I still think you kind of have to find this enjoyable. You know what I mean? I don't, I don't, I, I, I think it might change to some degree like when, like most generation becomes one shottable and you say, I want this app and it's of like this complexity and most people can get something working immediately.

That's correct. I think that'll take a lot of low-hanging fruit off, but.

**Guest** [1:39:30]
I heard, um, some people said like the lawyers would put some CSVs.

**Zach Proser** [1:39:37]
They would do what?

**Guest** [1:39:38]
Put lawyer like legal questions and data into CSVs and then they would essentially, um, almost like a blind mouse start telling Claude code, go do XYZ and tell me what the results are. And so I don't know. I don't know.

From a philosophical point of view, some cultures. That structure really engages and the other engagement.

**Zach Proser** [1:40:08]
Yeah. I, I think that's super fascinating. And anecdotally, um, it's mostly been lawyers when I've been at meetups that have come up and asked the most like salient questions about Gen AI and they'll say like, I'm not a coder, but like this is what we're trying to do.

Also semantic search and all like the information compression that's available with a lot of the Gen AI tools like I think uniquely speaks to their use case too of there's this gigantic corpus of case law and need to know exactly thisright now,right?

Yeah, it's, but it is, um, it's an intense time I think for that reason. Yeah, culturally,right?

**Nick Nisi** [1:41:03]
I've gotten away some 20 minutes. What are we doing? Nothing. We're doing great. We've got a nice slide slot. Oh,

you guys are going to configure an MPC server,right? It's like you have trouble with this.

**Zach Proser** [1:41:34]
Uh, in this, uh, session or in general? Sorry, I didn'tright now. Uh, no. Yeah. But, uh, I have a, I have a.

**Guest** [1:41:43]
Needed it?

**Zach Proser** [1:41:43]
Yeah. Yeah, for the most part. I have a tutorial for you that does that if you want it. Thanks. Thanks for coming. Appreciate it.

**Nick Nisi** [1:41:48]
Yeah.

**Guest** [1:41:49]
Yep.

**Nick Nisi** [1:41:52]
Allright. So we can show the agent piece of it now. Um, so I switched over to the step four branch, uh, which is the end of step three, uh, where we should have the created, uh, agent now that can run, uh, and actually have a conversation with the tooling, uh, which makes it really a lot easier to work with.

Uh, but we still have the power of being able to use the workflow tool to see what's going on and debug the steps along the way. Uh, but now if we go to the agents tab in Mastra, we've got a meme generator.

And this gives us a very sim, a very familiar look and feel. Gives us a chat window. Uh, but it gives us more than that. In the, uh, the sidebar here, we've got an overview. We can see the instructions, uh, that are given to the agent.

So it's a helpful UI agent, uh, or AI agent that's going to help us do that. Uh, it's got some critical steps in there. It's got the workflow that it should follow, um, and telling it what it has access to.

We also can see the model settings and we can adjust this as we go. So we can add more or less temperature, uh, top P. We can change all of these on the fly and test it to really hone in on like what works best for whatever we're trying to build.

So I'll ask one more time. Work frustration.

**Zach Proser** [1:43:09]
Who's got the gnarliest work frustration? Who's the most frustrated at workright now? Raise your hand. And again, you must state your company and your immediate superior's name.

Um, I always get asked to go to large meetings for four hours and then, uh, I don't speak at all.

This bothers you too. I see.

**Nick Nisi** [1:43:46]
Yes. Meeting fatigue. Um, so now we can just ask the chat and see the output and it's much cleaner. It'll actually give us the image in line too, um, which makes it really nice and easy to work with.

That pointless meeting I was dragged into.

**Zach Proser** [1:44:06]
But if you scroll up a little bit too, the other thing, uh, to see here is like, so the user asked a question and you saw that the workflow got run. Um, but now there's also additionally like the agent is still chatting and it's in a familiar way that you already are familiar with if you use GPT.

Um, but then again, just a reminder that this is kind of the ideal interface for, uh, folks that might be your clients or your customers or your colleagues.

**Nick Nisi** [1:44:28]
Yep. And we can see like in line what happened, you know, the tool arguments that were passed in, the total result. We can see what tools were called, uh, and how in this case it was the workflow and here's all of the information and then the end result that we can actually play with.

**Zach Proser** [1:44:45]
Yeah. So this could be, you know, a chatbot that someone is, uh, requesting.

**Guest 2** [1:44:49]
Because he is moving for a mode.

**Zach Proser** [1:44:53]
Mode.

**Guest 2** [1:44:53]
Here.

**Zach Proser** [1:44:54]
It designed like a new image. Uh, you can kind of put whatever you want behind the same interface.

**Nick Nisi** [1:45:17]
Not really. Not really.

It's non-deterministic, guys.

Um.

**Zach Proser** [1:45:47]
There's, there's no HR for this conference. I was told that in advance.

**Nick Nisi** [1:45:52]
So, uh, kind of to wrap that up, uh, what we built was a multi-step workflow that we could give to a conversational agent who knows how to execute it, knows what to pass into it and what it's going to get back, and then it can do without what it will.

### Wrap-Up & Q&A

**Nick Nisi** [1:46:05]
It gave us, you know, human feedback. Uh, it wasn't just spitting out JSON in the end. Uh, it was giving us an actual response and then showing us the image in line and giving us a clickable link so that we could go share that image, uh, to whoever we wanted to.

Um, and we were able to create some awesome memes. I highly recommend you deploy this and use it because it's cathartic to really vent to it. Um, and if you're deploying it, your data's safe probably. I don't know.

Find out together.

So some key takeaways, uh, from this. Uh, we learned about the workflows, agents, we learned, uh, type safety, um, catching errors in that, uh, and the structured generation to ensure a reliable output, uh, and some of the benefits of Mastra.

**Zach Proser** [1:46:52]
Yep. Um, also just say that, that we didn't show this here, but one of the examples that's on Mastra site you can go check out is like a 37 line of code, uh, pipeline that does retrieval, augmented generation.

And if you've worked, if you've built those pipelines before, like two years ago, you know, you had to glue together at least three or four libraries. It was a super crappy experience. Um, so it's just really nice to have a single place you can go and define that pipeline at a high level.

Um, so yeah, excited to experiment more with that as well. There's a ton here that you can do that we did not even scratch the surface of or, or point to yet.

**Nick Nisi** [1:47:25]
Yeah, for sure. Coming up with, uh, what to do in two hours. It's, uh, not a lot of time.

**Zach Proser** [1:47:29]
Yeah.

**Nick Nisi** [1:47:29]
And there's a lot, a lot more that we could dig into and we highly encourage you to. So this was meant as a, a primer. Uh, you, you now have like an example.

**Zach Proser** [1:47:37]
Yeah. Yeah.

**Nick Nisi** [1:47:38]
Uh, now experiment with it. Add things, add tools, um, deploy it with MCP, like figure out how.

**Zach Proser** [1:47:44]
Share it with your coworkers. Yeah.

**Nick Nisi** [1:47:45]
Yeah.

**Zach Proser** [1:47:45]
Ask them to use it, see what happens.

**Nick Nisi** [1:47:49]
So yeah, explore the tool creation, uh, add a vector database, implement RAG, uh, all of those. And just a final reminder, uh, mcp.shop, um, go order a t-shirt, check it out. Uh, it's really cool. So thank you with that.

Um, we've got 15 minutes left. We wanted to save that for questions, any, uh, additional follow-up, any just general casual conversation about these tools, uh, the fascinating world of AI, anything.

**Zach Proser** [1:48:17]
Vote on memes that we generated and see who is the ultimate winner in the Slack channel.

**Guest 3** [1:48:25]
So I'm giving a talk on agents and workflows tomorrow and I really liked your agents and workflows side. Can you bring them up again?

**Nick Nisi** [1:48:32]
What? I didn't hear what you said.

**Zach Proser** [1:48:33]
Yeah, I didn't hear it. Sorry.

**Guest 3** [1:48:34]
Oh, sorry. I'm giving a talk on agents and workflows tomorrow. Agents and workflows sides were really good. Can you bring them up again?

**Zach Proser** [1:48:42]
Sure. We can share them too. They're open source because they're in our repo and they're on Markdown.

**Guest 3** [1:48:51]
How do you make those in Markdown?

**Zach Proser** [1:48:53]
There's a couple tools that Nick, Nick likes.

**Nick Nisi** [1:48:54]
Uh, yeah, this was slide. Uh, slidev or slide.dev. Um, yeah, it was something that we switched to relatively not that long ago.

**Zach Proser** [1:49:06]
20 minutes before this talk.

**Nick Nisi** [1:49:07]
Pretty much. Yeah.

**Zach Proser** [1:49:14]
Uh, questions for us or the Mastra team?

Uh, do make sure that you, if you want a shirt, buy a shirt because we will actually send you a shirt. We might not send it this week, but, uh, we're tracking all the orders and we're going to honor all of them.

So it's a limited edition mcp.shop shirt that will never be seen again.

**Guest 3** [1:49:41]
We've got some here and I think we've got some in the back.

**Zach Proser** [1:49:45]
Yep.

If you want an official Mastra book, um, autograph copies are $30,right? And otherwise.

**Nick Nisi** [1:49:57]
Cool. Um, but yeah, yeah, question.

**Guest 3** [1:50:01]
Where's the memory and execution step?

**Nick Nisi** [1:50:03]
The memory and execution step? Um.

**Zach Proser** [1:50:06]
Yeah. So you, you, you can configure, you know, we, we configured SQLite for this demo and that's what's powering like the ability as you create additional chats, you'll see the previous chats on the left rail. Um, but there's a ton of different storage drivers like there's the Postgres and everything else,right?

Um, so you can basically choose what you need to. Um, and then once you configure the memory, you pass it into either the workflow or agent. Um, and then that's by, by way of doing that, you're telling it can use it essentially.

Is that your question?

**Guest 3** [1:50:33]
The demo one doesn't have memory?

**Zach Proser** [1:50:35]
The demo one does have memory using SQLite and it's.

**Guest 3** [1:50:37]
That's what I saw, but, uh, it says check execution step. Where do I find that?

**Zach Proser** [1:50:42]
Uh, check execution step.

**Guest 3** [1:50:44]
Where are you? Let me, I'll come over.

**Zach Proser** [1:50:51]
Great.

**Guest 3** [1:50:52]
Oh, thank you.

**Nick Nisi** [1:50:52]
Thank you.

**Zach Proser** [1:50:53]
Thanks so much for coming. Appreciate it.

**Nick Nisi** [1:50:55]
And, uh, yeah, we'll be around, uh, all week, uh, at the conference, so reach out. Uh, we'd love to chat more.

**Guest 3** [1:51:01]
He's talking about just, uh, like that graph.

**Nick Nisi** [1:51:06]
This is the main. Thank you.

---

This library is powered by PodHood (https://podhood.com), the podcast website platform.
