Back to all episodes

Children's story time, Mastra playground/cloud, workflow streaming, breaking changes, MS Build news

May 19, 2025

Today we talk through some AI news with a focus on the MS Build conference, we take a look at the Mastra playground, Mastra cloud, and workflow streaming, and we talk through some Mastra breaking changes that are coming up soon. Finally, we end with children's storybooks... or at least how we can build a storybook generator with AI.

Guests in this episode

Marvin Frachet

Marvin Frachet

Mastra
Ward Peeters

Ward Peeters

Mastra

Episode Transcript

0:02

hello everyone and welcome to AI Agents Hour brought to you by Mastra i'm Shane normally I am joined by my co-host Abby but he decided that he would rather be in Japan and honestly I can't blame him but today we do have a full show we're going to be here for at least the next hour but sometimes we run long so you

0:22

know buckle up today we're going to be talking about what's happening in AI we're going to be talking to someone from the Maestra team on what they're working on get to know them a little bit and talk about a few breaking changes coming up in Maestra i think it's going to land tomorrow so we'll talk through what some of those things are and then

0:41

we will end it with some storybook time and so if you stick around you will find out what that means as always you can follow me on Twitter if you're not already or X whatever we call it these days SM Thomas 3 and if you are watching this and you haven't given Maestra a star on GitHub please find Maestra give us a star we appreciate that but let's

1:08

start by talking about some of the things that are happening in AI so today uh some of this stuff is actually from last week but we haven't talked about it yet so we'll bring it up and if you do have questions or comments on any of the things we talked about today whether you're watching on X LinkedIn YouTube

1:26

just drop a comment i'll see them i'll try to answer a number of them can't say we get to them all but we try to get to most of them but first story is that meta delays llamas 4 behemoth citing engineering hurdles but I think what it really comes down to is sounds like they're delaying the release of the behemoth model and it

1:50

does seem like maybe there's they're running into some issues with you know the scaling laws you know scaling models isn't just more data leads to uh more you know more compute more uh better models better generation so it seems like there's some architectural uh fundamental challenges they're hitting no release date as far as I've seen but seems like they're aiming for maybe the

2:12

fall timeline uh so just something to note there hugging face has shipped a free virtual computer agent that's supposed to kind of be an alternative to OpenAI's operator or Claude's computer use always cool to see things come out of you know hugging face it's a little bit more uh communityowned and open

2:32

source so I like to see that google's been spotlighting project Astra and Mariner which I'm not that familiar with but Astra is kind of supposed to be this multimodal all-encompassing agent you know kind of like the the one agent to rule them all and Mariner is really supposed to be uh kind of just an engine

2:54

for you know automations browser use type things so interesting to see that they're you everyone all the big players are really talking about different web agents that they're building 2025 is really shaping up for the year of agents or at least at minimum uh all the big companies talking about how they're

3:10

building with agents we talked about last week at the end uh OpenAI debuted codeex which is like the multi- aent mode in chat GBT so you can essentially ask it to do something it can actually create a PR for you if you connect it to your repo i'm curious though chat are you using codeex have you tried it out

3:29

what are the results you're getting i have not used it a lot internally yet but a few others on our team have and getting some mixed results some good things some you know kind of normal AI LLM generated things where you need to take some multiple iterations but I am curious if you are watching this have you used codeex have you found any good

3:50

use cases for it yet what do you think let let me know add a comment carlo not yet i'm in the same boat i'm hoping to try it out this week all right uh some other things so Quen has just released I think it was yesterday they shipped a demo of essentially a website generation tool prompt to website so Quen is you know

4:18

kind of out of Alibaba there and it's really to compete with Vzero and Lovable so interesting to know i haven't seen any reports of how good it is yet but they had a pretty cool demo video that they shared on Twitter and I expect that we'll hear some more information soon of whether that's any good or not and whether it really does compete with Vzero or or Lovable but my assumption is

4:41

it's probably decent you know a lot of the stuff that they ship usually does end up making waves so we'll see if this if this does as well i do want to talk a little bit about the MS Build Microsoft Build conference it's going on right now and there's been some really cool things that have been shared through that let me see if I can actually pull up

5:05

uh maybe I'll pull up here a screenshot in a little bit but the the first thing that was I think the really cool thing that caught my attention was that GitHub Copilot unveiled a built-in coding agent so essentially it's an interface within GitHub where you can prompt an agent or you can actually create an issue i think it goes through GitHub issues you can create a detailed issue you can assign

5:29

it to an agent and then it will come back with a PR all within GitHub so you're in GitHub's web interface you create an you create an issue or an issue comes in you give it to the agent it will then create a PR for that issue and it kind of runs you it doesn't block your workflow you just are kind of assigning issues to

5:48

agents um that's a really if that works that's a a real game changer for even Maestra you know MRA is an open source project we we have issues come in all the time if we could have an agent kind of take a first pass at some of the even lower effort issues that you know we get on a daily basis that could be a huge timesaver and really help us ship things much much faster

6:12

so I'm very interested interested to see how that rolls out how we can get our hands on it how we can try it i don't know much information other than I think it was announced today so we'll be interesting to see how that plays out microsoft has really been going allin on agents at the conference uh right now they has new multi or multi-agent orchestration and Microsoft 365 co-pilot studio so it lets

6:38

enterprises spin up cooperating agents tuned to their proprietary data so that's obviously big for enterprise Microsoft clients and another thing that really caught my attention was Windows MCP support so it essentially turns the operating system into an agent host so it exposes the file system and all through MCP right so that is very

7:03

interesting we've talked about MCP a lot on this stream we've been going deep into MCP over here at MRA we you know we have support for you you can connect to MCP through MRA agents you can also create use your master tools that you create and turn those into MCP servers so the fact that you know Windows is

7:22

actually going to support MCPs pretty wild uh there's another uh so VS Code Copilot's open sourcing the code it uses to talk to LM i'm I'm not sure Carlo if this is what you're referring to here with this but I I imagine so but yes uh VS Code Copilot's open sourcing the code that it uses to talk to LLMs so that's the system prompts the

7:52

tool calls they're really trying to I guess position themselves as like the open source AI IDE and it's really going to be interesting though how how are how does that position VS Code against Windinsurf and Cursor right windsurf and Cursor have been taking off the last year vs Code is was a little late in the game to adding

8:12

MCP and some of these other features but now it's it's looking like they they want to kind of be the the open- source solution which I guess will be interesting to see how they how that positions them against the other uh major players and so la last another one that was kind of interesting and I'll share maybe I'll

8:36

just share my screen and you can see this here so that we have this uh type agent was just released so it's a Microsoft research prototype for building personal AI assistance using structured prompting and retrieval augmented memory or structured rag so it uses what is called like an AMP architecture which is actions memory and plans to handle complex tasks with minimal LLM

9:05

calls so the system routes user input to specialized agents like calendar email and browser through a dispatcher and includes a voice supported electron interface so it's considered experimental it's not production ready and it's really designed to explore agent-based interaction with apps through natural language so again this

9:24

was just released I think just on stage actually probably I don't know sometime today but very interesting more you know more and more AI agents information coming out all so all the bigger all the big players whether it's Microsoft Google you know GitHub obviously you know all going all in on AI agents all right well that's it for the

9:49

news for today quite a bit of things normally we try to keep this segment just a few minutes but uh it's seeming like there's a lot going on but we did want to uh now talk to someone else on the MRA team and before we do Abby Shek how is MRA support with Convex it should work with Convex we've talked a little bit with the Convex team we're trying to improve support so if

10:13

there's anything that's not working please let us know but you should be able to use Convex with Maestra all right so we're going to bring on Marvin from our team here and we're going to talk a little bit about uh what he's doing at Maestra some of the stuff he's working on and we call this meet the Monstras

10:37

marvin hey everyone super nice to be here hello Shane so before I ask you what you're working on give me just a little background so where are you based out of and yeah know what you know what what's some of the stuff that you've you've worked on in you know before MRA yeah sure so you can hear it I'm not an

10:57

English speaker i'm French i'm living in Strasbour at the frontier of Germany uh and so yeah I'm mostly doing front end engineering it's been like 12 or 13 years that I'm doing this uh I had a chance to work with Shane at Gatsby i've been working at Streppy the CMS also i've been working at Proton Mail uh these kind of companies and mostly

11:21

working on the React ecosystem so React React Native and everything around so I'm mostly focused on the user experience and user interface part of the stack super happy to be at MRA that's such a good adventure yeah i mean I think what you know one one of the things we we at least I personally and I know Abby like we we kind of come from similar

11:45

backgrounds right we all come from this world that's like the web world and I I think that there's this interesting collision with web and AI that that's happening that so I I believe probably a lot of you listening have either been you know web developers app developers and you're now questioning how do I add

12:02

these AI features to the apps and the websites that I'm building and so I think that it's an interesting time to be a web developer whether it's you know a front end a backend full stack and so interesting I guess what's so how has it been because I know you you know you haven't spent a ton of time on in AI

12:20

before this so how's it been like trying to absorb all this AI information while still of course doing your normal front-end engineering work yeah you know something that is funny about AI is that um at first you think it's a very geeky space like it's very obscure or very complex and then you start to realize

12:40

