let's start with I need the weather in Paris and some images to confirm this so now we will call up our weather agent we read out the weather report and hopefully give us some images from this so let's just listen good day I'm your weather agent the current weather in Paris is around 14° C with overcast clouds it's best to keep an umbrella handy as the Cloudy Sky may bring some rain stay tuned for more updates okay now hopefully the image popups yeah so we catched the webcam we found on Windy from the API so
yeah you can see it we have some clouds and stuff so that works pretty good and now we can kind of follow up with uh what we can do today to ask the travel agent that so I have two hours to spend in Paris they take the weather in consideration and suggest an activity for me as a man in my 30s so let's hear now this is your travel agent speaking here are your suggested activities explore the Lou museum for an afternoon of Art and history visit the catacombs of Paris for an intriguing underground Adventure
enjoy a Cozy Cafe experience with a book in the Limar District attend a wine testing session at a local wine bar to savor French wines so yeah I don't know if that was actually for a man in its 30s but we got four suggestions was pretty okay so this is how this setup Works uh we're going to dive more into the Swarm so I'm going to show you exactly how you can use the Swarm framework to set up some simple triar agents okay so it's been a while now since open I put this up on
the repo so that was the Swarm framework I think they call it it's pretty much kind of simplistic it's not that advanced if you ask me uh but we can try it today I thought we can do that so I created a repo uh it's open so you can just go test it out for yourself so you can find it over here so I think we're just going to follow my instructions here set this up and I'm going to show you these Triad agents that can yeah do some interesting cool stuff with the Google Maps
API and some yeah pretty cool stuff so let's just do this so uh I'm going to copy this just clone this repo and let's just see it into this right so you can see here is our agents we have an EnV file where we need our open a key Google Maps API key if you want to use that open Weather API key so we just fill out that uh everything should be free except the open AI API key uh so I'm just going to go grab those uh API keys and let me show you how
this works now so we're just going to continue down here we're going to create a VNV right so let's just do that uh because we need to install some stuff here let's activate this okay activate okay that's good and let's do like a pip install our requirements because we need to install this uh swarm Library all right we have already set our EnV and we just going to run it so you can see here are the requirements so we have this link to the Swarm request python. EnV that's basically all we need so I'm just
going to let this install now and then we can check it out done uh let me just show you I think I'm just going to show you the first the agents we have now right uh if you go here we have the agents so we have three different agents we have the Trias agent that is going to uh yeah guide who is going to talk so we have the plan agent we have the Google Maps agent and the weather agent so the trash agent is who decides if you go to the prompts so we have
a prompts s p here so the triar instructions is to send the request over to the plan agent Google Maps agent or weather agent right you're at uh and we have some plan instructions Google Maps instructions and the weather agent instructions everything in this prompts pi and these agents have tools we have the transfer tools right to transfer to the correct agent and back to the trial agent we have the get Google Maps direction tool we have the get weather Tool uh and yeah that is that is all the functions we have so if you
go back to the agents you can see what kind of tools are available transfer to plan transfer to Google Maps transfer to weather that's a trious agent uh the Google Map Maps agent has uh the tool to get the maps directions the weather agents can get the weather right so it's pretty straightforward the plan agent doesn't have any tools it can just answer using gd4 so I had a lot of questions about how these agents works so basically for me it's just uh an agent has access to some kind of tool and can execute this
tool based on the user's query and this query can also be instructed from another agent and that's what we're going to do today so I'm just going to show you how this setup works then we can dive a bit more in uh to see exactly what happens so if I run this now you can see we are starting up the Swarm CLI right should I zoom in more yeah we can do it like this uh starting the Swarm CLI and now we can do a question so let me come up with something so let's just
do a need the directions to travel from London to Paris by car so now this should be handed over to the travel agent or Google Maps agent okay so you can see here's a Google Maps link for a Direction so now we get a link here so we can open up this right and this should be a Google Maps link with the directions from London to Paris right so you can see uh we said by car but we also get by plane and by train I think uh yeah so that works pretty good and now
we can kind of follow up if we wanted to uh can I get the weather for for this route right and this should be Paris and London right so you can see it grabbed the weather for London and Paris right okay great uh we can follow up with something else now I can do oh I forgot I need to make a stop in this before Paris I need new directions so let's see what happens now uh okay so we have a new link right and this should be a way point so this should be London
n and Paris so you can see now we are going from London down here all the way to n and up again and then we go back to Paris so this is a 23 hour trip right uh so that's pretty cool and now you can see we can do like the just do the weather too so this should understand that we want the weather for n right so see okay so we got n too right so that's pretty good so yeah this is how this works so I'm just going to dive a bit more into
kind of how uh we kind of set this up uh so let's just close this so it's not that hard we are using the Swarm fla fra flamework framework so it's basically you can see uh when the user puts in like a query this gets sent to whatever agent that can solve this issue by using tools so it's not that complicated I think this framework is fine but it's not needed you can easily set this up yourself by just using function calling uh but I kind of like the structure here we have the agents right
that's pretty compact we have the prompts for the agents so we can import that and we have the tools for the agents so I kind of like the the way we structure this we structure it into tools agents and prompts I think that's very simple and how you can see we have three uh arguments the origin the destination and sometimes we have way points so n was a waypoint right we wanted to add here so yeah I don't know what else to say I guess this Frameworks worked pretty good so let's see if we can
actually do some TR arching here so I can do can I talk to the maps agent so now you can see uh uh they want me to specify uh I just need to talk okay so now you can see it transferred me to this Google Maps agent that's fine that Tri out Works uh oh um oh I meant the plan agent right so now it's going to transfer me back hopefully yeah transfer back to triage transfer to plan so this is H this is how this works so you can take of like you can have
bunch of this agents and the trial agent is going to send you to the correct agent that kind of has the correct prompts right because if we ask the plan agents to find the Google Maps that's not going to work so this is kind of how this is set up it's not something revolutionary but it it works pretty good and I I kind of like the triage thing I think it's very structured and kind of nice to set up so what happens if we let's try to ask the plan agent to make a plan for
us now so I can do I need the best route from New York to Miami by car so now I'm wondering if uh this is going to be sent to the maps agent okay so we got the plan agent so here you can see the plan agent recommend we start in New York City take the I 95 and key stops and now we can kind of follow up with the maps agent so we can just do make a direction map for me with a stop in Philadelphia and Jacksonville right and you can see we get
this link so hopefully now yeah you can see we go from New York to Philadelphia to Jacksonville to Miami right and we added all the way points so yeah this is how it's working it's it's not much else to say actually so I I want to just advise you if you want to play around with this just go to my repo here and and then you can change up the agents it doesn't have to be uh these travel agents and with these tools and these prompts I think this is just a simple framework so you
can just swap out all these instructions here and these tools with the tools you want right this could be anything you can add in like image analyst from GPT 40 just do a bunch of other tools here uh so what I actually think about this is uh yeah it's pretty cool cool but it's nothing revolutionary I think it's a pretty neat setup and it makes it a bit more structured so that is kind of my take away from this swarm framework or what they call it but in the intro you can hear I use this
voice agent so this is a bit of a different thing since now uh the open AI API allows audio generation from the chat completion right so uh you can do audio output and audio input and a output so this goes all the ways uh but today I I'm just looked at audio output right so we can use this new model GPT 40 audio preview the issue is it's so expensive so you can't almost not use it because it's so expensive it's it's the same price as the real time API so that kind of limits everything
but I have tried it out and it's yeah it works but it's so expensive I don't know it has to come A bit down for me the price before I can start using it fully uh but the API uh is very neat you just import Bas 64 and we set it up like this so we have the modalities text and audio we have a vow file we can play so that's simple to set up we set the voice and it's really easy to set up here right and we can play this and stuff so uh
that is the good thing uh I I really like the open AI documentation and API they did they do a great job on this right uh other that there's not much else to say you can see here they have the text in text push audio out audio in audio in I kind of like the audio in part we don't do any whisper translations but we just put the audio in I think it's going to go to Bas 64 or something and yeah uh it works pretty good for my for what I have tested uh but
I kind of was inspired by the Swarm so I set this up so this was what you saw in intro uh I don't know we can do one more one it but it's nothing revolutionary but basically we have the the same agents we have a webcam agent that uses the windy API to go get some web cameras we have the weather agent that uses um uh open weather map yeah don't mind my key here and you can see get weather uh with audio right so here you can see we are using the G pd4 o
preview audio preview model the modalities is text and audio we have the B file and here we have introduce yourself as a weather agent provide brief reporting right and we get the text response and we need something to play The Voice right for that I'm using simple audio so this will generate a VAV file and we're just going to play that uh on the response so it's nothing more advanced than that but the issue is like I said it's so expensive right so you can see we're playing it here try to play the audio but
continue if it fails right so yeah I guess I demo that already but let's just do one quick test here so when we start this now we can just do I uh need the uh weather in Oslo right so now this is just going to use the tool search up the weather you can see it got this quick and it's going to return the AO I'm your weather agent currently in Oslo the temperature is approximately 12° Celsius and there is a light rain please stay tuned for updated conditions stay safe and enjoy your day yeah
okay so see that work right the current rer is and this is the response that we kind of read out so yeah uh but what is pretty cool uh is that we can also do since this is like an agentic framework with context we can follow up now since we know the weather is kind of bad it's cold and it's raining we can follow up something that's going to be transferred to our travel agent because in the start agent code here we have something called main agent so this is the main coordinator so this is
going to send if the query is about weather use the this function if it's about travel use this so this is going to switch between different functions we can use right so let me just ask something here so let's just do okay okay what's a good thing to do in Oslo today I got two hours so hopefully now this will consider the weather this is travel agent speaking here are your suggested activities visit the Viking ship Museum to explore ancient Maritime Treasures okay so that that was it since it's raining you might enjoy visiting the
museum blah blah blah blah blah it's a great way to spend a couple of hours indoors so you can see this is taking into consideration that the weather is bad right so that is already in context uh other than that I don't know is there anything else to say about this I would just play around with this because uh on this channel I'm definitely going to focus more on this and trying to build out bigger uh AG agentic workflows um yeah I have some ideas I want to test out but yeah this is kind of
the voice part it's not nothing very special but I kind of like the setup but again it's too expensive I can't really use this too much now because it's just draining my my cost right but yeah if you want to go try this out just go to follow the link in the description you will come to this repo here and you can just try this it's a very simple setup this is a Triad agent part so you can just try that just remember to put up your enem uh files and stuff so play around with
it uh I think this is going to be interesting going forward and I yeah like I said I have something in the works that's going to be pretty cool I think so just follow along the channel give this video a like if you like it uh yeah and thank you for the support if you want to become a member I plan to do some more members videos going forward so you can follow the link become a member of the channel if you want access to the more in-depth tutorials and yeah thank you for tuning in
hope you enjoyed it and Miss speaks again very soon