An AI Agent that Creates AI Agents
Today we begin building an AI agent to create AI Agents using Mastra.
Episode Transcript
coming with you live and yeah we're just going to be vibe coding some stuff We're going to be building Abby what are we going to be building today Since we're the admirals of AI um and also in the palace of the dog right here um we're thinking about building an AI agent that creates AI agents So sounds cool Let's try it out Normally we are not in person You know
we're not always in person but today we're together So we're just going to figure this thing out and we're going to do it live Let's do it live Okay So let me get situated here And for th for those of you just tuning in maybe seeing this for the first time we have haven't really done this often but you're going to see us a lot more So hopefully you can tune in We'll try this at least a couple times a week and you
can hang out with us learn how to build stuff with Maestra and other things And today we'll be building an AI agent that Oh there's eight people here AI agents What's up eight people Yeah And we'll we're still figuring out you know how how to monitor the chat Can you see my CLI Sweet You might need to you know take it up a click or two Got to take a couple clicks Couple couple clicks Shout out
How many clicks Shout out Matt Pocak for telling me to give give me a couple clicks All right And so I guess before we start you can see my um terminal It's we're not sponsored by Warp but Warp if you're listening maybe we're also not sponsored by Celsius But if someone's listening but we are sponsored by this book called Principles of AI Agents So
if you need a copy let us know master.AI/ AI/book get um but yeah before I actually begin so uh Mashra is an agent framework uh we do and most of y'all here probably already know that that's why you're here but we've been thinking lately like how do we bootstrap masher projects like faster better stronger um because a lot of it
is you you kind of come to building an agent with intent like you want to do some particular thing and so how do we bridge that from you wanting to do something and having an agent to do it like in the quickest way possible We're going to write more code right now to see if we can actually do that So I'm going to create a new MRA
project You can use mp uh mpm create or whatever I just do this and it's going to open our CLI up We're just going to start a basic project It'll create a weather agent But this what should we name this Let's call it because our idea for the live stream is we're gonna work on this It's almost like like an episode or like a season right Like we're keep working on this thing Should we name the project appropriately Sure Yeah We we'll we'll
get uh we'll get started today Let's call it Admiral There we go Admirals of AI Yeah Most Admiral All right The CLI is nice Um if you all have ever used like Clack and uh there's a lot of cool CLI modules now I remember back in the day we had to use Oakliff No offense Oakliff but remember commander too There's so many And thankfully pretty CLI are a thing
now We're going to put everything in the source folder We get get the agents That's what we're doing I don't really need tools We will probably go with anthropic But who knows maybe we'll do Gemini But right now we'll go with anthropic I'm going to skip this and let's add the example Actually don't want the cursor thing um because we're building that
ourselves essentially Okay cool So we have a monster You want to click that hide button on that screen share server Oh man Okay All right we're back All right So I use Wind Surf by the way Don't at me Yeah Well they just got uh bought for a lot of money Guess I uh you you're early I'm a betting man Actually what I'm going to do is I'm going to get the the API key So let me stop sharing for a
sec and then go do that real quick And for the 39 of you that are watching whoa there's 39 people Yeah thanks for being here You can uh chat with us And I am not sure because we're just figuring this out how I respond to you So oh I can see a couple Uh there's a few people Jeremy Pawan Big Force CA what's up dudes Cool
Good to see you all Uh cool Yeah so I I can see some of you all on YouTube I think uh you know we're on YouTube we're on X I think we're on my personal LinkedIn So wherever you're tuning in from good to see you Also dude we're old as So like we've never done live streams before You know you know you only live once Let's do it live Enough for this Let's do it live
Okay we're back in it We're back in it All right Um Okay So let me just not show my that Okay Get it back in And here we are Okay like I was saying I use wind surf um and monster you know we bootstrap this agent I'm not really going to use this per se but I'm gonna I'm gonna tell you to click that hide button Oh yeah Oh yeah Sorry And I need to increase some clicks Yeah just give me a few more
clicks Got to get the clicks up Okay so this is our default weather agent I'm don't really care about it honestly And I'm going to do something bold right I'm going to have Windserf write my instructions for me And let's actually just like vibe with it to see how this goes So what I want to do is create a an
agent Um but that creates agents I need to create I need a simple system prompt I can iterate on Uh we are using MRA I will supply some tools after this Now I don't know why I added that extra context there Probably because I'm just a nice dude you know and I don't I believe in Skynet So if you're nice to your agents now or your AIS now maybe it'll help
later or it'll screw up and then you know we'll see what happens That that uh that niceness can turn to a So it's what is this a new Oh it's just just zoomed in So it looked all weird to me but it is using the master docs MCP because I have it globally You have it globally Yeah So we do have the master
docs uh MCP server globally So it knows how to create agents and read our docs and do all that kind of thing As you can see it's kind of just like learning you know Um but it also didn't do what I wanted it to do Well it didn't write it which is weird right No it just gave it to you It gave it to me What happens if
I click insert Interesting That changed huh That behavior Yeah that's a little new I also need to restart it But if I do this everything might change You know I I So for everyone watching I am one of the dudes who do not restart to update if I'm on a roll because the minute I do my whole life gets Yeah You don't know what changes It's like It's like you're you're anytime you if it's
sucking I click that update button right away If if things are going well I'm a little hesitant you know Yeah And if things are going well it comes back like a stranger It's like ah this relationship I built with my editor is gone Let's read this thing So you are an agent creator a specialized assistant designed to create and configure Monra agents Okay that's probably pretty cool Your primary
function is to help users build custom agents when responding Yeah so this is all right but we actually want to write code right So we need to edit this now So what I like to do is I just always use I'm like in Windsurf I'm a command L Like I'm all about command L which is just highlight this thing I want to talk about that
right Bring this code into context Um so now I'm going to be a little I'm going to be a douche to it So bro you are so verbose and this prompt doesn't even help help us write code We should tailor this to producing code We can write to files Of course I'm right It is always very polite Absolutely All right let's see what it's doing now Sometimes I wish it wouldn't tell me I was right because it just gives me a false sense of confidence that I am
doing the right thing This is interesting Uh we're not going to do this because the output is um has to be someone's like well we we'll use like a temp directory as like the project folder But also I'm kind of thinking of not vibe cutting because it's already going like the way I don't want it to go So I might have to like just not do this
Yeah I mean what's the what's the goal What are we trying to accomplish I want to create an agent from a prompt but I want the I want the artifact to live in the folder The artifact is the agentindex.ts or something like that So let's just not vibe or let's we'll vibe it but let's do it our way Um also I don't want to use this Let's
use it Nope Wait this is cool Memories Chill Actually don't really care about memory right now So I'm just going to just simplify my life a little bit The admiral agent So we need some tools that I'm just going to make up right now Um I'm sure we could like uh reach for like an MCP server Maybe that's what we should do Uh can you look up Yeah we can do tag
team What's the MCP server for like uh file system Yeah let me get you here And while that's happening I should install our MCP package Cool So I'm going to bring an MCP server in I don't know which one yet but we have this MCP client class It's pretty sick Um pretty much allows us to bring MCP except it autocompleted AI SDK That's fine And we'll make a new client here
We need to become better friends so I can just airdrop you this I know but we're not there yet dude We'll get there Uh is this an object Yes Um I mean you want me to just That's what you need right Yeah Command MPX args is an array Sorry I should talk out loud Args is an array Uh you can do Y and then usually it's like the um the MPM module If you're going with
MPM or if you're using some UV good luck And if you're using Docker semi good luck Uh then we do Oh I can put that So this So this will make like a file system path right Yeah I think yeah I think you get to define what I don't know if that's I think any allowed directories It looks like you just pass in So let's just put it in
admiral and I mean that'll be at the root of your file system Is that what you want Yeah just to just to test something out We'll change it there Maybe in I don't know if it has right access Maybe temp ad temp I don't know Figure it We'll try it The temp directory So obviously Node.js has OS So we can just do import OS from OS
Let's make a tempter dur OS.TMP or some Yep And then let's just pass that as this But we should log it too because I'm not going to know where it's at And I don't know We'll see if that works Who knows the tools here Yeah Tools solid and Yeah sure So let's go open up the playground Okay So that's our I was
already doing some stuff My bad Um but as you can see it did create that temp directory right That's where our stuff's going to happen Allowed directories Is everything in there That's fine for now I'm cool with that Let's go see Oh Let's go see what we got in the tools Yeah So with Monsterra you get this local development playground So as we're building out our
agent we can just give it a test see what happens So we have write file Nice Okay So this is what we're going to do We're going to start real simple So I'm going to use I'm just going to tell I'm going to I'm going to uh rig the game Use the tool What's this tool go It is file system Write file And if you can't already tell you know
maybe don't play this live stream around young children So you know Oh yeah I'm sorry I'll get better at that I don't have any PR training yet We're not there yet as a company Um so you've been warned Uh you know I I would I would try to stop it but I I've realized I can't So you are you're stuck with it just like I am Yeah
It is It is what it is everybody Okay So we got this going I just added this at the end But like the thing the another thing that's a problem though is it doesn't necessarily know anything about Monstro when I execute it So I need to add another tool which will be our MCP um doc server So we'll do the same kind of deal I'll call this
MRA command is the same honestly the same deal except we're doing MRA MCP doc server Is it at latest at latest or something Just in case I should also install this Yeah So I'm do that Well we Oh that was pretty fast Do you need to install it if you're Cuz I'm I'm using it as a module now Oh actually no
Use MPS I didn't need to Yeah you should That was worthless All right Sorry Extra step Cut that out We'll We'll cut that in post No we'll cut that in post No we won't We're live do it live All right let's get back in the playground So we can see that now we have more tools Um I know there's a bunch of MCP
hate but MCP is pretty sick Um all right So now we're going to test some stuff out Let's just see what happens Um make me an agent that uh is a calculator All right let's see what happens I'm calling it now that it's uh so it creates a directory You should have said master agent I know I really screwed that up You should have said master You should got to give it a little more direction than that But
we're going to see what happens What is happening I see that we need to create files Okay Access denied Path out Oh no path allowed Maybe I didn't uh configure it properly because I didn't put a second Yeah I I don't think it I think those are just it says other The documentation said you can have multiple paths If you look at that error it looks
like it says it's outside nothing outside of that directory Yeah So also that's one thing cuz it's actually assuming the current directory right where it's actually doing it Let's leak the temp into the prompt The path to your directory is this I don't know Let's see what that does Also how cool is that playground though We just updated the tool like the UI here I This kind of my first time
seeing it which is actually bad but um it's pretty sick All right let's try that again So create a master agent Also let's We always do this Shane and I It's like how much do you want to bet this works on the first try It's always never right But if it does work on the first try everyone takes a drink
You take a drink Yeah In this case Celsius Yeah So and if you know anyone just let me know All right So beta mantra agent That is a calculator Let's see There's no way it's going to work No way But it read about the monster ducks Yeah it's it's learning See you had to tell it Why does it look all whack dude What's this stream text all We got to fix this It's all on the
same line Yeah needs to be Let's go That's what we call a regression Save that for later Okay What happened now Parent directory does not exist Oh it's trying to write things source mro because that's what it knows But there is no bootstrap thing Oh okay So let's let's keep doing this Um if there is Okay Check for a source And
also if there's a better way you should just comment Yeah Yeah Send us a comment if if we uh if we're missing something obvious here Very if files exist before writing them create them if necessary Let's just leave it at that And also we need to take two seconds to celebrate We just hit 100 viewers Cheers buddy 100 100 What up dude
All right let's keep going All right So create a MRA agent that is a calculator Once I prove this works I'm going to write a workflow That's what we're really trying to do All right So it's creating a directory creating parent directories Okay What the Uh let's see Nice Uh you know file system access issues All we're trying to do is write
So I understand the path is this which is essentially but it's not the slasht is not included for whatever reason Let's simplify our Let's simplify our lives a little bit Let's just maybe hard code that because I think the tempter probably changes Yeah Why don't we just create Let's like always We could just
create a directory and just open it up you know That's exactly what I'm going to do So we'll call this our temp here Whatever And I'm just going to do temper is path join Honestly I think it's just I think it'll just get Tempter We'll see Um is it Durame Is that still a thing I guess so Actually no I think I just do temper honestly Just log it See what happens Yeah
you have it done Yeah Oh But stuff happened Nice No such file or directory Where are we actually No such file directory Tempter Yeah I think I need the name Oh it's not What is it now This is where we bought it Yo it's like import meta or something but I don't want to think about it Do I need to reference temp
Oops I guess I couldn't find it because there's no file in there For those of you just joining us we are attempting to uh code vibe code an agent that writes agents You know we're calling it Admiral Basically we want a way for us to chat and create master agents master workflows just through like a chat interface So that's what we're building
We're yeah doing the thing that always happens when Yeah when you're we're building running into errors Yeah Um so yeah we're actually in the dom folder So we could we just put it in there Um we could Oh now it's Look it's taking it's taking liberties dude Yeah Sometimes uh noticed 37 just you know sometimes I don't want your man That doesn't it just tries to fix things you didn't even ask it to fix Didn't
even Yeah didn't even ask and is a has a mind of its own I need to like resolve this path or something I forget Um the tempter is two levels up or something All right I don't know I'm just This is all Processed out current working directory Yeah CWD But then alternatively you can use special durame Yeah Well we're in we can use CWD
or I mean yeah we hacked it now So I guess we're good Back in back in it Um create Also I don't want to keep typing this in I would rather do programmatically if I'm going to keep failing like this Um that isn't create you know sounds like time to create a test Mhm Ooh we're creating things Yo nice temper source Okay Okay Where's my temper at Oh folders yet It didn't
finish But that's because I think there's some max steps BS going on So let's go to the settings here Yo let's make max steps a thousand No I'm just kidding Let's do let's do 100 No let's do 10 Let's do 10 Let's just you know and also let's bring memory in because maybe this is a conversation right that needs to happen
and it can remember Let's say last 10 messages is fine Cool And then actually we can create a conversation So we're going to do monster agent Create a monster agent that is a calculator Oh I didn't Did I change Oops No I'm going to run out of max steps That's okay But now it's a conversation right I can follow up with the agent as opposed to last time Every
me without memory you know like every message is like a new message right So now it's listing directories Hey we're getting somewhere dude At least we're getting somewhere So we have a new thread You can see on the left here we're in the conversation It created What directory did it create Agents directory I like that But then it ran out of steps Yeah Maybe just
tell it to continue See what happens Keep going bro memory dude Keeps going Let's go I don't even know what it's We'll see what it's outputting now Okay it's writing a file Oh but I couldn't see it Yeah we have a regression on the Eli here Yeah we will get it fixed Yeah but it is writing some files That's it's doing it's doing its thing I don't even know what it's writing We got to have get a Well technically this is not the
right surface area right for a like maybe it could be We could build it right into playground I guess But Oh okay I built a tool Built a tool Build an agent Calculator agent Oh okay So let's actually go check the code then Temptor Yo So it did it wrong But that's not how you shouldn't create an agent
that should be new New agent It just made that up Yeah So okay Wow it it hallucinated that That's so hilarious though because you know as we saw it did not actually use Monster MCP doc server before writing the files I did not see one Anyone in the chat do you see that I didn't Yeah I didn't So we need to make
sure this fool listens to us And this is how we're going to do that by prompting again First I'm going to say don't assume you know everything You must use these two honestly Um let's just say as your primary Um man I hate how I just feel claustrophobic in this big ass screen dude You must use MRA docs and
um Marra examples as your primary sources or tools to gain information Let's move this Also the stuff above like I'm not really cons I could remove it but also you know I'll just leave it there for now Maybe that's the reason why everything's working and it's actually not this but it's not right Um okay So
restarting Amazing Yo bro you wrote the agent all wrong Try again Was the tools definition right Thanks for apologizing I appreciate I appreciate its niceness Claude's such a nice guy you know Yeah Oh there's a comment if you want to Use cloud code and warp and explicitly call out the MCP server The execution rate is so much better than when surf
and cursor Good call Yeah it's probably worth Is cloud is cloud code cheaper now Yeah I heard that Yeah I I actually haven't used Cloud Code that much So I spent 45 bucks on the first day like in one call but maybe I screwed something up So then I was like anti-Cloud code because I don't have 45 bucks for a call
you know but it's probably cheaper now Let us know in the chat Yeah Yeah Jeremy let us know what what what Cloud Code is uh costing you these days So what I'm thinking is um I think we So in our agent I think we have default settings right default generate or default stream options Let's put our max steps just as default Dave asks can I yo can I directly use JSON schemas in a
tool or do I need to convert it to ZOD Um if you want to use like our tool like create tool um I believe it only supports um it only supports ZOD The tool function from versell AI SDK supports both Yeah The reason why we don't do it is like our workflows and a lot of our system is Zod powered We may go to a standard schema in the future but like
we're not doing JSON schema you know what I mean Yeah you can you can convert though There's like you can convert uh JSON schema to Zod or Zod to JSON schema We use it internally So yeah there's a package you can use that that does it but Oh yeah Need to be Zod Oh dude it's doing stuff while we were waiting Oh but
it ran out of steps So again I thought we updated Well I just made the default So let's see What did it write though Okay Let's see if it made it any better No it didn't write anything All right So let's just try again Jeremy Jeremy regarding cloud code says "It's much better Costs a lot less than your time if you get max and you end up not paying a huge amount
I've I've implemented every V-Next workflow with the MCP server in search and it was amazing Cool dude Dude shout out for V-Nex workflows Thanks Jeremy Thank you Try again Sorry we got kind of off task Um what were we doing We're trying to get the agent to actually work dude All right so let's try Okay so I'm
going to correct it just because it's annoying And in this case we can't you know just turn it over to Claude code because we need we need our master agent to write the agent So can't quite do that But use create agent which is a method that doesn't even exist Try again Maybe I'll be nice Please So what I what I expected to do is to read the docs and then write the
code It's reading the docs It's reading the docs What are you reading Agent.mdx Okay that's good Dude what if in agent MDX we wrote some type of that says create agent and that's the reason why we have we by using our MCP doc server we have caught a lot of issues with our docs Yeah Okay It's doing its thing I
think Yeah it's going it So you can see guys or y'all like this thing goes off the rails right Obviously this is very naive We're just doing some naive stuff right now but it's already going off the rails And right now we don't have a stop button either Yeah Just let it write We are now at 150 live viewers So welcome Welcome to all of you who joined We're just uh trying
to vibe code a uh agent that writes an agent So we're trying to build a master agent that can be used to write other master agents and master workflows with with the long-term goal that you know maybe we can bake this into the playground and just make it really easy for people to quickly generate agents
and workflows Also we haven't written much code but also it's not writing the code So it's weird If you delete the What if you just like start over Just delete the whole delete all those subfolders and just try it again And let's see see what it writes Supposed to do a new chat Yeah I'm I'm kind of tempted just to have you tell it to write in the source directory So it just writes like Yeah just let it go
It'll it'll break obviously unless we get it working Um make me a master agent that is a calculator And this is like our test prompt that we're kind of just trying to make work Yeah Something stupid Dexter Hey Dex Yeah Sorry I'm just looking at all the comments Okay let's see So I guess we're having better luck Maybe
Well the good news is if none of this works we'll just delete this stream and deny that that this ever existed And then the 162 people will say "No this existed You failed You failed epically in public." Oh that's okay That's okay We don't know what we're doing That's all that that's all uh that's all we
ever do is uh you know fail epically until I until we succeed Yeah it's just having trouble finding the Oh MCP docs there Couldn't find a specific file Fail to read content for agents That's probably on our bad for like throwing if something doesn't exist Yeah maybe So that that halted execution Let's try something else Um make me an
uh let's just start even simpler now because it's obviously not working Make me a MRA agent Um no tools only instructions Can I do that Something that simple Hopefully I probably have to write better system prompt Our persistent parameter is like four lines right So probably need to redo a lot of this
stuff and have like some examples But the the docs MCP server theoretically should be that that knowledge right Um if it works So let's see Okay Okay Okay Very cool Nice Closer Yeah it actually did work That is correct Yeah that's correct We just don't have OpenAI inst that that package installed So it worked Yeah Oh but I also never said OpenAI either But
that's what the just the default So but it's getting that So all of our docs examples probably use OpenAI So that's where it got it which makes sense You should install that package and then that way we could you have to get a key I guess Looks like it did fail again Time to do that Um that's cool Um let's see Let's keep talking to it
Actually I think the chat might have gone away Oops Yeah because I have lib SQL but it's memory Uh in memory Oops What the hell happened there That was weird I was on like an agent ID route Okay Okay So we're at 37 minutes We got about 20 more minutes here And let's make a tool Yeah So yeah Also this is
like our this is like the first day right So I actually have a thousand ideas now that I'm going to do after the live stream is over But uh we're going to keep going down these primitives So we have an agent Let's add tools to it right Add tools to my simple agent If if we were to set a goal if by the end of this thing we could tell it to write an agent and then without refreshing this
page an agent showed up Yeah that's that's it That's the mic drop We we can cut the stream I don't think we're going to do it You got to have faith man You gotta have faith I have faith It's just Okay I have faith now We're going to do it I mean it's already writing some stuff We just got to get it to write in the right location Yeah it's true Hope it doesn't overwrite itself You know
cross our fingers It definitely will It It will It will just destroy itself It'll just Maybe we should commit before we you know set it loose This is why they This is why they invent sandboxes If you are you know if you're a sandbox company and you want to sponsor the next one Yeah Here Yeah Definitely at like in production type thing you're going to need a sandbox Yeah for sure We're just playing around Yeah
Okay What did it do What did What did you tell it to do for the tool It didn't do what I wanted Or maybe is it still reading No you know it's done It just got some examples and stopped Maybe it ran It could have ran out of steps 25 steps Unless the playground overrides some Unless there's a bug Yeah I wonder if the playground does override it That's another bug we found I'm going to do 100 Dude
I'm feeling dangerous Keep going Um let's add a math tool to my simple agent And yeah Jeremy says "The Monster team did it." Quote "The MRO team did everything correctly and the video was so good they had to delete it." Yep you got it Thanks buddy I love Monster and I I'm building an accounting chatbot It's really amazing Thanks Thanks Yeah Come to Discord Tell us
about it Yeah we have a showcase there Yeah Put in the showcase Yeah If anyone's working on anything cool put in the showcase dude It's doing something Every time we talk to chat it actually does something right And every time we look at it it doesn't do it right It knows It knows that we're not paying attention But actually it is doing
something Um that's cool Now let's create an index.ts file in the tools directory which is correct right That is convention And then they're going to up he's going to or it's going to update it Let's see what's going down There's the tools We have an export Wow that works Math tool Add Very nice Very nice Oh wow Oh all right Yeah
He's trying to impress me or something you know I didn't know this was math class Conversion back Wow Okay All right Unit converter tool Wow Is it Is it popping off still Okay No it's still popping off Wow You did give it 100 steps So that's true Oh Let's see what it does Let's see what happens Oh no it's done
It's going to build us a TI83 plus That dates myself What's the new ones Got to be TI 10009 Oh dude It screwed up this Look at that It doesn't know how to write strings That's okay I forgive you I forgive you Yeah that's why I mean honestly that's why most if you're writing actually a code generating tool you typically have to run it through some
kind of you know LSP or something to like get those type errors and all that stuff that's what cursor windsurf yeah cloud code they all do that so let's also do something interesting where I'll go into the tempter and I'll start MRA Uh again but on this monster project that exists Does it export a monster class I don't It doesn't actually Let's make it do that But if you did and you
can just point it to Can't you just point it There's a CLI flag Yeah Dashd D Yeah And just point it to that directory Let's ask it to make the We need the main See here's the problem though This is this is a problem because the agent needs to understand the structure like and it needs to maybe make the boiler plate first because now like now like who's going to know hey bro you're
missing the monster index file Like that has to be innate right But I'm going to do it anyway So we need the monster index.ts file that But see this is the problem because I know what it is That's why I'm telling you But but if you you know but in theory they would already be in a project So they should already have Yeah they should If they're running dev
they'd already have that If we're writing on top of what they already have I mean dude applying diffs is going to be a crazy part of this because right now we're overwriting everything Yeah the diffs is going to be uh I have a question in master playground agent executes multiple tools correctly but why is it not completing the whole saying it's max steps like uh
it's a max steps thing potentially like we we're we're struggling with that right now um because we left left it at five so like the task wasn't completed It it just ran out of uh round trips Yeah there there's a couple things that we noticed So if you you can go and change max steps as you see here in you
know in the settings you can also change it in uh is can you show in your code but it seems like the playground overrides that It probably shouldn't uh you know if you have that set maybe it it shouldn't do that I don't know We should we'll think about that But yeah it's probably running out of max steps
All right let's see Uh we are I'm going say we're missing the main instance See what it does with that You are absolutely right Yeah of course I am Thank you Thank you Let's also create a simple server No don't do that And there's no stop button Server agent via HTT There's no stop button No Oh and I gave it 100 steps
No Oh it's done It's done If we go offline it's because it overwrote his entire file system And you know what did it do though Oh it did something Hey no that's that's the main project that we made It just made a server What's this Oh no it did It did No it did something stupid but but yeah without and it did that server to like kick it off but it did export it It's just I mean let's
let's not reward good behavior um or bad behavior like don't I don't know if it's going to work but let's first thing I'm going to do or let's call these like um rules one oops you must use this two don't assume anything Always use your knowledge tools I don't know Kind of saying the same thing twice but let's just see how that works
Three So here's the cool thing I will say Obviously this thing is very flawed right But dude how big is our system prompt Really Like 10 lines and we actually could generate some code Like I'm pretty impressed It's pretty cool Yeah I mean we you know 90% of the battle is just going to be wrangling all
the UX and Yeah Let's get back into this Well complete worthless thing Um but I'm going to edit it cuz I I'll just edit this thing out right now so we can continue It did it right though so props to it doing it right Let's add a workflow Sure Just keep going down the list of things V- next V- next workflows Oh V- next workflow It's got the
docs Let's let it rip Okay let's let it rip So let's add a workflow that has three steps I have to say MRA Actually it should already know but anyway a mashra should I say v-x workflow that has three steps Um surprise me on what the steps do Step execute I can't talk like that I have to be very general So surprise me on what it does
But a travel itinerary generator Not real original Dude that's so wild that it suggested that It's you know we have examples of that So I wonder if Oh maybe But I didn't read the examples first I think that's doing now Yeah we'll we will see Oh there's a workflow AI recruiter example that it's looking at Yeah Oh this is going to fail hard dude because
we don't have good examples of V-Nex on the website Not in the not in that uh in that example Also we have 183 people Yeah we're going to hit 200 Let's get pump the stock dude Pump the stock What is this All right so this thing's running Did it do it though For those of you joining we're just trying to build
out an agent a MRA agent that can build MRA agents and workflows Keep getting screwed by max steps We got to fix this bug Yeah Anytime you refresh goes away right cuz it started researching Yeah So now hopefully it'll do its thing Three steps for recipe transformer It changed its mind I wonder where this Do we have a recipe thing We have a chef agent We
have a chef agent but that's but that's not a workflow So here's a cool like thing that we're learning actually You're only as good as your doc's MCP server right Like so if your docs are your MCP server going to be too Yeah Our docs are not necessarily but they're not necessarily good either So we got to make them better Yeah Yeah But this is the best way to test it because if uh the MCP server
sucks well it's probably not probably means their docs suck Yeah Also let if you know people at Tailwind tell those folks to make a doc server I've been pumping this for a long time Tailwind make a doc server cuz who gets like who gets tripped up on Tailwind vibe coding Like it's always a pain in my ass
especially when you're not a front end uh a front end Yeah especially if you're a degenerate too Okay it's and uh neither of us are front-end developers here So recipe transformer V-Ex workflow Oh snap Did Didn't we Didn't we release where actually V-Ex is now Not yet Not yet Oh this is It did hallucinate though It did
hall Ah it didn't model except that's not the API So it doesn't it didn't do the right thing It's Yeah Well it it's trying to call directly rather than using an agent but we didn't really tell it to do that right Yeah Also this is not correct either This is cool I mean it got some of right We got to like H
Um you implemented the steps wrong Um do more research and try again Oh I spelled again Whatever But you know it did do like it did do it This is this is where we would need that you know really we need to put the whole thing in a in a while loop which says are there Yeah Are you getting type errors Okay Yeah Feed the air into the prompt Yeah
that's true Just we we have and then we just loop it right And just keep going And so because if you fed that air and said you know this is what you need fixed it probably would get just like wind surf right Like if we do like if we call TSC right after each change and then there's an error right it'll have
to go through and feed the error back in Yeah And just keep going until it doesn't get an error Yeah Dave shoot Ask your question We will uh do our best to answer especially while we're just you know hanging out Yeah dude Hanging out letting the agent do its thing Don't be shy Dave We see you Yeah we're we're atund almost We need 12
We need to someone to go find 11 friends Tell 11 people cuz we only have three minutes left or so right Nine Nine minutes If you want to do an hour we got nine minutes Nine minutes it is What should we build next What should we add to it Well I would like to just see it in the playground Can we show that it actually works once it you know once it
actually shows So we can run the playground see the agent that it created And obviously we had to do some manual intervention this time but Dave's typing All right you got time We We're hanging out for a while so give us your question Dude Max is really putting to work right now This thing is going off
But is it doing anything though I mean I guess it is What's Oh what is it doing in here Okay Well create Oh so it made like it made like nested workflows and also it still hallucinates the model stuff That's interesting You know why It's because we probably don't have good example Yeah but I mean we there are some places in our example where because you can call out to you know just use AI SDK directly rather
than passing it through an agent and so that's what it's probably doing I don't know why it's calling it's it's not using the AI SDK Yeah Function right It's using it's like it's like connecting Yeah like Yeah It's just not uh we would almost need to tell it don't you know to to use the master agent if it wants to use that and then maybe it would do that All right So Dave's
question If I have an agent that turns natural language into a structured query object uses a tool that executes that query object with an API and then I want to summarize the results Is that a tool Is that a workflow How do I know when to use which Okay So I I'll I'll give you my take and then I'll be jump feel free to jump in There's not a there's not hard and fast rules around when you should just give
an agent a tool and add information to the system prompt for that agent to execute that tool or you you basically provide the steps of the workflow in the system prompt of the agent with its available tools That's totally possible However if you can make it a workflow I would make it a workflow because you're going to get more uh deterministic results right Workflows are a little bit more deterministic you
know the execution steps maybe you have some conditions on certain things but your quality or your results are typically going to be higher if you can pull parts of it out and make you know as much of it as you can more deterministic Uh so it's kind of like a spectrum of like how much control do you want and how much determinism do you want in it and if you can if you can pull off a workflow and it works well
for and it's flexible enough for what you need I would lean towards doing a workflow more often But and doing it in an agent is more fun because you just let the agent do its thing But it's just because you could doesn't mean you should Yeah Um I have a different take like right now like tool is tool is some word that people made up but it really is just a function So like
workflow or tool a workflow could be a tool too because a tool is just a function So it's really it's really the question is workflow or not right because you can run a workflow as a tool and I think workflow is probably the better thing just for your own sanity of structuring things You can have guards on steps where you're like checking uh
all that type of stuff So and I mean so if you want to say convert natural language into a structured query object if it's just you're always going to have like one string of natural language that comes in and then you have an output that could be a pretty well- definfined workflow I think if you had more of a
chat interface where you need need to go back and forth with it and have it you know correct it or update it then that's more likely you're going to need some kind of agent in the middle And like Abby said you could just make the workflow a tool So it's you know when it gets enough information it executes a workflow that maybe executes a couple steps or something Yeah Because like the
if the base unit is a function and a a workflow is like let's say a higher level function and then the tool is like even higher level than that So you can just do whatever you want dude Someone brought 11 friends 200 200 Let's go Whoa Our first stream That's dope All right All right Let's Yeah let's let's see what uh So I think we have time to Let me just clean this up manually I
guess Um and then we'll just run it Yeah let's try it and see what happens And then we'll call this thing call this stream a wrap So here's like something that a lot of people MaRA users may not do yet but they should You have access to MRA and like runtime context all over the place So I also I often see people import their agents into their workflow file but you don't have to do that You can
grab your agent from MRA believe simple agent right So now I don't need to do any of this BS like no offense to the people doing it It's probably because we didn't document it properly But this is my way And I don't know what this complete BS is but if it's trying to do generate I'm just going to call that with the prompt And then
sure and it's trying to do some JSON par stuff I don't even want to deal with that So let's just do that This is called vibe tabbing Just letting you know And since I am full of bad jokes today if you have a Tesla and you are autopilot is that vibe driving I don't know That was bad Terrible joke Do you
know we're we're not uh we are not paid for our jokes So if only Yeah Oh look It's like referencing itself Yeah that's not going to work That's not going to work Also why do we even And what even is like why would we even do that Why is it Yeah why is it map That doesn't It was trying to It's trying to
get Where is dietary Like I don't even know what This is the problem with vibe coding right I didn't even know what this thing is about Like I'm trying to fix something that I didn't even write Maybe I should have paid attention though But yeah and well this is where we did you know we did the dangerous thing and told it to come up with it Do
something fun or whatever we said It's like well it's I don't know if it's fun It made some fun for us I guess But if we were more specific around what we wanted I I'm sure you've all experienced that too right If you if you're more specific with your prompt you're gonna obviously get a better result So we did not do that It passed the workflow in
All that was great Yeah Can we actually see this thing in uh Yeah run dev technically should No Why is that Oh because there's a package JSON in here Let me go back up here So let's do you got to just pass tempter Oh cuz I have the other one ready Okay you got the We're getting somewhere We need some theme music dude We need a soundboard Yeah no kidding Is that what people do They have soundboards and stuff I don't know There there's some
music There's you know Wait where'd that come from Oh it's this music you have here Wow Yeah we're we we're uh we're obviously experimenting here everyone So you can uh you know I don't know how the volume even works Like is that is that Are we good Is the vibe good Is that too much music Dude we should get like we should get like a marshmallow up in
here Um what do I name this Yeah Yo this is a vibe dude Yeah I mean we're vibing We're supposed We're supposed to be vibing I don't know if you're if you're in the chat uh let us know if we should cut the music or keep it You know we need we need some uh some external opinions This is the missing Did I do this right Is it dash d or dash d Why don't I look it up
Why don't I check the docs while you're doing that Check the I'm going to go check the reference docs in the CLI dash d It's d-dur Oh dashd might work but we we have documented dash dash durmal tempter Oh do I not have I do have that So but source index missing required file I don't think it found it Why not Why not Oh is it because it's looking
for All right Where the hell am I Um up here Dur is actually in here That is looking It should be looking for I can't find it Bug Well it would but it would be the temptersource right Yeah because it's looking for index right Yeah So it's looking for Yeah There's no MRA folder right There is right here
That's not the temp Oh so you need to tell it You have to do the path to the MRA folder Wow Oh I'm tripping dude I'm tripping Oh hello agent with the name weather agent That's cuz I'm on this old Yeah you refresh page Yeah Oh is that simple agent I see All right let's go I don't think this has environment variables We'll see It's No it's It definitely doesn't It definitely doesn't But also workflows Let's see how
it looks Yeah but it's there Hey look at this mapping All right I can't run it but yeah we don't have we don't have any environment variables We're about to wrap up We're going to continue building this in the future Uh get a little bit further along Hopefully make some more progress than we did today So Dave has a question
V-Nex workflows does not exist in type agent config Do I need to update Yeah we just released Was that today Did that go today No we was that last week No it's this usually happens when you're not on the right version and then across um like you just need to update to latest or alpha Yeah update to either either at latest on all your monster packages or if you want you know if you
want to be really bleeding edge at at alpha I mean while we have 210 people here let's talk about that real quick We're going to add this uh command called a MRA update and MRA lint which will check your packages and stuff because MRA itself is like a monor repo but all the components work together as one We usually tell people if you're
trying to like catch up with every like every PR we ship turns into an alpha version So if you look on npm like we have so many versions of ship every day every commit right is a alpha version So if you want to be on that release channel you're more than welcome to But we're still like pre 1.0 So alpha versus
stable Stable is not necessarily like stable right But it's it's a line in the sand that we draw Yeah And we do release we try to release every week on Tuesday Tuesdays So every Tuesday we have a release that goes out That's where we basically make a cut and say you know this is all the tests are passing everything's good This is our version of
stable Of course you know there's still bugs but but that's much you know a little bit more of a stable version We we do that once a week but alpha gets released immediately you know every time we merge Yeah All right Yeah dude We did something Yeah this is this was fun This was fun Hope everyone liked it Yeah You
know let us know on you know YouTube or X Twitter whatever we call it these days And we're going to do this again So we Oh we have a we have a hackathon next week Yes So if you're hanging around here and you want to actually build something like this we will be in Discord helping you all out We got you
know couple really great sponsors lined up We have you know over 5,000 in prizes Anyone that submits something is going to get we'll send you a book You know you get a book for sure and there'll be other prizes we we have So um Jeremy says "Please talk more about the alpha." Are you talking about the alpha channel Jeremy
I don't know alpha releases So alpha release for us is every PR that gets merged turns into an alpha So you can follow at alpha on all your modules if you want Your mileage may vary because you know um because you're getting every merge with you know not knowing how those merges all interact I mean normally it's good All modules should be at latest or all modules should be at alpha
So I have Manis rewritten in Ma and it literally is just dependency conflicts that are stopping the alpha packages Cool Are you discord Yeah come to our Discord We'll we'll get that solved for you Especially if you know let's put that manis in in the showcase Let's you know let's Yeah we'll we'll help you out Yeah drop in the Discord Uh but yeah we
have the hackathon next week Go to master.build if you're interested in learning more getting signed up We also have a workshop on Friday with you know some of our friends at Copilot Kit So we're gonna be talking about how you kind of connect the front end and and the back end So you build in monster agents How do you actually like show that in a chat interface or some kind of
UI in your app But thanks for hanging out with us Thanks for vibing with us And yeah we'll we'll do this