man it's just enhancing the user experience at the end right it's like I'm just giving you a prompt you can interact it with natural language and you get back some results and thinking of it like this helps me a lot at least just understanding the value for the end user and then every technical bits is you know it's learning like everything else you have to dive dive in it learn

13:04

some stuff iterate and then it's just just works yeah yeah exactly um I wonder if I mean until it doesn't work a lot of times it doesn't work sometimes it sometimes it just works sometimes it doesn't work um but yeah I I guess are you So I I know that a lot of people on the the master team are using AI code tools do you have a favorite are you using you know cursor Windsor VS Code what's cursor you're

13:30

you're a cursor fan okay chalk one up for cursor chad if you're listening are you cursor winds surf are you excited to try out the thing I just announced with go back to VS Code you know now that uh they're open sourcing a bunch of it what are you using chat let us let us know weigh in on the discussion i uh I I'm a

13:50

50-50 cursor wind surf depending on the day uh myself yeah make sure to choose the good one yeah yeah exactly uh I guess what are you working on here at uh MRA what's some of the stuff you've been working on since you joined and what are is there anything that you uh you're kind of proud of that you've worked on so far yeah I mean you know in these kind of companies you build stuff very

14:16

fast you build amazing stuff very fast and you have to chip a lot of things so you have to chip a product you have to chip a lot of complex feature at the core level and you also have to provide um user interfaces for people so my my job at Mastra is about improving your experience in the playground and in the

14:34

uh cloud platform so I'm mostly working on everything user interfaces so for example in the playground I've recently revamped the um agent um sidebar that you have on the right side that will be shipped tomorrow so you will see it tomorrow uh I've also been working on um generating master project uh for the cloud uh project from templates so you

15:01

can choose a template directly in the UI and it will create a master project that you can use directly without having to uh run the master command locally and to push something uh to GitHub so you can just you know pick a template we only have one for now but you pick the template you enter a few information and you have a master application running on

15:20

cloud which is pretty nice and yeah that's the kind of things that I'm working on these days so now I have to ask you said it's going to you said the the new playground sidebar is going to ship tomorrow can we see it today yeah sure so I can show you some stuff yeah I mean you pull it up i I'll I'll fill some time to give you uh give you a few

15:40

moments but yeah if we could we always like to uh look at what's coming both in Ma but also just in the AI agent space in general so anytime we can have a chance to see what's going to happen what's going to launch tomorrow let's let's take a look and we and we always one of the things we like to do in this live stream is we we we like to see some

15:59

code so if you do have any code you can share you know happy to see that too otherwise I'll be sharing some code later so every day we like to see at least a little code most of the people that watch this are at some level a developer right you're developing something you're building something so we like to share some code as well yeah sure uh can you give me a minute because

16:16

I have to restart Chrome for the permission stuff yeah I will i am good at filling time it's you know part of my job just fill time i'm back in a minute yeah no worries all right for those of you that are just joining us we are about 15 minutes into AI Agents Hour i'm Shane i'm your host today still missing my co-host Abby where are you Abby

16:42

unfortunately in Japan but uh you will be joining us back to normal hopefully uh starting in a couple days i think he's got to travel back he's going to spend some time in Europe but he will be uh he will be joining us again probably on maybe Wednesday or Thursday and be back to normally uh scheduled hosts we

17:01

talked a little bit about what's happening in AI specifically some really cool stuff happening in the Microsoft Build conference so go back and check the live stream if you are tuning in you might be watching us on X you might be watching us on LinkedIn you might be watching us on YouTube you can just add a comment and we will uh we'll get you

17:20

whatever you you share we'll try to answer on the stream we'll try to share it on the screen even so if you have you know comments on anything that we're talking about anything that we shared earlier in the news please let us know and we will uh try to share it with the world right all right Marvin I'm bringing you back in yeah sorry for that

17:37

and so we are going to walk through uh some of the stuff that's going to get shipped into the MRA dev playground so if you've used the dev playground marvin's probably at least touched some of the code that you've interacted with and we're gonna see some things that are hopefully shipping tomorrow yeah okay so starting and Marvin can you

17:58

I'm I'm gonna do the same thing I ask every guest can you give us about three clicks of Zoom here check us out yeah that's that's pretty good right there let me just maybe one like this so yeah um if you have started a master project locally you may be used to this interface already um and I've been working on some of the few stuff um

18:20

this one particularly because we have the sidebar that is taking a bunch of space right so now you can just collapse it and it if you refresh the page it will just remember your preference so you can still interact with the thing but it's a very condensed bar i like this kind of UI because it leaves some space for what is important on the

18:38

screen um and so what I was mentioning before is that we have a new sidebar for the agent so if I click on it I'm now having access to this kind of information and one very requested feature is how do I know my agent ID um and so the agent ID has been here i don't know if you see it but it has been in the URL for a long time but now now you can just copy it

19:06

clicking this button so if you click on it it's copied and you can then use it in your code so that's pretty convenient now we have changed also a bit this uh thing it looked a bit different before it was a bit weird to use you were having a button add a comment or something like this to enhance your prompt but now you can just enhance your prompt by typing something here make it shorter for example and you

19:32

can enhance it so it's just a better UI and it will tell you hey uh do you want to discard your changes or you know just use them so it's very subtle changes that will probably help you um enjoy a bit more the UI we also have changed the interface for the tools so you now have access to your tools like this if you click on them you still have

19:56

access to the to their playground uh this one needs also a bit of love but I will come back to this uh later yeah so this is the kind of we will get there one step at a time yeah exactly there are so many things to do that you know um also something else that has changed uh the tools page it's now very different uh so yeah I will just you now

20:20

have access to this page uh that will show you all the tools that have been registered in your master application so before that it was showing with um some kind of navbar on the on the left side that was listing all of your agent and you were able to see your tools uh by agent right now we have just decided to put every single of your tool here and

20:46

to add the agents that use this tool just inside the card and you can then just filter out stuff from there if you want to get weather agent whoop you can just do this kind of things so again it's minimal changes that should improve your experience and I'm very curious about what you would like to to have in the future because this is the small thing that probably uh will be useful

21:09

for you that's that's a good so good call out if you are watching this if you've used the master dev playground what are we missing what are the little whether it's a small UX issue or whether it's whole features what are we missing from the dev playground what should we work on next uh please please let us know in the comments wherever you're

21:30

watching this and we will highlight some so we have one VS code client extension so can you provide some more information what do you what exactly do you mean with the VS code client extension so we do have a MRO docs MCP server so I think client supports MCP so if you're looking for just MRA documentation and helping your or your agents write better code hopefully that

21:56

solves it if not if you have other specific uh requirements Javier let us know yeah that's very interesting to to just know because yeah as I mentioned before we are moving in a lot of different spaces and very fast so it's important to just sometime focus on uh the experience that that we provide also and the last bit that I just wanted to share with you is the runtime context so now

22:21

the runtime context has formatting so if you put some stuff here you have access to formatting it also has syntax highlighting so if I'm typing a valid JSON small stuff again but uh something that should help you use the playground a bit more uh easily and I'm seeing that I'm I'm having an issue here so I'll probably have to fix it tomorrow

22:45

uh and you can also copy the context directly so this is the kind of changes I'm working on these days uh and I will hopefully work on the other tabs that I've not covered yet so right now I'm working on the workflows for example yeah and so can we go back to runtime context that is new for some people i think a lot of people aren't familiar

23:06

with what runtime context is within the con you know within the context of MaRo which is kind of a mouthful to say but I guess do you want to take a crack at explaining runtime context do you want me to it might be good just to highlight high level why uh runtime context is maybe important i think this should be self-explanatory this is the reason why I've put it here yeah because I think it

23:30

is yeah I think people do they they it's it is a loaded term and so they're not necessarily understanding exactly what it is but but yes it does basically lets you pass in dynamic variables into your agents and tools you know from your runtime so you know something whether that could be a user ID or something

23:50

that's passed in from your system so you make sure that the agent only has access to specific tools that are assigned to that user or something like that or if you're getting you know if you have a tool that gets data from the database you can pass in the user ID so that gets passed into the database call so they only get their data so a lot of things

24:08

you can do with runtime context but now you can actually test that in the playground so you can pass in what the runtime context should be so when you load the playground it has that context passed into everything you're doing yeah we were having a good demo about currency for example uh one of the masters was deciding by default which current currency should be shown uh by

24:33

the agent and it was working pretty well like give me only information in euro and it only gave back information in euro so it's like a general context in this case that was very helpful we got a comment or question from Jack so Jack Park on X is it possible for an agent to call a workflow as a tool yes it's not only possible it's often

24:57

recommended is a is a really good way to expand your agents right with those things workflows are great because they're slightly more deterministic than you know just letting the agent make all the decisions but sometimes you need an agent to call a workflow or you need to call a and you need a workflow to call

25:14

into an agent as a part of as one of its steps and yes they're built to be composable so you can kind of piece them together i think it shows up should show up right here yes so it'll show up if you assign a workflow to an agent it'll show up as basically it's in its own section but it's essentially just a tool call and I I've used this analogy on this stream before so if you've listened to it and heard me use

25:36

it I'm sorry you're going to hear it again because I've said it a hundred times but I like to think of if if you were thinking about reproducing or like replacing like the tier one support job for uh your your customer support as like an example of how you might think about agents and workflows well an agent

25:53

would be the actual support person who's making the decisions and deciding what to do you have tools that they have access to maybe that's Slack or maybe that's you know Zenesk or GitHub issues or whatever and then you have workflows which are specific playbooks that you want that support person to run

26:12

depending on the situation and so in that case you could see how as a you know tier one support you might be assigned a bunch of tools some workflows and then you as a as the the smart uh individual you know decides when to call those different things based on requests that come in so here's here's another uh interesting question why does a every agent app look like a chat

26:38

interface this is a great question actually um I think chat is the easiest interaction i think it's it's it's like a common use case for people right you chat with others on your team you chat with agents um you know I I use Slack to chat with Marvin to ask him to come onto the stream earlier today so you know like I think it's a pretty common interface i don't think it's necessarily

27:02

the best i also often I've heard and I didn't come up with this by any means but I've heard it from a few different people that you know chat interfaces are like the CLI you know for agents so it's maybe it goes away maybe there's modified improved interfaces over time but I think chat is is the most approachable so I think that's why

27:19

everything starts like a chat interface and then eventually people build better interfaces just like why oftent times when you're developing something you end up starting at the CLI even if your end users don't just see the CLI they see the results of all the work you've done you know writing some code uh yeah what else Marvin what else

27:38

should we talk about today i mean I just want to say that you're very good at explaining things that's that's awesome yeah I'm I'm very good because I don't understand things deeply enough so I have to simplify themselves for my for myself so that's nice hopefully that helps you watching so I I uh I explain

27:58

it like I'm five because I often feel like when learning these AI when jumping into AI things are changing so fast that you feel like sometimes you're you're still uh in in kindergarten it's actually funny we Marvin you know we have a we actually have a channel in our Slack called Kindergarten because the idea is we're all still learning this

28:16

stuff and we're all still trying to keep up and it feels like every day we're just in kindergarten trying to like catch up with everything that's going on it's moving so fast yeah uh yeah i guess you anything else do you want to show on the playground uh I don't have I don't know if people have seen the new traces thing like this

28:37

one with the I don't know if people are using this one i'm curious to know if people are using traces extensively these days um because personally I don't and I was curious to know if people were using this feature it has changed a bit uh in a waterfall fashion now uh so yeah I was just curious to know yeah if you anyone using the traces interface in the dev playground please let us know in the

29:03

comments i I know that I So So here's my hot take is I don't use traces unless something goes wrong but things are always going wrong so I use traces a lot anytime I'm building and I imagine as you get you know most of what I build these days is not the most you know most complex examples i'm building a lot of uh I'm I'm like I say I have breath breadth i go wide i have a

29:29

lot of things I'm working on but I don't haven't gone as deep as a lot of people that are probably listening to this stream so curious if you all using traces and if you're not even using Maestra are you using some kind of tracing UI um there's a whole bunch of tools that that offer these kind of traces when you're building agents curious what you're using uh how you

29:48

like it and and where you find the value because we we do you know we integrate with a lot of those like we we provide a pretty good tracing interface but we know that there are some tools that go even deeper than what we do so we try to integrate with those as well yeah that's a great call um otherwise what else do I have to

30:09

show uh I can I don't know if people are used to cloud already or I think I don't think we've ever really showed master cloud publicly and I think it's time I think today is the day we we can show just a little bit about mastercloud you know so a lot of first of all if you want to get it pulled up I will uh I will uh give a little preamble

30:34

about what is master cloud so people ask you know why does mastercloud exist what's the benefit of it And ultimately you have this you know you have this nice playground experience that Marvin just showed and you're building your agents you're writing code you're you're kind of developing things and ultimately you need to ship these agents into production at some point and oftentimes

30:56

you already have a provider that you want to use and that's great whether you're shipping to Verscell or Netlefi or Cloudflare or wherever else you know some digital ocean drop interface or or you know out in the server serlet out in the cloud you can do that but often you don't have necessarily you haven't picked where you want to deploy this and we want to make it seamless for you to

31:18

go from dev to production and as easy as possible and kind of keep this local playground experience in the cloud and so that is where we um we do have master cloud we've been building it we it is in private beta now there's a request access button on our website you can click you can get access to it and uh

31:38

you can start building but why don't we show show a quick maybe a quick like two-minute demo and then we do have another special guest that's going to join us here uh very shortly i'm going to tease a little so um and while you pull it up why don't we just uh why don't we bring our our next guest on he can he can add some commentary as well so today I'm going to

32:05

bring on Ward and last time we saw Ward if you all were watching the stream he was showing us his farm today I don't think we get the farm view we get just his normal desk view so people are disappointed Ward that we're not we're not looking at goats and horses today but uh we're glad to have I can go

32:23

afterwards but uh I thought it was easier to do it on a desk today because I might need to show something as well so awesome well yes and so Marvin you have pulled up master cloud so talk me through what we are what are we looking at here okay so master cloud in two minutes so um I'm going from the beginning so what you are seeing on the screen is all the project that I've

32:49

created on mastercloud and all these project are obviously master projects and those one uh are on my personal GitHub repository so everything that you see here they point to they they point to a GitHub repository and yeah they run in this platform so I will just click on this one i have I have a lot of them and can you give me can you give me one

33:12

click of zoom yeah is that better that's better yeah cool so this is a master project that is running on cloud right now so I'm going to click on it and what you are seeing here on this um overview section is the latest build that has been done of my project so this represent the the application that runs in production i can have access to my

33:37

master uh project API through this URL directly from from the internet uh and I can query my agent workflows directly from there i have a bunch of builds that have been run here a bunch of deployments i have access to the logs of the project that is running in production so if I interact with this project somehow by you know calling an agent or a workflow I will have access

34:01

to some logs here and probably a lot of them um I have access to my agents i have access to my workflows the UI looks pretty much uh the same as the playground i can interact with my agent almost the same way i have a bit less for now but we will improve on it too so I can interact here i have access to

34:22

traces evaluation but all of this is hosted somewhere uh on the cloud and so my agent is available from HTTP directly and it's the same for workflows and yeah that's all I have for now so you're saying that I just hook up my git repo and everything is there yeah like I have deployments every commit I make it's

34:47

just a new version i can go back in time all those things i'm sorry super cool yeah super nice and yeah I I think the main benefits you get with Monster Cloud a lot of people ask you know like how does this differ from other things well with Monster Cloud you get essentially like an agent runtime so your agents and workflows in the cloud accessible over an API so you can connect it to any front end wherever

35:14

your front end lives you also get the kind of the observability tracing evalu ultimate goal long-term goal of master cloud is you know it's should be interchangeable you can host your agents and just use Master Cloud for your observability if you want to host your agents somewhere else if you want to host your agents with us and use other observability providers it should play

35:36

nice that way as well so you can kind of uh get the best of whatever world you need you best of both worlds you can have have us run everything or if you have specific requirements for your project we need to be we want to be flexible so you can uh connect it to kind of anything wherever you are deploying your AI projects so I can host

35:56

my Mastra um project on Versell or Netlifi or Cloudflare and I can still use observability in the cloud so today not quite but very soon yes right now it's kind of you kind of get both this is why we're still in we still we still are in private beta for a reason but yes that's that is the long-term goal is that you can uh you know if

36:19

especially th this is really beneficial for people if you have like a bundled next app right you want your agents within your next project but you also still want the observability pieces uh so you might still deploy to let's say Verscell but you want you want the observability parts the tracing the logging all that so we again not I think

36:41

it's in theory it's supported i don't think we've actually officially announced it or released it so there's still some things we're doing to make that actually actually work so yeah more to come on that soon i'm so excited about this project cannot wait to see it live yeah all right well thanks Marvin thanks for walking us through uh the playground

37:03

thanks for giving us a little uh preview of cloud thanks for talking a little bit about your background and definitely excited to have you come back on in in the near future it was pleasure it was super nice thank you yeah see you Marvin byebye all right Ward then there were two so for those of you that have just joined us uh this is AI agents hour i'm

37:28

Shane with Ward both of us are from Mastra we talked a little bit about what's happening in AI we met Marvin who talked us through the MRA dev playground and MRA cloud uh now I'm here with Ward who's our open source lead at Mastra ward what did you want to chat about today i know one thing that I have one

37:46

thing on my list as you can see the next item up i do want to get your opinions on on that but did you have anything else you wanted to talk about yeah we're also going to introduce uh streaming for workflows so um it's been a like a feature that many people have asked uh in the past and we had like some kind of streaming we had like a watch task and you could like get step

38:09

changes all those things but it wasn't really enough for like rich applications let's say you are creating a simple chatbot and you wanted to see every step for example your workflow calls an agent and that agent calls a tool like there's so much nesting and we're just not displaying all that information so we

38:26

bas basically went back to the drawing board and recreated the whole uh streaming protocol um and um like it's we're we're going to ship it uh tomorrow but then maybe in the probably in the future we're going to look into more uh utilities to support like um um use chat from AISK and like have data stream protocol so we can basically have um

38:53

better standards for like all the UI packages out there so you don't have to do all the like data mangling yourself so you just do like two to data stream and you get like a data stream that works uh but for now it's a a stream that has all the information you need and you can skip steps yourself so if you don't need any like that certain step if you're not interested in tool calling just do like

39:18

if case if tool call i don't do anything those kind of things um and I can show it yeah let's see it because this is going to be when we get uh to storybook time which is coming later you're going to see that I desperately needed workflow streaming to have a better interface so uh people you know hopefully they won't laugh at my uh my

39:42

non-existent you know UI when it comes to the workflow that runs uh the example I'm going to show but workflow streaming didn't exist i could have kind of hacked it together i chose not to because I wanted to get something out there but now that workflow streaming does exist I need to go back and actually update things

40:01

i just need a second to um get my branch ready because I did not uh pre-build it yet and I was working on something else no worries do that and I'm going to answer a couple questions that we got in the chat so one quick question do we have support for to use the voyage embedding model and reranker and uh

40:22

Abishek so if you're talking about using the embedding model for like like an a rag pipeline or some kind of rag setup yes you should be able to do that that should work same with ranking models and when it comes to just models and providers in general one of the benefits one of the things choices we made with

40:42

Ma was to be built on top of AI SDK so any provider that's supported out of you know by default out of AI decay you can use within master as well but we do um I believe I we have specific support for voyage embedding model and reranking or the reranker model and one more question or one more comment from venicious brown stream for

41:06

workflows will be very handy yes agreed and with that did I uh did I stall enough ward for you to be ready i feel like that's half my job is just stalling so we can make sure that we we're ready and get it pulled up i'll see if I can share my screen if I know how to do it in here yeah there should be just a share button

41:32

i think it's this one make it lighter bigger smaller yeah always yeah always one more click of zoom than you expect you need that's pretty good can also uh and you can make it a little you can make it a little wider if you wanted to but it's up to you there you go um how to start so basically I have um I

42:05

did a create um create master bootstrap project so everyone knows the weather agent like we have the weather agent and we have a weather workflow same basically this um project I moved it to the like the v next which becomes the stable workflow engine tomorrow as well so basically v- next becomes the default workflow engine

42:29

because we rewrote it um all to be um um like handle branching parallel execution all those kind of things in a better way so um this is going to be shipping tomorrow as well so I'm just adding onto these workflows so basically what do we have we have our weather agent is basically a travel expert that's going

42:55

to tell me um what to do what activities I should do in the morning afternoon and so forth and so forth based on the weather forecast of um today I guess or whatever I ask it um so this is just all the same we create a step don't have to go through all of the steps I'm guessing unless I should do it shane I I mean I I don't think we need to cover everything we can always if there's questions on any of

43:23

this if you're watching in the in the the chat you can add a comment whe wherever you're watching us and we can go into some more depth if you have any questions on any of these steps yeah like this step just going to get the weather forecast for a given city like it calls an API and just returns me some data and then um I have like a

43:44

small mopper step and we're going to improve that API a little bit because I have like a create step where I just pass the agent so I had this weather agent for the activities i don't have to create any step any like a like a wrapper step anymore i can just do create step pass the agent and it works but it's not yet good enough that I

44:04

because I had to make like a dummy step that's going to generate me a prompt it would be nice if I could have like a function here um like for example do something like this and then like prompt could be then a function or something that we can basically copy the all of this into here and then it will um do it for us but we

44:29

don't have that yet so I just create like a dummy step that just going to generate me a prompt where the location is set i can do the create step agent and I basically create my workflow like this so workflow pass in all the steps and then do like all the workflows here seems to be like there is a TypeScript error that I'm not going to fix right now because it could be that it's just

44:53

something with my um PMP workspace because I linked all the packages to the monor repo so it's not an MP not an npm install it's like linking to my open source repo and then sometimes um TypeScript issues happen along the way um so I'm not going to look at that as of now and then I have a server file so this is just a TS file that I'm going to

45:17

run with um tsx and I just get the workflow i'm going to create a run and then I'm going to stream it with the input data of New York and I'm gonna and then we can just execute the stream with like a 408 um but you can also do any um stream work so stream dot uh get the reader and then you get like the reader as well

45:45

basically it's a default um stream so it's a web stream not a note stream there is some small differences there but why did we use a web stream basically because then it's compatible with like Cloudflare and it's becoming like the main standard for like Dino as well and then um it's like just really portable and then I could do like reader dot um I have to do this

46:09

first like value like so and then do a while loop uh that's also a syntax that's uh possible for example um I have to make this a lot of course so this is the syntax you can use or this one i prefer uh mostly this one u because it's easier to read but sometimes um you have like conditions and everything then the while loop uh makes more sense sometimes as well but u and then in the client I have

46:44

exactly the same syntax is a little bit off so we're going to change that to be more streamlined as well because now I have to do the stream on the workflow and when on the server I had to do the stream on the run and on the run it makes more sense um but the client uses like client GS so we have to model that

47:02

as well um but I don't think we can get it in um tomorrow but definitely next week so that's like a U or DX optimization we can do um as well and then like you see we get the stream it's the same 408 because it's a web stream i can do exactly the same um thing so let's see Twitter i think it's just a

47:29

stream okay maybe I'm wrong here but it should Okay my my types are wrong so I have to fix that for tomorrow but we should be able to do the same thing as here and get like a stream or this way so um that's uh something for me to to fix um and then if I So one one yeah one question this might be answered in this run

47:54

do you have an example of what is the output of each chunk yes so I did this beforehand so if I would run it um I can run it again so I think I have to do do I still have uh tsx source and then server for example and then do I'll pipe it to out.log log it's vnpmd dlx of course because I don't have it

48:27

installed and you can see that it's like doing so much now because um it streams the agent output as well and the agent um is streaming as well and it's like a lot of words so if we go to the output now I I stopped it because it takes so long but basically you get the start of the workflow with the run ID then you get

48:52

like a step start which is then the name of the step you get the step result which because this was just the um and because of my console log I can do like a um a JSON streamify instead which then logs the whole um output because console log trims it um um if I don't so basically now I get output output and I'll run it in a second too to show you what object object is about but you get the whole

49:24

result you get step finish of that um ID you get step start from prompt one which was that mopper pro mopper step that I made um as you can see it has the output where the prompt is visible so I can debug basically what did I send um to the agent step finish happened new step which is the weather agent um a

49:51

tool call happened in the um weather agent based on with the prompt that it's uh because a tool call an agent is in the workflow a tool call so basically it's just prompting the agent with the prompt we saw above and then for every step we get so we get the arcs and we get then the delta so I got a col icon next stream so there's a lot of um like

50:19

duplication like this one then we have Monday then we have um a comma like there's a lot of things going over the wire we might need to improve that as well but that's how um AI SDK does it too so if you would just run an agent um stream with like the full stream option um also in master if you use like agent full stream um it

50:43

does exactly this as well so we just copied what um AISDK was doing to make it as compatible as possible with like use chat and whatever features they're going to uh pull out so yeah every delta happens here here and if I go back to my older one and if I should be able to collapse i think I can collapse isn't there a way to collapse all don't think it's here maybe it's in

51:17

view or something cuz I can scroll down as well maybe that's a better solution so then um at the end of the agent I get like the step result and then the output is the whole list again because you might not care about the streaming at all so um you might still want to do the output of that step um want to see that separately or something and then we have

51:51

step finish and then we have finish um with the run ID which seems not to be correct either so that's another bug I have to fix that it's the same run ID as we have oh okay this was a different run where I set run ID to one so it is correct um but in the example I just ran it was like a ID um but technically you can do whatever you want here and let's

52:16

say the agent calls another tool you would get another tool called streaming start but I don't think we have one in this example if I open up the agent there is no tools I think no because the workflow did the tool call with the fetch shredder um ahead of time basically okay Ward we have another question and this one might not even be for you to answer but we should if Marvin was still here maybe he he would

52:44

have some thoughts on this uh that is really cool will Ma Playground implement this in the workflow sidebar meaning will it will mo playground use this streaming to display progress as you're running I'm assuming as you're running it in so yeah we should add it and I think uh Marvin also pinged me privately and you

53:13

as well Shane is like we should and he's definitely right like uh this will become a part of the playground similar where we do like the chat interface with the agent it says like tool calling happened with this information like with this protocol now we can show it in the playground as well um with like agents

53:33

calls or tool calls because I didn't show it in um this example but technically if you have like a a tool um I don't know if I have I guess I have a tool I could pass it as a step as well so create step can have a agent but it can also have a tool so if I do like tool tools that then I have to get I think the tool

53:56

from um I don't know yet but I think it's in tools index so I can pass in a tool as well and this is again I think it has the same name as the function below okay That's okay uh as or something doesn't really matter yes perfect so now I passed in like a step a tool just to a step which is similar to agent so we're basically all the building blocks that we're building in um Mastra will be basically

54:45

part of steps as well like I mentioned we might need some extra arguments here to make um to to give some configuration to these tools uh because we don't really want these um dummy steps which have no real um value except that they clutter your workflow view um but that's why we're building master right like one

55:09

step at a time we build something we validate we we improve and so forth yes yeah exactly uh well this has been really cool to see what's coming i know workflow streaming has been a huge issue honestly you know a long time ago long time being months not years in this case you know not that long ago we built a a pretty cool travel agent example and it had this you know travel workflow that

55:35

would go look for flights look for hotels look for Airbnbs and it but we were just kind of mocking the front end to like say the the steps and it was just all based on like timing of how long it normally took because it just wasn't easy to stream what was happening in a master workflow to the front end

55:54

now this gonna be would be significantly easier to do the same thing so I think a lot of people will uh if they're building more complex agentic workflows with Maestra are going to be able to take advantage of this yep and we also saw like in the new AI key SDK v5 they're allowing themselves to add like custom

56:19

um data types to like use chat and all those UI utilities so we will be um able to add that to like workflows agents as well also if you have like custom messages you want to get over the wire we will be able to enable that as well with like these streaming um functionalities so we will be futurep proof as well awesome well Ward do you have a you have a few more minutes to

56:46

chat about the the release tomorrow and some of the breaking changes you you are more in the know than I am on exactly what's what's going down but I have a list that and uh feel free to maybe talk through or jump in if there's any if you have any color to add to these uh my comments I guess so so we do have

57:10

a kind of a new release coming tomorrow and we've been talking about it for for a while but there are some breaking changes we try to avoid breaking changes right you know because it makes upgrading harder but we still are kind of pre we're still in what we consider what beta so we're still prega so these things can happen but we we do try to communicate often you know

57:33

we So if you have haven't heard you know hopefully now you're you know we are having a breaking release tomorrow meaning when you do go about up upgrading there might be some things depending on what you use that you might have to make some actual changes to your code so it might not be as smooth as a normal upgrade uh one of those is some

57:52

vector store changes i think before there was like positional arguments and now it has named arguments so I don't know any any comments on that otherwise I'll keep going no I think it's just the improvement of uh UX because we have like a create index on the vector DB where now like it's um position uh positional but

58:17

basically it was like arc one arc 2 arc three arc 4 but the more we add the harder it is to memorize where do I put what so that's why we basically moved it to um two options where basically it's now one one argument which like key values um which mostly what I've did in my career is like if it's um get bigger than three that's when we move to

58:45

um like the options yeah and maybe I'll just I'll just share our internal notes of around and we're gonna have a blog post that comes out and talks about all this it should come out tomorrow uh just again so everyone it goes alongside the release but we'll just go through this so you can kind of see examples of of

59:03

some of the things that are changing all right so method renaming so methods update index by ID and delete index by ID have been renamed to update vector and delete vector to better reflect their purpose so there's kind of the before and after of that and I think you know again just trying to make things more clear we we do care a lot about

59:24

just general API naming and so that does mean you know if especially when things are are still kind of new if we can make it more clear for future users you know we we can we can if absolutely necessary do a breaking change in this case you know we we decided it was worth it so PG vector specific changes so changes to

59:44

the constructor again looks like it's more of like a named argument rather than just a positional argument we removed the define index method so now there's you can just use build index for that some pg storage changes the schema parameters been replaced with schema name for better clarity so you can see

1:00:10

that that is you know been updated and that's all the the storage related ones so for memory the default embed has been moved to a separate package so the go ahead yeah ba yeah basically we saw and I saw someone um in the chat as well talk about convex like we have a lot of people that integrate Mastra in other um in other project like is it next is it

1:00:43

like a convex um back end or whatever we saw that they they won't use the defaults but they get the defaults even if they don't want to and fast and embed is one of them because it was integrated in Mastra core and then MRA memory as well basically whenever you installed Mastra um memory or core you get like

1:01:06

fast embed even if you weren't using it and um we basically said like okay this these defaults were great when I didn't know what I was doing and we see that our users are knowing what they're doing and and basically we said like okay we're just going to separate these defaults out to different packages so now you have to um mention them like

1:01:32

yourself basically and there's no magic anymore because people were like hey I'm getting this fast embed problem i have no fast embed in my code like what is this thing talking about and basically we're making those defaults um like removing those defaults and they're still there but you have to do a little bit more work um to get them through the

1:01:54

finish line all right and that's basically what all these memory issue memory changes are it's just changing defaults but they are breaking because you now have to enable semantic recall where before we um we were enabling it by default yeah exactly and I think it's just a matter of you know streamlining the you know making it

1:02:19

easier for deployments streamlining the install experience which again you have to be a little bit more explicit so the out of the box isn't quite as simple but it we don't our goal is to make a little bit less assumptions for you we don't want to you previously we wanted to just like we were making a bunch of

1:02:37

assumptions there's a little bit of magic going on we want to reduce the amount of magic so you're not you know getting to deployment time and realizing oh there was this hidden memory or embed embedding model used behind the scenes and now I have to solve for that or I don't I need to figure out how to deploy

1:02:53

that so I think that is one of the one of the things we've been trying to move more towards all right and so we have working memory now uses tool calls instead of adding content to the text response implicit memory settings default settings have been changed to be more reasonable defaults so reason the

1:03:17

previous were surprising so previously it was set to 40 now it's lowered semantic recall was enabled by default now has to be turned on generate title was enabled but that would that triggers an additional LLM call on the first user message so we want to Yeah added extra latency which we don't want so now it's disabled by default yeah and the biggest

1:03:39

reason for the generate title was just to show it in the playground with a nice title so there was no real utility um for the basic use cases so it was a bit wasted um latency unless you really want to do something with wasted latency wasted tokens yeah all right so now some core stuff there's no more default storage we kind of talked about that right

1:04:08

yep so technically the same thing has happened with fast embed sqlite was always there and we had quite some issues with like Cloudflare because they have like their D1 store but also SQLite itself doesn't work like SQLite web works um but just gave us some issues and then we basically removed it um from master core but you can still get the

1:04:32

same benefits by um importing master lips SQL um like add it as a memory storage or file storage and if you use like create Mastra we will add it by default still but it's visual that it's actually there so um that should help um with like supporting other deployment targets pino is another one that we're going to remove from core so now if you do create logger in core um you got like pino

1:05:03

which is like the best logger out there because it's works with like worker um um worker threads and all those things so even if you start logging like a million logs at the same time your application would would not um feel anything because a lot of loggers they basically um are synchronous even if they write something to like a file um they

1:05:28

basically block the main thread so you only have one thread in JavaScript and basically all the loggers they even if it's like one nanocond or but they could become really really large and um pen no logger doesn't have that issue that that's why we chose it but we also found that like pino is not compatible with

1:05:50

cloudflare so um and probably some other environments as well so we decided that pino shouldn't leave a master core anymore it's just like a default console logger so you don't get fancy formatting you just get a logger um and then we basically have like a a different package but I have to update the example because it's going to just be master

1:06:15

logger and then twe it on the fly we're watching we're watching live editing of our release notes right here breaking changes notes so this is the the logger now so um if you want the same pino pieces and you'll get this on on uh master cloud for free even if you don't put a logger we will swap it to pino um for you uh because it

1:06:42

has like more richer um logs as well so and if you don't pass so this is in will we default this in mastercloud cool okay so they don't specify you'll have it in and if you have Got it yeah and if you have your own logger setup we would still use Pino um in the background for like all our lock capturing and then

1:07:08

um the um other logger will um basically only be a transformer more or less uh it's a bit complicated but um you won't notice any differences but we will still use spino in the background just to make sure that your agent doesn't have any extra latency because of locking okay so master core has moved to peer dependencies yeah that's shouldn't be a breaking

1:07:35

change but I've just put it there uh because it might be like normally all the MRA projects have to install MRA core themselves first and then have like MRA rag MRA memory and um the reason why we moved to peer dependencies because before all the packages we published had like master core as a dependencies but

1:07:55

sometimes you update a dependency but your master core would be duplicated so for example MRA rag would have master core 0.8.0 and then you would update maybe MRA memory and that would have like up mera core 0.9 but then your types would

1:08:15

clash in Typescript and you would be like I have no idea how to fix this and then we basically had to tell people remove your LO file remove your node modules do a fresh install and tada it's there um so it's just friction for nothing and now with peer dependencies the thing we basically tell the packages like use the master core of your uh

1:08:37

parent dependency which is in our case always the um the user project itself so we will always use MRA core from um the project which means there's only one MRA core ever installed and that should help with like these small um um what is called paper cuts basically that um are are are you like those paper cuts shouldn't happen so that's why you're basically moving it to like per dependencies but again it shouldn't be a breaking change um but

1:09:11

you never know so that's why we put it there all right and then master core default import will only include MRA yeah so we still had some legacy master core imports where you could basically import like everything from master core so master storage um I think like all the uh like basically anything that you can get like loggers and everything was able

1:09:38

to just from master/core um we had like a bunch of warnings for I think four months already that you shouldn't import it from master core itself but you always have to go like one step deeper so for storage you should do master/core/sto for loggers it would be master core logger um and the main reason why we don't want this big like everything from master core is basically

1:10:07

um tree shaking so if you would embed Mastra in Nex.js or um don't use our Mastra build or Mastrade dev environments or like um CLI commands you would get everything like even if you only import master storage it doesn't matter node is not smart enough to say "Oh we're only using Master Storage and Mastra." No it will try to like get all

1:10:33

the imports that Master Core has try to evaluate them and try try to execute um or parse them and that's just um adding so much extra um work for the the program basically and then bas and with like like these master core storage you basically only import what's necessary um and we're now basically removing all the warning codes and removing um those file parts but

1:11:05

again if you like have no warnings in Mastra today you would not even have any break changes yeah and and I think you know correct me if I'm wrong but that would help with if you were deploying an X.js site build times and you know serverless function times yeah compatibility issues yeah so because it because it's similar to like

1:11:33

if you're not using master storage for example um technically almost everyone is using let's say you're not using memory um you would get fast embed with this import nonetheless um even if you didn't even use it so there was no way around that and that that could really balloon like function sizes for

1:11:52

serverless functions and all that so yeah this is a this is going to be a big improvement that's why that's why we call ward the bundle ruski all right last last but not least uh removing the deploy command yeah a yeah a small one like basically we already kind of deprecated the deploy command in like four releases ago or

1:12:17

something um and there's a typo here mra MRA deploy like before we had like MRA build MRA deploy and deploy would um execute like if you have the Verscell deployer or Netifi deployer it would execute like Netlifi deploy or Versel deploy and like it embedded like the whole CLI and maybe sometimes older version of the CLI which for no real reason because

1:12:46

users can just execute Versel CLI themselves or even if they have like u it all set up through the web UI you do a commit you do your build command is like master build and that should be enough to deploy to versel so there was no real reason to act to use the CLI even so basically that's why we're deprecating or like removing the deploy command because there's no real use um

1:13:13

to let Mastra orchestrate it for you where you probably know better how to deploy something to your um your cloud vendor of choice yeah absolutely all right well those are the breaking changes and for those of you that have just joined us or have joined us since we started welcome to AI Agents Hour although it's going to be closer to

1:13:40

an hour and a half or two hours today we'll see we'll see how long we go we're just We do this every day u Monday through Friday usually around noon Pacific time is when we start but it does vary a little bit today we talked about some AI news we talked about um oh my forgot to silence my phone so that that's the first we talked about some AI news we talked uh with Marvin from the Monster

1:14:07

team we talked with Ward from the Monster team we we learned a little bit about the dev playground we saw the cloud interface for Monster Cloud we talked a little bit about workflow streaming and we have now talked through some of the breaking changes coming tomorrow so if you are watching if you do have questions or comments along the way wherever you're watching this whether it's X LinkedIn YouTube just

1:14:31

drop a comment we see those we will try to answer most of them as they come in and Ward uh I don't know what you have going on but if you need to drop you can uh say your goodbyes otherwise I'm going to transition over to a storybook time i will um hop off because I still have my farm to take care of so I will uh feed my animals and uh and then next time we

1:14:57

hope to have you call in from the farm because we do like to see the goats and the horses and like to check in we do care we want to make sure they're okay and we need visual proof that you're doing a good job obby is joining me i think it was Wednesday but now I'm guessing maybe even tomorrow and uh we can do like a small live um live stream

1:15:17

to like whenever he's here yeah everyone wants to see Obby um Obby working on the farm helping you i think all of us would appreciate that so for those of you work for Obby yeah exactly put Put Abby to work for those of you that you know haven't watched us before normally Abby is my co-host he is in Japan right now

1:15:36

he thought that was more fun than hanging out with us that's fine but he's going to be visiting Ward in Belgium here soon so they will maybe be calling in together and we will uh we'll see the farm and uh also chat with them about AI why not all right Ward it was great talking to you yeah have a good one

1:15:58

all right so we've been going for a little over an hour now and last but not least this is going to be uh my favorite segment of the day because I get to talk about something that I have built and talk through it with you and hopefully share some of the learnings that I have I learned along the way building it and we're calling it storybook time because

1:16:22

I built a s pretty simple you know you you'll see it it's not overly complex but hopefully that's also means we can all learn from it but a pretty simple storybook generator with Maestra using uh Maestra workflows using uh OpenAI's image gen capabilities and I'll show a demo we'll look at some of the code and we'll talk through you know some of my thinking when I was building it and it is far

1:16:48

from perfect i will just highlight that it is not you know it's it's available to the world to test out and try until the token count gets too high and then we might uh I might turn it off but at least for now it's available to the world so maybe we'll start with a demo and I'll talk and then I'll share some of the code and we will talk through how

1:17:07

it all works and along the way if you have questions please ask in the comments and I will try to answer some of them as I go so let's first get started let me share and me share my screen here and I will show a quick example of how this works all right so hopefully you all can see my screen so this is a very simple

1:17:51

website that I built and I've wanted to build this honestly so the domain is uh fableframes.com i've wanted to build this for a very long time we'll keep it up for a while you know eventually we'll you it's all open source so I'll share the code as well uh I've wanted to build this for a long time but the image generation models just weren't good enough for for quite a while and they've

1:18:14

been getting better and better so if you've you know I I think it's probably been about two and a half years now I guess since stable diffusion first kind of got on my radar i'm trying to remember like time is hard but I always kind of thought of this use case of building some kind of storybook generator my you know candidly I have a

1:18:35

daughter she's three and a half almost every night she wants me to make up some kind of story and tell her a story and so I thought well it'd also be cool if I could just uh have AI help me create a story maybe not you know screen time right before bed but maybe but most likely just for you know sitting around

1:18:53

the house on uh you know during on the weekends or in the evenings where we can create a story together and I can walk you know talk her through it and so there's a whole bunch of examples that me and others that have tested this out have built uh let's see maybe we can uh talk through this is a a fun one so Pips's helpful day on the farm this was

1:19:15

generated you can see there's some text there's an image you can see that in this case you know we're doing story time so Pip is trying to be helpful he's not able to help uh Mrs cluck he's not able to help Mr moo is not able to help uh Mrs woolly tries to help the duck but the duck doesn't need help the duck mentions that maybe the far maybe farmer needs help and then is able to actually help

1:19:46

the farmer out and you can see is able to help the farmer feels really good about helping and uh you can see all in all pretty simple story but this was I'll show you how this was generated but it was all generated just through a couple simple prompts and I think the thing that finally was the big unlock

1:20:08

for me when I wanted to build this and I the reason I couldn't build it a long time ago was just the consistent character creations you can see that the character is basically the same not 100% if you really look but for the most part very similar through every frame in the secondary characters do change like there's still there's more I could do to make this a lot better but you can

1:20:31

already see it's significantly better um than than what you've probably seen before so or maybe you've seen some better things before but overall it's better than what it was you know a year ago when two years ago when I first started kind of thinking through this idea so let's walk through an example so you'll create your magical story we can kind of pick what we want

1:20:55

here let's go with more like a Let's kind of go with like a fantasy style actually I like this style this kind of like bold naive style so we need to describe our main character uh let's say a friendly blue dragon with purple wings but we can describe any character right and fingers crossed this actually

1:21:24

works most of the time it does uh but here's one thing you'll notice and I'll show the code to how this is working i don't give any visual feedback here right so this is working i'm not it's not telling me it's working i didn't have workflow streaming at the time ward if you're listening but I will be able

1:21:42

to update this now and have much better user interactions i could of course just kind of faked it that's what I've done in a lot of cases we could in master workflows you can actually even before workflow streaming you could kind of get specific events so you could also kind of like provide some levels of feedback workflow streaming makes this a lot

1:22:00

easier so we will um yeah I will update this eventually to use that and so the UI will be much better you'll be able to kind of see what it's doing but I'll talk you through the steps it's essentially going out to OpenAI's image gen and it's creating me three characters and the reason three is I want to give the user a couple options it takes this prompt it generates a character in the style that you selected

1:22:25

and it gives you three options for us to then pick and that character is then going to be the consistent character that shows up throughout the rest of the story and so we'll let this thing go for just a second i'll actually share the GitHub repos with you as well so let me get those pulled up as it's

1:22:56

going oh okay so here we go finally worked and so we can see we have three different options chat if you have you know if you want me to pick one one two or three what do you think one two or three which which dragon do we want as our main character i'll I'll give like 10 seconds for the chat to comment in here so if

1:23:19

you have a preference of which character we want to create this story we are in story book time this is audience participation is optional and while I wait for the chat to do some voting on which character we want to be the lead character in our story I'm also going to share this uh let's see i'll just go ahead and share here so you can see my whole tabs so

1:23:57

this is recently I just made it public you can uh see master-I fable-frames this is the front end and I originally built this front end i started with lovable and then I kind of ejected and kind of built it from there but it did start with just you know lovable to create the overall flow and then I kind

1:24:17

of just took it took it from lovable and then built on top of it and then also the fable frames is where all the agents and workflows are living so you can see in mastra we have some agents we have a character writer image writer story writer and then we have some workflows generate character and a story workflow and we'll talk through we'll

1:24:40

look through that code here in just a little bit all right I am going to select this first this second example or third example sorry number three and now we got to give our character a name so um looks like you can't see my screen for some reason all right so I don't know give me one second here to figure

1:25:30

out i don't know if the screen sharing was dropping for you but it looked like it was dropping so let me see if I can fix this uh technical issue here all right here we go so we're going to go ahead and select this third one we're going to say this character's name is I don't know Susie susie the dragon why not and then we need to now create our

1:25:59

story so Suzie the dragon is flying through the forest okay so I'm just making this up but I'm going to say Susie's flying through the forest and meets many forest friends that want to play games she learns a valuable lesson around sharing and taking turns seems simple enough let's create the story and this is going to take a while so while this is running we're going to start talking through

1:26:43

some of the code and then we'll come back again there's no workflow streaming yet so I don't show what's happening but we'll look at the code briefly and we'll talk through uh what's actually happening and uh while we while we wait one one comment so are we keeping our jobs as writing code or is it shifting more into building agents that's a good question i have my

1:27:08

opinions i think everyone else probably has their own i don't think writing code's going anywhere i think you might be writing building agents but you also might be writing code as well you might be using agents to help you write code faster so I think it's a little bit of both to be honest I don't think our jobs are going necessarily going away but

1:27:30

maybe how we do our jobs could change all right so let me go ahead and I'm just going to pull up the master code here and I will get cursor pulled up today could have used windsurf but today I will use cursor because why not and I will share my screen and we will take a look at our MRA workflows and our master agents

1:28:11

all right so we have some code here maybe do another one more zoom all right so we have some uh this is our kind of master class it's source masterindex.ts we just have a logger we have three agents we have a story generator a character writer an image writer we have two workflows generate characters workflow and story workflow and let's take a look at maybe

1:28:39

we'll start with the workflows because there this is very much a workflow driven application so in our index file we have our generate characters workflow and our story workflow so if you remembered we first generated those three characters that's the generate characters workflow and then now we're generating the story which is the workflow that's currently

1:28:59

running as I kind of flipped into the background i'm going to check looks like it's done so we'll go back we'll read it together and then we'll look at the code and again looks like it is not working when I switch those tabs for some reason here we go all right and again I don't know how good this is going to be it's very much

1:29:25

there's it's generated right it's random i have no idea what this is going to say what this is going to do so let's uh let's take a look though and we will see uh see what happens so it looks like it's 10 pages suzie the Dragon's Forest Adventure i can share this you know why not well I'll read it first before I

1:29:45

share this uh share it out but Sus so this is story time so unfortunately for you if you're I'm going to read it because why not suzie the dragon was a bright cheerful creature with shimmering scales that glistened in the sunlight she loved flying through the forest her wings creating a gentle breeze that

1:30:03

rustled the leaves one sunny morning Susie decided to explore a new part of the forest she had never visited before as Susie soared through the sky she spotted a group of animals playing near a sparkling stream curious she landed gracefully beside them "hello," she called out her voice as warm as the sun the animals a rabbit a squirrel and a

1:30:22

fox looked up and waved excitedly and I'm also just realizing if you just joined this uh you know this stream and you hear me reading this story book there's not a lot of context here but stick with us and we'll explain what's happening hi Susie said the rabbit hopping over we're playing a game of tag do you want to join us sus's eyes lit up with excitement i'd love to she replied

1:30:45

her tail swishing with joy she had never played tag with forest animals before the game began and Susie quickly realized how fast her new friends were the squirrel darted up trees the rabbit zigzagged through the grass and the fox was clever and quick susie flapped her wings to keep up laughing as she chased

1:31:02

them around after a while Susie noticed that the others were taking turns being it but she hadn't had a chance yet "can I have a turn to be it?" she asked a little shily the animals paused and nodded realizing they had been so caught up in the fun they forgot to share susie became it and chased her friends with glee her wings giving her an

1:31:21

advantage in the game she felt happy to be included and even happier to see everyone having fun together "this is so much fun," she exclaimed her laughter echoing throughout the trees as the sun began to set the friends gathered by the stream to rest "thank you for playing with us Susie," said the fox smiling "we should always remember to share and take

1:31:40

turns it makes the game more fun for everyone." Susie nodded understanding the importance of their words i had a wonderful time Susie said her heart full of joy i'm glad we all got to play together and that everyone had a turn the rabbit squirrel and fox all agreed their faces beaming with happiness and you can see uh there's a

1:32:00

little issue with character creation here especially secondary characters but overall it's been pretty good so far with a final wave Susie spread her wings and took to the sky feeling with the cool evening breeze against her scale she looked down at her new friends grateful for the lesson she had learned about sharing and taking turns as Susie

1:32:18

flew home she thought about all the fun she and the new friends she had and the new friends she made she knew she would return to the forest soon ready to play and share more adventures with her forest friends so there you go so not too bad see if I can copy this link uh I guess I copy it here and I will post this on our YouTube for any of those that want to see it

1:32:46

so if you want to see this uh this link go to our YouTube channel find it in the comments it'll be posted there uh well let's talk through it let's talk through the example so the only major problem I saw with this I don't know for you watching but consistent character creation kind of failed on this on the ninth page but other than that the main

1:33:06

character you can see is pretty good the secondary characters because they're pretty general were pretty good and I have some ideas on how I'd solve secondary character creation but I just haven't had the time and I don't know if I if I will solve it but it's open source maybe you can solve it so we can make this thing better uh

1:33:24

but let's talk through actually how I built this and how it all works so let's take a look at the code all right so as I mentioned before we have these two workflows and the two workflows kind of drive everything that's happening in this application so the first is this generate characters workflow so for those of you that were

1:33:52

here at the beginning you saw we created a prompt we got three options for images we chose one that was our main character and then that character was then represented through all the pages in the story so if we look at the generate characters workflow and looks like there's type error probably need to

1:34:10

update but we'll just ignore it because it is working uh so the first thing that we do I like to start when I look at workflows I like to start at the bottom so the generate characters workflow has just two steps it's enhance character step and then generate character step so it's really you know just two steps very

1:34:30

simple workflow let's walk through what each step does so the first is this enha is this enhance character step so the goal of this enhance character step is to take the first user's prompt because a user isn't necessarily the best at generating a prompt for a character so we kind of go through this enhanced step and this is pretty common in a lot of uh AI tools

1:34:56

that are built where you take the user's prompt and you don't just take what they say but you run it through some kind of lightweight enhancement step which gives you know gives the following you know agents or LLM calls a better prompt to work with because again users especially they're not prompt engineers they don't know how to write a good prompt so you

1:35:17

can kind of improve their prompt to be more consistent based on what you think you need uh later on in the workflow so in this I say transform this basic character description into three detailed character options limit each description to two sentences so I take their basic character description which gets passed

1:35:40

in when the workflow is called that's what the the user enters and then I want to basically expose it or extract three character descriptions because that's what's going to drive the the image generation so then I specify the output so I I want the output to be you know an array with three strings so an array of

1:36:05

three that you know is three different strings for those descriptions and then I this gets passed into the next step so I get the previous step result i also get the style so I pass in the style so if you watched when I generated the character I first selected a style that style has a very specific prompt so I pull out the results of the previous

1:36:28

step i pull out the style that they selected i'm using superbase here to uh store the images superbase storage and now I'm basically just doing a map or just looping through the three different strings and saying create a children's book illustration of this character with whatever you know all three of those looping through the

1:36:52

illustration should be vibrant expressive suitable for a children's story show the full character with a simple background that highlights their key features and then I pass in the style so the style could be more like a watercolor or you know like the bold naive style or like an anime style but whatever style they select gets passed in and then I'm calling this generate

1:37:11

image which is just calling this GBT image one i'm calling it again i'm I'm doing a map so I'm calling this independently three times when I first started I just tried doing a generate image with you know I only had the pre enhanced step generate one character and then I called an NF3 which is much faster but the problem is almost every image was so similar because it does get a pretty complex character

1:37:39

description and I wanted the I wanted the images to be somewhat different i didn't want each image to look you know 95% the same with just subtle differences i wanted them to look quite a bit different so you had options to choose from so we're just looping through we're calling it three times um then after we generate the image we

1:37:58

are basically getting a buffer we're uploading that file to superbase and so we're just returning where that image is stored and then we just do a promise.all so we run that thing three times we're doing three generations uploading those three images and then we're returning that and that gets returned to the front end and then the front end shows those

1:38:18

three images you give it a name and then you proceed to um the next step which then would be to generate this kind of story workflow all right but before we do that I do want to say so we called out to this uh up in the enhanced step so let's we called out this character writer so which is we went did Maestro we got an

1:38:43

agent which is this character writer agent let's actually look at what that agent does so we have this character writer agent and the system prompt is it's pretty basic agent here we just gave it a name we give it a system prompt which is a set of instructions and we're just using 40 mini for this all right so you're a skilled character designer who excels at

1:39:06

transforming a simp simple character descriptions into vivid detailed personas suitable for children's stories your task is to take a basic character description enhance it with rich specific details that will help create compelling visual representations so these are the guidelines that I give it maintain the core essence of the

1:39:24

original character description keep the details appropriate for children's for a children's story ages four to eight avoid scary or unsettling elements if I didn't include that there were sometimes it got a little dark want to avoid that um include at least one unique memorable visual element that sets the character apart so I wanted each character to have

1:39:42

some kind of flare whether it's like a hat or a scarf or something so I wanted to tell the model to give it give the character something that then will be repeated across all the pages so it looks kind of unique but it also you can tell that it's the same character uh throughout and then uh include at least

1:40:01

ensure all all added details support enhance the character's role make sure the description is not too long limit it to two sentences do not give the character a name so some of the time they would like print the name on the character or do you know interesting thing or it would it would generate a name in the story so we just didn't want

1:40:20

to have a name because we're going to let the user give it a name and so we don't want it to sometimes you'd pass in the character description which would have the name of the character and then the user gave it a name and it would throw off the story creation so um yeah so that's the prompt and then again it maybe it'd be a

1:40:38

good idea so we for those of you that are just joining I'm going to walk through those steps so now we can see let's do another story you can kind of see how the code works you'll see how it kind of ties together and again all this is open source so I will share what those are those links are too so you can see it and you can then

1:40:58

um decide you know if you want to pull it down try it out yourself so let me share my screen again okay so here's the this is the front end of the site master-aifelra on GitHub and here is the actual the AI agent back end which again has this the workflows and the agents that I were I was just showing if we go through another example let's create

1:41:29

another one let's select let's do like this watercolor example that's kind of cool um let's go uh let's see what do we want to do a cuddly bunny rabbit with a bow tie and a big smile why not let's Let's see if how well it listens say a blue bow tie and so again this is now running that character generation and as I mentioned before I'm not doing any workflow

1:42:10

streaming yet that so I you know I would spend more time on this UI giving the user some feedback so you can kind of see that it's actually working and there's some indication right now you just kind of have to wait so if you do try it you know just know that it's going to take some time for this thing

1:42:28

to generate and we'll give it a second if you are just joining in you know while we wait while we wait for this if you if you're just tuning in uh this is AI agents hour but we're going on almost two hours now so we've you know I guess uh it's false advertising but if you just joined us we have talked through some AI news at the beginning we met Marvin from the Maestra team who talked through how to build or

1:43:02

what he's building and he talked through some of our development playground that we have within Ma some of the changes that are coming with that he showcased our MRA cloud dashboard a little bit we talked with Ward about workflow streaming which you can see from this example I do need and we also talked through some of the breaking changes

1:43:21

that are coming up tomorrow with the new master release and now we are going through a storybook time example that I built over the last uh month or so just kind of on on some off time and but it's something I've been thinking about for a while and finally now the models have gotten good enough to where you can actually build something pretty

1:43:39

compelling all right we can see here we now have our storybook characters which one do I want i'm going to go ahead and select this little gray one here and uh let's see i'm going to call him he's a bunny i like alliteration so Billy billy the bunny i am not very clever if you have better uh better ideas please share them in the chat in the comments and then I get to create a

1:44:13

story so Billy the Bunny let's see what do we want Billy the Bunny to do has a tough first day at school but his parents are sure help him understand again not being very creative but we'll see how it does with this i I find there are there are tricks to even creating the story of course just like there's tricks with how you write your

1:44:57

prompts the goal of course is to try to not make there be tricks it should just work for everybody but we'll see how this does and again I'm going to let this run and let's walk through what's actually happening now in this workflow so this is the second example we've seen but I think it's useful now for us to take a look at the code and we can see how it's actually doing everything

1:45:20

all right so we have this story workflow and I like to look at the bottom to see what's happening here it's a pretty simple workflow generate story pages generate page images and then combine story so again three steps overall it's actually pretty simple it's not doing too much here so this first one is generate story pages so I get this story generator agent which we'll look at what that does

1:45:53

but I give it a prompt create a children of story with the following character i pass in the original character description or the sorry the character name with the character description the theme of the story should be and then I pass in the actual context that I just wrote right that of what what the story should be about and then it's going to return an output of with the title with

1:46:18

pages which is each page has the string that contains the pages text so the text of each string that's the story that we actually saw and then the setting so it I wanted to describe the environment so that we can kind of pass that setting in later i believe that's how I use that so we call the story generator agent with the prompt and with the output and then

1:46:42

we just return this so it passes it on to this future step so if we look at what this uh story generator agent does your children's skilled children's story writer your task is to create an 8 to 12page story based on the provided character name lesson and story description and then I have some rules and guidelines of how I want it to

1:47:02

actually follow this and I'm using 40 for this so you notice for the enhanced step I used 40 mini so it's a little faster writing the story I wanted to use slightly better model so using 40 all right and now we continue on so now we're generating the page images and for this I get this image writer agent and I also I'm using superbase

1:47:31

here so I basically I make sure I have all the pages i get I get the image writer and then I loop through or I go through each page and I'm essentially calling out to this image writer to generate a detailed image for each page based on a number of things so we can look at this prompt so I'm saying I'm telling it passing in information of what page it is what the

1:47:57

text of the page the character description the character name the story setting and then based on the page tech character description and overall story setting create a vivid detailed image ensure the image description incorporates elements from the story setting and then we call generate with this output schema and so the output

1:48:16

schema as I said here is just the image description and essentially then it will call the it will get this description uh let's see here how does this work all right and then we fetch the character oh so I also fetch the character image URL after I get the description so this is the again when we did the character selection part we selected a character that we wanted

1:48:50

we get a URL for that we're basically loading that in and then I am passing this into GPT image one with the image file and with this I'm saying create a children's storybook illustration for the character here's the image description here's the style and then Um I'm getting that page back and then I'm uploading the image

1:49:21

here so basically it generated the image for that page so you can see like the image description was created previously and then I pass the image description in get the image upload it to Superbase so it's kind of similar to before but I do this for every page right so I'm doing this for 10 pages so I'm looping through this

1:49:42

i'm doing a promise.all so we kind of running them all in parallel but it is uh it's generating all the pages uploading those and then we move to the combine story step which all this really does is it just kind of takes all the previous results and compiles it so we get one nice object with the title the

1:50:00

setting all the pages with the text and the image and this is just so when it passes that to the front end I have a nice object to work with and so it just does some combining maps it returns the object and then um and then yeah if we look at what is actually happening with this workflow again I need to pass in when I called this the

1:50:22

character prompt the character image URL the character name the style and the theme of the story which is the basically what I what the user prompt entered for what kind of story they want to generate and then as mentioned before it just goes through those three steps sequentially so if we go back hopefully our story is done now let's

1:50:41

see it looks like it is all right so Billy's Bright School Adventure i'm not going to read this one to you i've already read already read the last one and we're we're coming up on time but you can you can read it pretty quickly i'll just flip through the pages you know looking for hopefully I see the the blue bow tie in all the

1:51:20

pictures talking about being brave met a friend Daisy so here here's where again so I'll point out some of the things that if I were to spend more time on this I would improve so one of the things I would do is I'd focus on secondary characters you know this would make the workflow a lot more complex but if the story contained significant secondary characters I would

1:51:46

generate a character image for them and then pass that into image genen as well so this character here is not going to be the same on every every page but if I did break that out I could kind of like force it to know that this is the secondary character and this should show up the same right so it's not it's not the a different

1:52:10

character or there are probably other ways too if I would just to pass in a detailed description of the secondary character you could probably also get something that's pretty good much faster without having to do extra image generation which can be costly so that's another alternative of what I would do if I spent more time on this trying to

1:52:28

get you know secondary images in there and yeah you can see this had eight pages it's you know it it works it's it's generated there's some Oops I don't need to do that there's some things I would improve if I were to spend more time on it i'll post this in YouTube so if you want to see that story you want to click on the link go to the Mastra YouTube channel go to this live

1:52:53

uh this live uh video I guess and if you or if you're watching it later go go to the comments down below and you'll see that there the image is there you can play around with it try some out on try some of these out on your own i'll keep it up for a while if the token count goes too crazy I will uh have to scale it back or shut it down but hopefully you all have some fun building some things again if you want

1:53:20

to take a look at uh at this actual code let me share that one more time it's all open source on GitHub master-ai fable-frames or master--ey fable-frames-mra for the back end so you can see how I'm interacting with the front end and the back end together there uh the front end is deployed to Verscell I believe yeah it's looks like

1:53:48

it's deployed to Verscell the back end we have deployed to Master Cloud and yeah it all works pretty pretty seamlessly together all right everyone and that is it for today so thank you for those who have joined us for all the comments we got in the chat uh thank you and we do this every day Monday through Friday we don't normally go this long uh sometimes we do but we normally go around an hour

1:54:19

sometimes a little longer today we went around two hours because we had a lot of great content we spent the first bit of time talking about some of the great things that are happening in AI or specifically around AI agents the thing that's most exciting for me that I I'm very interested in trying out is GitHub's new code agent where you can

1:54:38

basically looks like you can just give it a task which is a GitHub issue and it will create a PR for you that's going to be pretty cool i want to try it out i don't expect it to be perfect of course but I do want to see what it's capable of seems very cool kind of similar in some ways to OpenAI's codeex which we talked about last week and we talked

1:54:56

about a little bit earlier we did meet some masters we talked with Marvin about what he's working on we saw a demo of some of the new changes to the master dev playground we saw a demo of master cloud which is in beta you can request access by going to our website and clicking the request access button we then talked to Ward about workflow

1:55:16

streaming which if you just watch the storybook example you could see that I desperately need workflow streaming to make my UI and UX significantly better we talked with Ward through some of the breaking changes that are happening in our release tomorrow so keep an eye out for that and then we walked through this storybook example so you if you uh

1:55:36

probably saw me go through it build a couple stories walk through the master workflows and master agents that made that possible and we will be coming at you again tomorrow we will have some more guests we'll have more guests in throughout this week if you uh have someone interesting that's building AI agents or have has interesting things in the AI

1:55:56

world to talk about send them my way always looking to have new guests on the show if you haven't give us a star on GitHub go to master-ai on GitHub and go to the master repo give us a star please and please follow me on Twitter or x smise 3 i do this every day normally Obby is with me abby will be back shortly you know he's getting he's traveling from Japan to other parts of

1:56:23

Europe to see some of the other people on the master team but he should be joining in more frequently in the near future and if you do want you know one last pub if you want principles of building AI agents if you want this book that our other co-founder Sam wrote go to master-aibook you can get a digital copy if you want a physical copy we're going to start giving some of these away on

1:56:48

the live stream not today but I got to figure out how to do it but uh we're going to start giving some away and so you can you can uh sign up for uh chances to win we'll send out some physical copies of the book as well just just for fun and that's it we'll see you next