<b>AI development used to look something</b> <b>like this. But what if</b> <b>I told you it could look</b> <b>something like this instead? In this</b> <b>Flow-wise Masterclass, I'm</b> <b>going to show you how anyone,</b> <b>yes, anyone, can build powerful AI-driven</b> <b>solutions without</b> <b>writing a single line of code.</b> <b>Figuring out which AI platform to learn</b> <b>can be overwhelming,</b> <b>especially since there seems to be</b> <b>a new tool released every single day.</b> <b>That's why after helping thousands of</b> <b>people build AI solutions,</b> <b>I can confidently say Flow-wise AI stands</b> <b>out. It's stable, reliable,</b> <b>and lets you create powerful</b> <b>AI apps without coding. So
what is</b> <b>Flow-wise? According to Flow-wise</b> <b>themselves, they are an</b> <b>open source, low-code tool for developers</b> <b>to build customized LLM orchestration</b> <b>flows and AI agents.</b> <b>This is just a fancy way to say that you</b> <b>can build pretty much</b> <b>any AI-driven solution</b> <b>using large-language models and agents</b> <b>without needing to write</b> <b>tons of code. And don't let the</b> <b>spot about developers put you off though.</b> <b>You can build incredible</b> <b>solutions in Flow-wise without</b> <b>needing to write any code. In fact,</b> <b>there's no coding involved in</b> <b>this entire tutorial at all.</b> <b>Because Flow-wise uses nodes to create</b> <b>the workflows, we can</b>
<b>easily swap out one node for</b> <b>another. For instance, if you want to</b> <b>change the LLM provider,</b> <b>simply swap out the LLM node</b> <b>for something else. Looking at their</b> <b>GitHub repo, Flow-wise</b> <b>currently has over 33,000 stars.</b> <b>And if we have a look at this graph, we</b> <b>can see the platform is constantly</b> <b>growing in popularity.</b> <b>And at the time of recording, Flow-wise</b> <b>is currently on</b> <b>version 2.2.3. And these guys</b> <b>are constantly adding new features and</b> <b>updates to the platform.</b> <b>And personally, what I really</b> <b>respect about Flow-wise is that their new</b> <b>releases do not break the</b> <b>old solutions.
In fact, some of</b> <b>my old chatbots that I built nearly two</b> <b>years ago are still running</b> <b>perfectly fine in production.</b> <b>Now before we jump into the tutorial,</b> <b>let's go over a few</b> <b>housekeeping items. This course is</b> <b>ideal for anyone. Whether you're new to</b> <b>building AI applications or</b> <b>whether you are experienced</b> <b>in this field, we will cover the basics</b> <b>of using Flow-wise, like setting up</b> <b>Flow-wise on our local</b> <b>machines or deploying it to a cloud</b> <b>service. We will then learn</b> <b>Flow-wise by creating eight</b> <b>different projects in order to learn the</b> <b>fundamentals of using</b> <b>the platform. You
will</b> <b>be able to download all of these</b> <b>workflows for free using the</b> <b>link in the description of this</b> <b>video. I am not sponsored by Flow-wise or</b> <b>any of the platforms used</b> <b>within this tutorial series.</b> <b>So if you do find this video useful, then</b> <b>you can support my channel by</b> <b>hitting the subscribe button</b> <b>and by liking and sharing this video.</b> <b>Also, if you enjoy using</b> <b>Flow-wise, then go over to their</b> <b>GitHub repo and click the star button.</b> <b>Right, it's finally time to</b> <b>jump into Flow-wise. We can</b> <b>access Flow-wise in one of three ways.</b> <b>First, we can
set up</b> <b>Flow-wise to run locally on our own</b> <b>machine. Alternatively, we can deploy</b> <b>Flow-wise to a cloud</b> <b>instance, like on Render or Railway.</b> <b>Or we can sign up for the paid Flow-wise</b> <b>cloud service, which will</b> <b>cost you about $35 per month.</b> <b>Let's have a look at each of these</b> <b>options in detail. Let's have a look at</b> <b>installing Flow-wise</b> <b>on our own machines. And there are many</b> <b>reasons why you would want to do this.</b> <b>First, it means that</b> <b>Flow-wise can run locally without an</b> <b>internet connection. And this</b> <b>also means you can run large</b> <b>language models on
your own machine,</b> <b>which again is absolutely free, and you</b> <b>are not sharing data</b> <b>with any external systems. Thankfully,</b> <b>this is super easy. The only</b> <b>prerequisite is that you do</b> <b>need Node.js installed on your machine.</b> <b>So go over to nodejs.org</b> <b>and then download the LTS</b> <b>version of Node, and then simply go</b> <b>through the setup process. After</b> <b>installing Node, open up the</b> <b>command prompt or terminal on your</b> <b>machine and simply run "npx flow-wise</b> <b>start". The first time</b> <b>you run this command, you will be</b> <b>prompted to install Flow-wise. Simply</b> <b>enter "y" and press enter.</b> <b>Because I've already installed
Flow-wise,</b> <b>I'm simply getting this</b> <b>message saying Flow-wise is</b> <b>listening on port 3000. This means you</b> <b>can access Flow-wise in</b> <b>your browser by going to</b> <b>"localhost 3000", and you should be</b> <b>presented with a dashboard like this. Now</b> <b>let's have a look at</b> <b>accessing Flow-wise from the cloud. This</b> <b>means we can access Flow-wise from</b> <b>anywhere in the world</b> <b>using any web browser. And it also means</b> <b>that we can integrate Flow-wise with</b> <b>external applications</b> <b>like WhatsApp or Telegram, or other</b> <b>workflow builders like N8N or</b> <b>Zapier. The easiest solution</b> <b>is to sign up for Flow-wise cloud. This</b> <b>is a
paid service, and I</b> <b>will show you how to sell those</b> <b>Flow-wise after this section, but I do</b> <b>want to show you Flow-wise</b> <b>cloud as well. All you have to do</b> <b>is go to "request access", and at the</b> <b>time of recording, I think</b> <b>there is a waitlist to join</b> <b>Flow-wise. In order to skip the waitlist</b> <b>and to support my channel, I</b> <b>recommend using my affiliate</b> <b>link in the description of this video.</b> <b>That will take you to this</b> <b>page where you can sign up using</b> <b>GitHub or Google or your own email</b> <b>address. This will give you access
to a</b> <b>14-day trial period.</b> <b>This will give you access to Flow-wise</b> <b>running on the Flow-wise</b> <b>servers. I do want to mention</b> <b>that this paid service does give you</b> <b>access to additional features</b> <b>which are not included in the</b> <b>community version or the open source</b> <b>version. That includes the ability to</b> <b>create teams and invite</b> <b>team members to collaborate with you on</b> <b>your flows. Of course,</b> <b>you also don't have to worry</b> <b>about updating Flow-wise or scaling the</b> <b>infrastructure as your</b> <b>application and demands</b> <b>grow. So at the very least, I do</b> <b>recommend trying out the</b> <b>free trial period of
Flow-wise</b> <b>if you are planning on making money with</b> <b>these flows or building</b> <b>these flows at enterprise level.</b> <b>Finally, let's have a look at deploying</b> <b>Flow-wise to our very own</b> <b>cloud service. This option can be</b> <b>cheaper than the official Flow-wise cloud</b> <b>service, and in the</b> <b>documentation you can see</b> <b>all sorts of articles for deploying</b> <b>Flow-wise to AWS, Azure, and</b> <b>many other service providers.</b> <b>I've personally used Render for my</b> <b>Flow-wise instances, and</b> <b>these instances I've been running</b> <b>for nearly two years without any issues.</b> <b>So for this tutorial, I will also</b> <b>recommend going with</b> <b>Render. So first, go
over to render.com</b> <b>and create your free</b> <b>account. Then from your dashboard,</b> <b>click on Add New, then Add a Web Service,</b> <b>and from this page, you</b> <b>will be asked to connect</b> <b>to your GitHub repository. So go over to</b> <b>GitHub.com and sign up for a free</b> <b>account. Then in the</b> <b>description of this video, you will find</b> <b>a link to the Flow-wise repository on</b> <b>GitHub. Open up this</b> <b>page, then click on Fork, leave</b> <b>everything on the default values, and</b> <b>click on Create Fork.</b> <b>This will create a copy of the Flow-wise</b> <b>repository in your very own</b> <b>namespace. So back
in Render,</b> <b>you should see an option to connect to</b> <b>GitHub repo. So go ahead</b> <b>and do that. And in the list</b> <b>of repositories, select Flow-wise AI,</b> <b>then click on Connect, then</b> <b>give your web service a name.</b> <b>And because I already have an instance of</b> <b>Flow-wise deployed, I'll</b> <b>just call this one Flow-wise AI</b> <b>tutorial. In scrolling down, we can leave</b> <b>the language as Docker,</b> <b>leave the branch as main,</b> <b>and then under the instance type. With a</b> <b>free plan, your flows won't be persisted,</b> <b>and you will lose all of your work when</b> <b>the server is restarted.</b> <b>So
it might be perfect for</b> <b>following along with this tutorial, but I</b> <b>definitely recommend</b> <b>upgrading to the starter</b> <b>package if you do want to continue</b> <b>working with Flow-wise. But for now,</b> <b>we'll simply start with</b> <b>the $7 per month package. Scrolling down,</b> <b>we can also add</b> <b>environment variables. For the first</b> <b>variable, let's create a variable called</b> <b>Flow-wise_username, and</b> <b>let's set our username value.</b> <b>I'll simply call mine admin. Let's add</b> <b>another variable for the</b> <b>Flow-wise password, and I'll</b> <b>simply enter the password as password123.</b> <b>I would suggest that</b> <b>you use something way more</b> <b>secure than this. Let's add a
few more</b> <b>variables. Let's set the</b> <b>port as 3000. Let's add another</b> <b>variable for the node version, which we</b> <b>can set as 18.18.1. Now, the</b> <b>following variables are not</b> <b>needed if you are using the free plan,</b> <b>but if you do want persisted</b> <b>storage, in other words, you</b> <b>don't want to lose your flows whenever</b> <b>the server is restarted, we can go ahead</b> <b>and add the following</b> <b>variables. Let's set the API key path as</b> <b>slash opt slash render slash dot</b> <b>Flow-wise. Let's add another</b> <b>variable for the database path, and this</b> <b>is the exact same value as the API
key</b> <b>path. So I'll simply</b> <b>copy this value, as we will be using it a</b> <b>few more times. Let's add</b> <b>another variable for the</b> <b>log path, which will also set equal to</b> <b>this value, but will also add</b> <b>slash logs. Let's add one more</b> <b>variable, and this is the secret path</b> <b>with the value of opt render dot</b> <b>Flow-wise. I know that was</b> <b>tedious, but we are nearly done. All we</b> <b>need to do now is to attach</b> <b>the drive or the volume. Let's</b> <b>go to advanced, then under disk, let's</b> <b>click on add disk, and for the mount</b> <b>path,
we'll paste in</b> <b>that same value that we used earlier, and</b> <b>for the disk size, I'll simply go with</b> <b>one gig, and believe</b> <b>it or not, but we are done. Let's simply</b> <b>click on deploy web service. The</b> <b>deployment will take a few</b> <b>minutes to complete, and we're now live.</b> <b>Great, so all we have to do to access</b> <b>Flow-wise is to click</b> <b>on this URL, and we will be prompted for</b> <b>a username and password, which we set as</b> <b>admin and password 123,</b> <b>and we can now access Flow-wise. So do</b> <b>take note that if you self-host</b> <b>Flow-wise, the
responsibility</b> <b>to keep Flow-wise up to date falls with</b> <b>you, but thankfully that's super easy.</b> <b>Flow-wise is constantly</b> <b>adding new updates and fixes to their</b> <b>main GitHub repo. This text</b> <b>is currently saying that this</b> <b>branch is up to date, but if you are</b> <b>behind, it will say something in the</b> <b>lines of this branch</b> <b>is behind a certain amount of commits.</b> <b>All you have to do in that</b> <b>example is to click on sync fork,</b> <b>and there will be a button here that will</b> <b>allow you to update your</b> <b>fork. In fact, let me show you</b> <b>an example from
another repo like this</b> <b>N8N fork that I have. So this N8N</b> <b>instance is sitting within</b> <b>my own namespace, and here we can see</b> <b>that this is actually 28</b> <b>commits behind the main N8N repo.</b> <b>So when I go to sync fork, I can simply</b> <b>click on update branch. So now it's</b> <b>saying that this branch</b> <b>is up to date with the N8N master branch,</b> <b>and if I go back to my</b> <b>render dashboard, we can see that</b> <b>my N8N instance is now being redeployed</b> <b>with those new changes. For</b> <b>the remainder of this tutorial,</b> <b>I will be using a
local instance of</b> <b>Flow-wise. There is a bonus section</b> <b>towards the end of the</b> <b>course where we'll integrate Flow-wise</b> <b>with Telegram, and for</b> <b>that we won't need a cloud</b> <b>instance of Flow-wise, but for everything</b> <b>else we will be using the</b> <b>local instance of Flow-wise.</b> <b>But of course you can follow along using</b> <b>the cloud instance as well.</b> <b>Now before we create our very</b> <b>first chat flow, let's have a look at the</b> <b>Flow-wise UI. The first thing</b> <b>I like to do after setting up</b> <b>Flow-wise is to enable dark mode, as I</b> <b>hate blinding myself or my</b> <b>audience. On
the left hand menu,</b> <b>we have different options to create chat</b> <b>flows, agent flows, and</b> <b>assistants. We will cover each</b> <b>of these options in the course, but in a</b> <b>nutshell, we can use chat</b> <b>flows to create things like</b> <b>conversational chat bots, AI agents, or</b> <b>assistants. With agent flows, we can take</b> <b>it a step further by</b> <b>creating flows that contain multiple</b> <b>agents that can work together to solve</b> <b>complex tasks. In the</b> <b>assistance menu, we can easily create</b> <b>assistants which contain</b> <b>custom knowledge bases and tools</b> <b>by effectively following a very simple</b> <b>wizard. So most of the</b> <b>work is
done for you in the</b> <b>background. Within Marketplace, we can</b> <b>search for existing templates</b> <b>that we can simply copy over</b> <b>to our own namespace and change as we see</b> <b>fit. So here we can see examples of</b> <b>document QNI chat bots,</b> <b>agentic rag, and a whole bunch of other</b> <b>very cool examples. Of</b> <b>course, we will be creating</b> <b>everything from scratch. Within the tools</b> <b>menu, we can create our very</b> <b>own tools, or we can also go</b> <b>to the marketplace and look for any</b> <b>existing tools and then copy</b> <b>these tools over to our own</b> <b>namespace. Or if we click
on create, we</b> <b>can create our very own tools by writing</b> <b>some JavaScript code.</b> <b>Within the credentials menu, we can see</b> <b>all the credentials that</b> <b>we've stored in Flow-wise.</b> <b>These will contain things like our</b> <b>connection details, the OpenAI, or</b> <b>Anthropic, or our vector</b> <b>stores. So this is a very elegant</b> <b>solution for maintaining all the</b> <b>credentials in a centralized</b> <b>place. We can also set global variables</b> <b>within the variable menu,</b> <b>and each of our Flows will have</b> <b>access to these variables. Within the API</b> <b>key menu, we can create and</b> <b>view our API keys. Flow-wise</b> <b>offers a massive list
of APIs that you</b> <b>can call from outside of the</b> <b>platform in order to interact</b> <b>with your Flows or even make changes to</b> <b>your Flows. And in order to use those</b> <b>APIs, you do need to</b> <b>authenticate the API call with an API</b> <b>key. Lastly, we can use the document</b> <b>stores menu to create our</b> <b>very own knowledge bases, and our AI</b> <b>agents will have access to these document</b> <b>stores. We will spend</b> <b>a lot of time in this menu soon. Before</b> <b>we create any of our chat</b> <b>Flows, we need to decide on which</b> <b>large language model we're going
to use</b> <b>for this tutorial course.</b> <b>These large language models are</b> <b>effectively the brains for these AI chat</b> <b>Flows. Now, giving you</b> <b>advice on what to use in this</b> <b>tutorial can be very tricky, because I</b> <b>know there will be those of you who are</b> <b>not willing to spend</b> <b>any money to use services like OpenAI or</b> <b>Anthropic, and you would</b> <b>prefer to use free services. So I</b> <b>will give you some advice on those free</b> <b>services and what to use</b> <b>and what to avoid, but I'm</b> <b>personally going to use OpenAI during the</b> <b>course of the series. So</b> <b>for
those of you who would</b> <b>prefer to use free models, this is what</b> <b>you can do. If you're</b> <b>running Flowwise locally, and you</b> <b>have the hardware to do so, then you can</b> <b>use something called Olama</b> <b>to run open source models</b> <b>directly on your machine. I have a</b> <b>dedicated video on my channel discussing</b> <b>how to set up Olama and</b> <b>use it within Flowwise. So this is just</b> <b>going to be a brief</b> <b>explanation on how to do that, but if</b> <b>you do get stuck, then check out that</b> <b>video, which I will link in the</b> <b>description of this video.
But</b> <b>in a nutshell, go to olama.com, download</b> <b>Olama for your operating system, and</b> <b>install it. Then you</b> <b>can go to the models page and look up a</b> <b>model like Lama 3.2, then</b> <b>copy this command, open up</b> <b>your command prompt or terminal, then</b> <b>paste in that command and</b> <b>press enter. This will download</b> <b>the model, and afterwards you should be</b> <b>able to test it by sending</b> <b>a message. And this means we</b> <b>can now use this model in our Flowwise</b> <b>applications free of charge, and this is</b> <b>completely local. If</b> <b>you don't have the hardware to run those</b> <b>models
locally, then I</b> <b>highly recommend using Grok.</b> <b>This service is also free to use, and</b> <b>this also allows you to run</b> <b>open source models. To set this</b> <b>up, go to grok.com and click on dev</b> <b>console. From here, go to API keys,</b> <b>create a new key, give it a</b> <b>name like flowwise tutorial, click on</b> <b>submit, copy this key,</b> <b>and back in Flowwise, go to</b> <b>credentials, click on add credential,</b> <b>search for Grok, select Grok API, paste</b> <b>in that key, and we can</b> <b>just give this credential a name like</b> <b>Grok API. And let's click on</b> <b>add. But I do
want to mention</b> <b>that Grok does give you access to open</b> <b>source models like Lama</b> <b>3.3. Now I do want to mention</b> <b>the caveats with using these free open</b> <b>source models. The first</b> <b>caveat is with Lama, and</b> <b>specifically this Lama 3.2 model. Yes,</b> <b>Lama also has support for</b> <b>Lama 3.3. However, this is a</b> <b>massive model, and it's about 43 gigs to</b> <b>download. The chances are that the</b> <b>majority of you will not</b> <b>have the hardware to run this model. So</b> <b>you will pretty much be limited to run</b> <b>Lama 3.2 to 3 billion</b> <b>parameter model. Most hardware will
be</b> <b>able to run this model.</b> <b>These small models are more</b> <b>than capable of handling things like</b> <b>chatbots or very simple</b> <b>agents. But once we start building</b> <b>multi agent flows, you will run into</b> <b>issues. For the multi agent flows, I</b> <b>definitely recommend a</b> <b>way more intelligent model like the Lama</b> <b>3.3 model, in which case</b> <b>you might want to use Grok</b> <b>instead. However, Grok comes with its own</b> <b>shortcomings. In</b> <b>order for Grok to be free,</b> <b>they have to enforce rate limiting. So</b> <b>it's very possible that</b> <b>your flow will just simply stop</b> <b>working because you've technically hit</b> <b>your
rate limit. So as much</b> <b>as people don't like yearning</b> <b>this, I do recommend using a paid service</b> <b>like Anthropic or OpenAI</b> <b>for learning how to build</b> <b>AI applications. It's just not worth it</b> <b>in my opinion to try and get</b> <b>some free model to function</b> <b>as opposed to simply learning how to</b> <b>build these applications</b> <b>without all that friction.</b> <b>So what I recommend you do is go to</b> <b>platform.openai.com and</b> <b>sign up for an account. You</b> <b>will need to load some credit onto your</b> <b>account. So all you have</b> <b>to do is go to your profile,</b> <b>click on billing,
and then add some</b> <b>credit to your account.</b> <b>This can be as little as $5.</b> <b>Then once you've added some credit, go</b> <b>back to your</b> <b>dashboard, click on API keys,</b> <b>click on create new secret key. Let's</b> <b>give it a name like Flow</b> <b>Wise Tutorial. Let's click on</b> <b>create secret key. Let's copy the key.</b> <b>Then back in Flow Wise, let's add a</b> <b>credential. Let's search</b> <b>for OpenAI. It's based in the API key.</b> <b>And let's give our</b> <b>credential a name like OpenAI API. So</b> <b>I'll show you how to get the Anthropic</b> <b>API key as well. Go to anthropic.com</b>
<b>slash API and click on</b> <b>start building. You can then sign into</b> <b>your account or create</b> <b>an account. And this might</b> <b>have changed as well, but I think</b> <b>Anthropic might give you</b> <b>free credit. But if they don't,</b> <b>simply click on your profile, click on</b> <b>billing, and you can add</b> <b>credit from the screen by</b> <b>completing the setup. And as you can see,</b> <b>I still have credit left</b> <b>without having to complete my</b> <b>setup process. So I suspect they do give</b> <b>you free credit. And for</b> <b>some reason, this credit</b> <b>lasts a very long time. Once you have</b> <b>some credit
loaded, go back to your</b> <b>dashboard, click on get</b> <b>API keys, click on create key. Let's give</b> <b>it a name like Flow Wise</b> <b>Tutorial. Let's copy this key.</b> <b>Then back in Flow Wise, let's add</b> <b>credential. Let's search for Anthropic</b> <b>API. It's based in that key.</b> <b>And for the name, I'll just call it</b> <b>Anthropic API. I suggest just picking one</b> <b>of these. Maybe you can</b> <b>start with Grok because it is free. And</b> <b>the moment you run into</b> <b>issues, consider signing up</b> <b>for Anthropic, as I think they might give</b> <b>you free credits. Or</b> <b>alternatively, add some credit to
your</b> <b>OpenAI account and use your OpenAI models</b> <b>instead. Now that we have a large</b> <b>language model credential</b> <b>setup, we can go ahead and build our very</b> <b>first Flow Wise project. In</b> <b>this project, we will create</b> <b>a chat GPT clone. Let's go to chat flows.</b> <b>At the moment, we</b> <b>don't have any flows yet,</b> <b>but we'll create a new one by clicking on</b> <b>add new. And now we have</b> <b>this empty canvas. The first</b> <b>thing we need to do is to save this chat</b> <b>flow and give it a name. In</b> <b>this project, we will be building</b> <b>a chat
GPT clone. So let's call this chat</b> <b>GPT clone. And let's save</b> <b>this chat flow. We can add</b> <b>new nodes to the canvas within this nodes</b> <b>menu. On the bottom of the</b> <b>screen, we have controls for</b> <b>zooming in and out of the canvas or</b> <b>fitting all the nodes within this view.</b> <b>We can also lock the</b> <b>canvas to prevent any nodes from being</b> <b>accidentally moved around.</b> <b>We also have this chat button,</b> <b>which we can use to interact with our</b> <b>chat flow. We can expand the</b> <b>chat window by clicking on this</b> <b>expand chat button. And now we have
way</b> <b>more real estate to work</b> <b>with. We can clear the chat</b> <b>at any time by clicking on clear chat.</b> <b>And this will start a new</b> <b>conversation. Of course, we can</b> <b>also save our chat flow. Then under the</b> <b>API endpoint menu, we get</b> <b>all sorts of information</b> <b>about sharing this chat flow with others</b> <b>or integrating it into other</b> <b>applications. We will</b> <b>get back to this in detail a bit later.</b> <b>We also have the settings</b> <b>menu where we can view past</b> <b>conversations. We can also export this</b> <b>chat flow or load in an existing chat</b> <b>flow. We can
also get</b> <b>our chat pod to collect leads on our</b> <b>behalf. And if it does so, we can view</b> <b>all the leads within</b> <b>this menu. But let's get back to the</b> <b>settings menu within a minute. Now, where</b> <b>do we start? In flow wise,</b> <b>all projects need to contain either</b> <b>chains or agents. Now we will</b> <b>have a look at agents a little</b> <b>bit later, but for a very simple chat</b> <b>pod, we can simply use a conversation</b> <b>chain. Let's go to add</b> <b>notes and here you will notice agents as</b> <b>well as chains. We will get</b> <b>back to agents
a bit later,</b> <b>but let's open up chains and let's see</b> <b>what our options are. So if</b> <b>we scroll down, we will find</b> <b>this option here called the conversation</b> <b>chain. Let's add this note</b> <b>to the canvas. This note takes</b> <b>in a few inputs and any input with this</b> <b>red star means it's a</b> <b>mandatory input. So we need to assign</b> <b>a chat model, which is our large language</b> <b>model. And we also have to</b> <b>assign memory. Memory will</b> <b>simply allow our chat pod to recall</b> <b>information from past messages.</b> <b>Optionally, we can assign a</b> <b>chat prompt template and an
input</b> <b>moderation node. Let's actually start</b> <b>with the memory node. Let's</b> <b>go to add nodes. Then under memory, let's</b> <b>add the buffer window memory</b> <b>node and let's connect this</b> <b>to our chain. With size, we can determine</b> <b>how many previous messages</b> <b>should be pulled into the</b> <b>prompt. By default, the previous four</b> <b>messages will be included, but I'll</b> <b>increase this to something</b> <b>like the previous 20 messages. You don't</b> <b>want to make this value too</b> <b>big because a long conversation</b> <b>will start up using a lot of tokens and</b> <b>drive up cost and it will</b> <b>most probably reduce the quality</b>
<b>of the response. Now let's have a look at</b> <b>chat models. For this</b> <b>project, I will show you how</b> <b>to use each of the providers that we</b> <b>discussed earlier, but moving forward, I</b> <b>will be using OpenAI.</b> <b>And within chat models, we get access to</b> <b>a whole bunch of service</b> <b>providers like Anthropic,</b> <b>and we also have access to chat Olama. We</b> <b>also have OpenAI and</b> <b>lastly, Grok. Let's start with</b> <b>the Grok node. This attaches chat model</b> <b>to a conversation chain. It's also</b> <b>selected credentials</b> <b>which we created earlier and for the</b> <b>model name, let's select Loma</b> <b>3.3, the
7 billion versatile</b> <b>model and let's say the temperature is</b> <b>something like 0.6. This is</b> <b>just a value between 0 and 1,</b> <b>0 meaning the model will be less creative</b> <b>and 1 meaning the model will</b> <b>have full creative control.</b> <b>I prefer a value in between and I like to</b> <b>stream back my responses as</b> <b>well. Let's save this chat</b> <b>flow, then in the chat window, let's test</b> <b>this out by sending</b> <b>something like hello. This was super</b> <b>quick, but we already got our response</b> <b>back from our large language model. Now</b> <b>let's try a different</b> <b>model. Since we've installed
Olama and</b> <b>downloaded the Loma 3.2</b> <b>model, we can try this Olama node.</b> <b>So let's attach this to our conversation</b> <b>chain. We can leave the</b> <b>base URL on the default value</b> <b>and for the model name, I'll simply enter</b> <b>Loma 3.2, the 3 billion</b> <b>parameter model and again I'll</b> <b>set the temperature to 0.6. In order to</b> <b>get this model name, you can</b> <b>simply open up your command</b> <b>prompt or terminal and run Olama list and</b> <b>this will show you all the</b> <b>models that you downloaded</b> <b>to your machine and all you have to do is</b> <b>copy the model name
and</b> <b>paste it into this field. What's</b> <b>nice about the Loma node though is that</b> <b>you are also able to upload</b> <b>images which is something that</b> <b>we'll do in the next video. Let's save</b> <b>this, let's give it a</b> <b>spin. So in the chat window,</b> <b>we're going to clear this chat and let's</b> <b>enter hello and I'm</b> <b>getting the response back from</b> <b>Olama. Let's also have a look at</b> <b>anthropic. So on the chat models, let's</b> <b>go to chat anthropic,</b> <b>let's attach this to our conversation</b> <b>chain and let's select our anthropic</b> <b>credentials. Under the</b> <b>model name, we will be
using Claude 3.5</b> <b>Sonnet, the latest model. Let's again</b> <b>change the temperature</b> <b>to 0.6, let's save this flow and in the</b> <b>chat, let's clear this chat</b> <b>and let's send hello there</b> <b>and we got our response back from</b> <b>anthropic. And finally,</b> <b>let's add openai by adding this</b> <b>chat openai node and this is the node</b> <b>that I'll be using throughout this</b> <b>course. Let's select the</b> <b>credentials. Yeah, I'll actually leave</b> <b>this on GPT-40 Mini as this is a super</b> <b>cheap model and it's</b> <b>actually very intelligent. Let's change</b> <b>the temperature to 0.6,</b> <b>let's save this and in the</b> <b>chat window,
let's send our message</b> <b>again, hello and we got our response</b> <b>back. Now let's improve</b> <b>this chat flow. Within the chain, we can</b> <b>click on additional</b> <b>parameters to change the system prompt.</b> <b>We can use the system prompt to change</b> <b>the behavior and persona</b> <b>of the chatbot and we can</b> <b>also specify additional things. But the</b> <b>way I like to do this is</b> <b>to start with a hashtag,</b> <b>which is really a markup syntax for a</b> <b>paragraph heading. Then we can call this</b> <b>roll and below this we can enter</b> <b>something like your name is Max, respond</b> <b>with humor and
emojis.</b> <b>Let's save this, this goes to pop-up and</b> <b>let's save the chat flow and watch this</b> <b>response. We can say</b> <b>something like what is your name and it's</b> <b>telling us that its name is</b> <b>Max and it is responding with</b> <b>emojis. Let's test the memory as well. So</b> <b>I'll enter my name is</b> <b>Leon. It will say nice to meet</b> <b>you Leon and now we can test the memory</b> <b>by asking it what is my name and of</b> <b>course it was able to</b> <b>recall our name because we are including</b> <b>the previous 20 messages in this</b> <b>conversation context.</b> <b>Speaking
of conversations, Flow wise</b> <b>allows us to view all the previous</b> <b>conversations by going</b> <b>to settings and view messages. On the</b> <b>left hand side we can view all the</b> <b>conversations and so far</b> <b>we've only had one and do take note that</b> <b>if you delete the</b> <b>conversation like how we've been doing</b> <b>so far those conversations will be</b> <b>deleted from this list as well. Within</b> <b>this conversation we</b> <b>can view all the previous messages. So we</b> <b>started with hello and we</b> <b>can see the entire conversation</b> <b>history. This can be very useful once you</b> <b>deploy your chat flow to</b> <b>production
to view how people</b> <b>are interacting with your flows and this</b> <b>also allows you to fine</b> <b>tune your flows and improve</b> <b>the results. We can also ask users to</b> <b>leave feedback and I</b> <b>will show you how to enable</b> <b>feedback in a second. It's close to</b> <b>pop-up, let's go to messages, let's go to</b> <b>configuration and here</b> <b>we can set all sorts of things related to</b> <b>our chat flow. We can enable</b> <b>rate limits which will prevent</b> <b>people from abusing our flow. We can also</b> <b>set things like starter</b> <b>prompts. So maybe we can do</b> <b>something like tell me a
joke and let's</b> <b>add another one like summarize this</b> <b>article or whatever else.</b> <b>When we save this you will now notice in</b> <b>the chat flow if I start a new chat we</b> <b>now get those starter</b> <b>messages. Very cool, let's go back to</b> <b>configuration and let's go to follow-up</b> <b>prompts. Let's enable</b> <b>follow-up prompts and this will actually</b> <b>use AI to generate</b> <b>additional questions or follow-up</b> <b>prompts. Therefore we need to specify a</b> <b>provider. I'll select open AI and I'll</b> <b>select my credentials.</b> <b>For the model I'll just use GPT40 Mini</b> <b>and we can leave the</b> <b>prompt as is. Let's
save this,</b> <b>let's try this again. So let's say</b> <b>something like why is the sky blue. Now</b> <b>after this response we</b> <b>get these suggestions for follow-up</b> <b>prompts. Very cool. In the settings we</b> <b>can actually do a lot of</b> <b>very cool things like we can enable</b> <b>speech to text which means you can use</b> <b>your microphone to chat</b> <b>with your application. We can also enable</b> <b>chat feedback. In fact</b> <b>let's enable this now and let's</b> <b>go to save then I'm going to clear the</b> <b>chat and in the chat window let's say</b> <b>hello and now we have</b> <b>the option to
like or dislike a response</b> <b>and whatever we choose</b> <b>we are able to provide</b> <b>additional feedback like this was not</b> <b>what I expected. Let's submit this</b> <b>feedback and now when</b> <b>you go to view messages at the top we can</b> <b>see the amount of feedback that we</b> <b>received as well as the</b> <b>positive feedback percentage. So far it</b> <b>should be 0% because I</b> <b>disliked that chat and in the</b> <b>conversation itself we can see the</b> <b>comment that the user left</b> <b>for us. This is perfect for fine</b> <b>tuning these conversations. Now we're</b> <b>nearly done with configuration we can go</b> <b>to
analyze chat flow</b> <b>to enable things like Langsmith so if you</b> <b>do want to use tools like</b> <b>Langsmith or Langfuse you are</b> <b>able to provide your credentials and then</b> <b>debug and analyze your</b> <b>chat flows using these tools.</b> <b>You can also get your chatbot to collect</b> <b>lead information by</b> <b>simply enabling this toggle and</b> <b>this will allow you to effectively</b> <b>instruct the model to collect the</b> <b>following information from</b> <b>the user their name their email address</b> <b>and their phone number. Let's save this</b> <b>let's clear the chat</b> <b>and now before we can start chatting we</b> <b>first have to provide our</b>
<b>name email address or phone</b> <b>number and if the user provided that</b> <b>information you can view it</b> <b>in this view leads option menu.</b> <b>Now finally we can also upload files to</b> <b>our chatbot by clicking on</b> <b>enable uploads so we can save</b> <b>this and this means that now in the chat</b> <b>window we have the ability to upload</b> <b>files from our machine</b> <b>for instance I'll upload this QA document</b> <b>containing information</b> <b>about my AI agency so</b> <b>let's ask a question like what services</b> <b>do you provide this</b> <b>response is actually 100% correct.</b> <b>So this is a super easy way to
upload a</b> <b>document and then ask the agent to</b> <b>summarize it or extract</b> <b>certain information from the document.</b> <b>Now that we have the super</b> <b>fancy chatbot how do we share it</b> <b>with people well thankfully that's very</b> <b>easy we can click on API</b> <b>endpoint and Flow wise gives us</b> <b>a lot of different options we can embed</b> <b>this chatbot into any website and this</b> <b>will show us a little</b> <b>chat bubble of course you don't have to</b> <b>build chatbots you can</b> <b>also call this chat flow from</b> <b>python or javascript and they also give</b> <b>you the curl command so if</b>
<b>you are a developer you can</b> <b>simply call this API endpoint and pass in</b> <b>a message and that will stream back or</b> <b>return your response</b> <b>or if you feel lazy like me you can</b> <b>simply go to share chatbot you</b> <b>can click on make public then</b> <b>copy this URL and you can simply share</b> <b>that URL with anyone and</b> <b>this will take them to this page</b> <b>where they can interact with your chatbot</b> <b>now because I'm running</b> <b>flow wise on my own machine</b> <b>this might not make a lot of sense but of</b> <b>course if you are using flow</b> <b>wise
cloud this URL will be</b> <b>publicly available you can also customize</b> <b>the page by providing a</b> <b>title you can change the avatar</b> <b>images the welcome images you can set</b> <b>colors the font sizes and a</b> <b>lot lot more just remember to</b> <b>click on save changes if you did change</b> <b>anything if you made it</b> <b>this far then definitely give</b> <b>yourself a pat on the back you just</b> <b>created a chat gpt clone within minutes</b> <b>before we have a look</b> <b>at building agents I do want to show you</b> <b>another very common use</b> <b>case of using chat flows this</b> <b>project might
not be the most fancy of</b> <b>projects but this is a super</b> <b>common use case of using large</b> <b>language models and it's definitely a</b> <b>skill that you need to</b> <b>learn at some point you will be</b> <b>expected to work with unstructured data</b> <b>now that could be pretty much</b> <b>anything it could be a simple</b> <b>sentence or something complex like an</b> <b>invoice for example this</b> <b>example invoice that contains the</b> <b>company information the client's details</b> <b>the invoice items the</b> <b>invoice number and the total</b> <b>amounts so in your project you might be</b> <b>expected to extract certain</b> <b>information from a document</b> <b>like
this and that's very hard to do</b> <b>using traditional coding</b> <b>methods but thankfully large</b> <b>language models are very good at making</b> <b>sense of the content of</b> <b>this document and by the way it</b> <b>doesn't have to be a pdf document we can</b> <b>upload images like</b> <b>screenshots and jpeg images as well</b> <b>and we can then ask the large language</b> <b>model to extract certain</b> <b>information but more importantly</b> <b>is we do want to return that information</b> <b>in a very specific format</b> <b>let's have a look at how we can</b> <b>build this back in flow wise let's create</b> <b>a new chat flow
and let's</b> <b>call it invoice analyzer let's</b> <b>save this and let's start by adding a new</b> <b>node then under chains</b> <b>let's add an allyl n chain</b> <b>this chain takes in a large language</b> <b>model we can also assign a prompt</b> <b>template but more importantly</b> <b>we can also assign an output parser so</b> <b>it's this output parser that</b> <b>will allow us to specify the</b> <b>exact output in which we expect this</b> <b>response let's start by assigning our</b> <b>large language model</b> <b>so let's go to chat models and i'll add</b> <b>the chat openai node i'll select my</b> <b>credentials i'm going</b> <b>to leave
it on gpt 40 mini i'll set the</b> <b>temperature as something like 0.2 because</b> <b>i don't want to give</b> <b>this model too much creativity and let's</b> <b>attach this to our chain as</b> <b>i mentioned earlier we can</b> <b>also upload images simply by enabling</b> <b>this toggle but do take note that if you</b> <b>do want to use image</b> <b>uploads then you do need to select a</b> <b>model with vision capabilities so for</b> <b>openai that would be</b> <b>the gpt 4 vision preview model i'll</b> <b>simply disable this for now and now let's</b> <b>add our prompt template</b> <b>so under prompts let's add a
prompt</b> <b>template and let's also go ahead and</b> <b>attach this prompt template</b> <b>to our chain now we can use a prompt</b> <b>template to provide additional</b> <b>instructions to our model</b> <b>it's almost like the system prompt on the</b> <b>chat models now for the</b> <b>prompt template we can actually</b> <b>expand this and let's add some</b> <b>instructions so let's have a</b> <b>look at this from this invoice i</b> <b>actually want to extract the invoice</b> <b>number let's also extract</b> <b>something like the customer number</b> <b>and let's also extract a gross amount</b> <b>including that so all we</b> <b>have to do is say something like</b> <b>extract
the following information from</b> <b>the provided invoice and</b> <b>that would be the invoice</b> <b>number it's also extract the customer</b> <b>number and finally we can</b> <b>also extract the gross amount</b> <b>including that if we simply run this chat</b> <b>with this information the</b> <b>large language model actually</b> <b>won't have a view of the invoice so in</b> <b>order to include the</b> <b>invoice content within this prompt</b> <b>we need to use a variable let me show you</b> <b>how that works so we</b> <b>can say something like</b> <b>invoice content and now we can inject any</b> <b>content into this</b> <b>prompt by using curly braces</b> <b>and within
these curly braces we can</b> <b>enter any variable name like</b> <b>invoice let's save this and</b> <b>now let's click on format prompt values</b> <b>now we can see that variable</b> <b>name and we can assign a value</b> <b>to this variable by clicking on edit when</b> <b>we click on this box we can</b> <b>now attach any value to this</b> <b>variable like the user's question and</b> <b>that's effectively the</b> <b>question from the chat window</b> <b>we can also assign the chat history and</b> <b>what we're looking for is the file</b> <b>attachment let's select</b> <b>this option and let's close this pop-up</b> <b>we can save this chat
flow</b> <b>and if we open the chat window</b> <b>we won't see any option to upload a file</b> <b>yet that is because we need to go to</b> <b>settings configuration</b> <b>file upload and let's enable file uploads</b> <b>we can now save this close</b> <b>the pop-up and now in the</b> <b>chat window we do have the ability to</b> <b>upload files so i'm going to</b> <b>upload that pdf file example</b> <b>and by the way any invoice will work you</b> <b>can simply go on google</b> <b>and just search for sample</b> <b>invoice pdf now let's simply say</b> <b>something like hello and it really</b> <b>doesn't matter what
we send</b> <b>we simply want to trigger this chain and</b> <b>in the response we get</b> <b>the invoice number which</b> <b>seems correct we get the customer number</b> <b>as 12345 which also seems</b> <b>correct and for the gross amount</b> <b>including that it should be 45353 which</b> <b>it is now the intent of</b> <b>building these type of chains</b> <b>is for this chain to be called from</b> <b>outside or flow wise by some external</b> <b>system to extract this</b> <b>information and then that system can do</b> <b>additional things like maybe</b> <b>output this information in a</b> <b>report or use it downstream so simply</b> <b>returning freeform text
like</b> <b>this will not be very useful</b> <b>but thankfully we can force that response</b> <b>to be consistent by using</b> <b>an output parser let's go to</b> <b>add nodes then go to output parsers and</b> <b>here we have a few options</b> <b>we can return the response as</b> <b>a csv output we can return it as a list a</b> <b>structured output parser</b> <b>or an advanced structured</b> <b>output parser let's add the structured</b> <b>output parser i'm going to</b> <b>enable autofix as that seems</b> <b>to give the best possible response then</b> <b>within additional parameters</b> <b>we can set the exact values</b> <b>that we'd like to return
so let's add a</b> <b>new item and let's call this</b> <b>first one invoice underscore</b> <b>number which is off type number and for</b> <b>the description we can</b> <b>enter something like the</b> <b>invoice number the large language model</b> <b>will use this description</b> <b>to figure out how to extract</b> <b>that information from the document let's</b> <b>add a new item let's call</b> <b>this one customer number</b> <b>which is also off type number and for the</b> <b>description let's</b> <b>enter the customer number</b> <b>and finally let's add one more field</b> <b>let's call this gross amount including</b> <b>that and for the type</b> <b>let's select number and in
the</b> <b>description let's say the gross amount</b> <b>including that cool now let's</b> <b>attach the output parser to our chain</b> <b>like so let's save the flow</b> <b>and in the chat window let's</b> <b>upload our file let's say go we now</b> <b>receive a json structure and these field</b> <b>names will be consistent</b> <b>every time we call the service and the</b> <b>values follow the exact</b> <b>types that we defined for example</b> <b>the gross amount now simply returns the</b> <b>amount itself without the</b> <b>currency if we wanted to return</b> <b>the currency as well we could simply go</b> <b>to additional parameters</b> <b>let's add amount currency</b>
<b>let's change the type to string and for</b> <b>the description let's</b> <b>enter the gross amount currency</b> <b>let's save this let's run this again so</b> <b>I'll clear the chat let's</b> <b>upload the file and let's say go</b> <b>and this time we also get the currency</b> <b>back now these type of</b> <b>flows can actually be incredibly</b> <b>powerful you don't have to necessarily</b> <b>extract information from an</b> <b>invoice for this to make sense</b> <b>you can use the same chain to build</b> <b>sentiment analysis</b> <b>workflows you can classify different</b> <b>documents based on the content within</b> <b>those documents etc now</b> <b>it's time to move on
to the</b> <b>next project in this project we'll build</b> <b>our very first AI agent</b> <b>agents are super cool you can give</b> <b>an agent a task and that agent will</b> <b>reason the steps that it needs</b> <b>to execute in order to achieve</b> <b>that goal and some instructions might be</b> <b>simple for example we</b> <b>might ask an agent to go online</b> <b>retrieve some data and give us a response</b> <b>but agents can also execute</b> <b>multiple steps for example</b> <b>we might ask the agent to go online</b> <b>retrieve data but then also</b> <b>store the data in a database</b> <b>this is without a doubt
one of the most</b> <b>important concepts to</b> <b>understand in 2025 so in this project</b> <b>we'll build our very first research agent</b> <b>and before we build this</b> <b>agent let me explain one</b> <b>of the limitations we have with something</b> <b>like chat gpt by using</b> <b>our chat gpt clone if I ask</b> <b>this large language model a question</b> <b>about recent data it should</b> <b>tell us that it actually doesn't</b> <b>know it doesn't have up-to-date</b> <b>information like what is the current</b> <b>weather in New York and we</b> <b>will get a response saying that the large</b> <b>language model can't answer</b> <b>our question because it
can</b> <b>only answer questions from its training</b> <b>data now the benefit of</b> <b>agents is that we can assign tools</b> <b>that will assist the agent in achieving</b> <b>its goal for example the ability to</b> <b>search real-time data</b> <b>online now enough talk let's create our</b> <b>new chat flow let's give it</b> <b>a name like research agent</b> <b>and now instead of adding a chain to the</b> <b>canvas we will now add an</b> <b>agent and here we have a list</b> <b>of different agents but the most commonly</b> <b>used agent is the tool</b> <b>agent so with the tool agent</b> <b>we can assign tools of course
but we can</b> <b>also assign memory so that</b> <b>we can have a conversation</b> <b>with this agent and of course we need to</b> <b>assign a chat model let's</b> <b>start with the chat model then</b> <b>under add notes let's go to chat models</b> <b>and i'll assign the chat</b> <b>openai model let's attach a chat</b> <b>node to our agent i'll select my</b> <b>credentials for the model name i'm</b> <b>actually going to switch over</b> <b>to gpt 4.0 and this is because agents are</b> <b>slightly more complicated than simple</b> <b>chat bots agents do a</b> <b>lot of reasoning behind the scenes to</b> <b>figure out which tasks
need to be</b> <b>executed in which sequence</b> <b>and which tools should be called in order</b> <b>to achieve this goal</b> <b>therefore i do recommend</b> <b>selecting an intelligent model for all</b> <b>the projects going</b> <b>forward i'll set the temperature</b> <b>to 0.6 and let's also go ahead and add</b> <b>our memory node so on the</b> <b>memory let's select the buffer</b> <b>window memory node let's attach it to our</b> <b>agent and we'll change the</b> <b>size to 20 messages now before</b> <b>we add any tools let's save this flow</b> <b>then in the chat window let's simply send</b> <b>a message like hello</b> <b>just to make sure
everything is working</b> <b>great now this agent still</b> <b>won't be able to answer up to</b> <b>date information for instance what is the</b> <b>current date and time it</b> <b>will tell us that it actually</b> <b>doesn't know because we haven't assigned</b> <b>any tools to a sister agent</b> <b>yet so what we can do is go to</b> <b>add nodes and under tools we get a list</b> <b>of ready to use tools like</b> <b>brave search api we've got a</b> <b>calculator tool the chain tool which</b> <b>allows us to create a chain within this</b> <b>project and call that</b> <b>as a tool or we can use
the chat flow</b> <b>tool to call other chat flows</b> <b>as tools we can also execute</b> <b>code using the code interpreter node and</b> <b>a whole bunch of others</b> <b>as an example let's add the</b> <b>calculator tool so i'll simply drag it</b> <b>onto the canvas it's attached to our</b> <b>agent and if we save</b> <b>this flow and ask our agent a math</b> <b>question like what is 2000 times 20</b> <b>divided by five what you'll</b> <b>now notice is that we get this little</b> <b>icon in the response and this indicates</b> <b>that a tool was called</b> <b>along with the tool name which is the</b>
<b>calculator tool in this instance by</b> <b>clicking on this button</b> <b>we can see the exact inputs that were</b> <b>passed to that tool and the</b> <b>tool output right now let's add</b> <b>more tools to this agent let's add a tool</b> <b>that will provide the</b> <b>current date and time to our agent</b> <b>now in the tool list you will notice that</b> <b>there actually isn't a tool</b> <b>available to get the current</b> <b>date and time we could use a custom tool</b> <b>so this node over here and</b> <b>up will allow us to write</b> <b>javascript code to get the current date</b> <b>and time but
we don't want to</b> <b>write any code so what we'll</b> <b>do instead is go to marketplace then</b> <b>let's filter on tools and within this</b> <b>list we get this tool</b> <b>called get current date time so let's</b> <b>click on this and if we scroll down we</b> <b>can see the javascript</b> <b>code for getting the current date and</b> <b>time so let's click on use</b> <b>template let's click on add</b> <b>and if we go to the tools menu we can now</b> <b>see that tool over here and</b> <b>if we wanted to we could make</b> <b>changes to this tool for example we might</b> <b>want
to change the time zone</b> <b>to our time zone but for this</b> <b>demo i'll simply leave it as is let's go</b> <b>back to our chat flow</b> <b>let's go to our research agent</b> <b>then under add tools let's go to the tool</b> <b>menu let's add the custom</b> <b>tool and in this drop down</b> <b>we can see our current date time tool</b> <b>over here now let's simply</b> <b>attach this to our agent under</b> <b>tools and do take note you can assign</b> <b>more than one tool to an agent let's save</b> <b>this and let's ask it</b> <b>what is the current date and time
we can</b> <b>see that tool was indeed</b> <b>used giving us our current date</b> <b>and time this research agent isn't very</b> <b>useful at the moment</b> <b>because if i ask it something like</b> <b>what is openai-03 it actually doesn't</b> <b>know because the 03 model was only</b> <b>recently announced so what</b> <b>we can do is add the ability for this</b> <b>agent to go online to</b> <b>retrieve up to date information let's</b> <b>click on add notes let's go to tools and</b> <b>let's add the SERP API tool</b> <b>we can go ahead and attach</b> <b>this to the agent as well and under</b> <b>credentials let's click
on</b> <b>create new for the credential name</b> <b>let's call this SERP API and for the API</b> <b>key go to SERP API.com</b> <b>then click on register or</b> <b>sign into your account from the dashboard</b> <b>copy this key and add it</b> <b>to flow wise let's click on</b> <b>add let's save this flow and believe it</b> <b>or not our agent will now have the</b> <b>ability to go online</b> <b>to get up to date information for us so</b> <b>let's ask it again what is</b> <b>openai-03 and now we can see the</b> <b>search tool was indeed called and the</b> <b>search query was openai-03 along with
the</b> <b>tool output this answer</b> <b>is correct and if you scroll down we also</b> <b>get these citations you</b> <b>now have a fully functional</b> <b>research agent and of course you can make</b> <b>this as complex as you want</b> <b>by adding additional tools</b> <b>just as a bonus tip if you are using</b> <b>smaller open source models</b> <b>and you're not getting very</b> <b>good results so perhaps the agent isn't</b> <b>selecting the right tool</b> <b>you can improve the results by</b> <b>going to additional parameters on the</b> <b>agent and then providing</b> <b>some additional instructions</b> <b>for example when ask questions about math</b> <b>use the calculator tool
or perhaps if</b> <b>you're ask questions</b> <b>about recent events use the search tool</b> <b>in this project we're going</b> <b>to build an agent that has</b> <b>access to a custom knowledge base now</b> <b>this can have plenty of use</b> <b>cases this could very simply</b> <b>be a customer facing chatbot that can</b> <b>answer questions about our</b> <b>business or we can use it</b> <b>internally to answer questions related to</b> <b>our company's data and</b> <b>dealing with custom knowledge</b> <b>bases is one of flow wise's strengths</b> <b>let's start by adding a new</b> <b>chat flow and let's call this</b> <b>customer support agent in this example i</b> <b>want
this agent to be able</b> <b>to answer clients questions</b> <b>related to my fictitious restaurant</b> <b>called the oak and barrel i've simply</b> <b>created this word document</b> <b>containing all the common questions and</b> <b>answers related to my</b> <b>restaurant things like contact</b> <b>information the current specials etc i</b> <b>also created the csv document</b> <b>containing all the menu items</b> <b>along with their prices so what we want</b> <b>to build here is an agent</b> <b>that has access to these custom</b> <b>documents and what we could do then is</b> <b>simply grab this code snippet</b> <b>and embed it into our website</b> <b>and our customers can then interact
with</b> <b>this chatbot by clicking on this chat</b> <b>window and then asking</b> <b>questions about our business that means</b> <b>we have a customer support</b> <b>agent that's available 24 7</b> <b>let's start by adding a new node let's</b> <b>add an agent node and more</b> <b>specifically we'll add the tool</b> <b>agent as with the previous video we'll</b> <b>simply add our chat model and for this</b> <b>i'll add the chat open</b> <b>ai model like so let's select our</b> <b>credentials for the model i'll actually</b> <b>just leave it on gpt 40</b> <b>mini and for the temperature i'll lower</b> <b>this to 0.6 let's also add</b> <b>memory
as we want our clients</b> <b>to have full conversations with this</b> <b>agent so under memory let's add the</b> <b>buffer window memory</b> <b>node we can attach it to our agent let's</b> <b>change the size to 20 let's</b> <b>change the system prompt of</b> <b>the tool agent by clicking on additional</b> <b>parameters and let's change</b> <b>this to roll and let's say your</b> <b>name is max you are a customer support</b> <b>agent for a restaurant called oak and</b> <b>barrel keep your answers</b> <b>precise and use the knowledge base to</b> <b>answer questions about</b> <b>the restaurant that's all we</b> <b>need for now now let's set up
our</b> <b>knowledge base let's go back to the</b> <b>dashboard and let's go to</b> <b>document stores we can use document</b> <b>stores to effectively</b> <b>create custom knowledge bases</b> <b>this is a fantastic solution because we</b> <b>can create a document store</b> <b>over a year and these document</b> <b>stores will be accessible to any of our</b> <b>chat flows let's create a new document</b> <b>store let's call this</b> <b>oak and barrel let's add this let's open</b> <b>this document store and</b> <b>let's start attaching our</b> <b>knowledge sources by clicking on add</b> <b>document loader here we</b> <b>have integration with a lot of</b> <b>different applications and we can
upload</b> <b>things like csv files we can</b> <b>use the cheerio web scraper</b> <b>to extract information from websites but</b> <b>what i need is the docx</b> <b>file loader so i'll upload my</b> <b>file and by the way all of the files will</b> <b>be available in the link</b> <b>in the description now if</b> <b>i click on preview chunks this will</b> <b>return all the contents in the document</b> <b>within a single chunk</b> <b>which is not ideal as an example let's</b> <b>say the customer asks what</b> <b>the current spatial are we</b> <b>don't want to inject all of this content</b> <b>into the prompt when asking</b> <b>about
spatial instead we only</b> <b>want to retrieve the most relevant text</b> <b>related to the spatial and</b> <b>inject that into the prompt</b> <b>so what we can do instead is split this</b> <b>document up into smaller</b> <b>chunks we can do that by going to</b> <b>the text splitter and let's select the</b> <b>recursive character text splitter i'll</b> <b>leave the chunk size</b> <b>on a thousand characters with the chunk</b> <b>overlap of 200 now watch</b> <b>what happens when we click on</b> <b>preview now we've split this document</b> <b>into five smaller chunks</b> <b>let's click on process then let's</b> <b>add one more additional loader this time</b> <b>i'm
going to use the csv</b> <b>file loader to upload our menu</b> <b>items for csv documents we actually don't</b> <b>have to specify a text</b> <b>splitter as each row in the</b> <b>document will become its own chunk so</b> <b>here we can see the fillet steak the</b> <b>ribeye steaks t-bones</b> <b>sirloin steaks etc let's click on process</b> <b>and now we have these two</b> <b>documents loaded into our</b> <b>document store we're not done yet though</b> <b>we've simply prepared this</b> <b>data at this stage and now</b> <b>the next step is to upsell this data into</b> <b>a database so what we can</b> <b>do is go to
more actions</b> <b>let's click on absurd old chunks and now</b> <b>we have to configure this</b> <b>document store so we have to</b> <b>set things like the embeddings we have to</b> <b>specify a vector store and</b> <b>optionally we can specify a</b> <b>record manager let's start with the</b> <b>embeddings embeddings will</b> <b>simply take the text from the</b> <b>documents and convert it into vectors</b> <b>it's a little bit</b> <b>technical to explain in this video</b> <b>but the step is necessary in order for</b> <b>the vector store to figure</b> <b>out what the most relevant</b> <b>documents to the user's question is so as</b> <b>the provider i'm going
to</b> <b>use open ai so i'll select</b> <b>my credentials for the model name i'm</b> <b>going to select text</b> <b>embedding three small we don't have</b> <b>to change any of these settings the text</b> <b>from the documents along</b> <b>with these embeddings will be</b> <b>stored in a database called a vector</b> <b>store so let's click on this</b> <b>and flowwise as integration</b> <b>with several vector store providers we</b> <b>will use pinecone which is</b> <b>free to use so let's create our</b> <b>credentials let's give it a name like</b> <b>pinecone api and for the api key go to</b> <b>pinecone.io and sign</b> <b>up or log into your
account from here</b> <b>let's create our database</b> <b>by clicking on create index</b> <b>give it a name like flowwise then under</b> <b>dimensions we can</b> <b>manually enter the dimensions</b> <b>or select one of these templates we'll</b> <b>use the text embedding three</b> <b>small for the capacity mode</b> <b>select serverless and i'll leave this on</b> <b>aws let's click on create index then</b> <b>let's click on api keys</b> <b>let's create a new key let's call this</b> <b>flowwise tutorial let's</b> <b>create this key let's copy this key</b> <b>and paste it into flowwise now for the</b> <b>pinecone index name we can</b> <b>simply give it the index name</b>
<b>which we called flowwise i do recommend</b> <b>specifying a namespace because you can</b> <b>reuse the same index</b> <b>for all of your projects so for the</b> <b>namespace i'll simply call this oak and</b> <b>barrel we don't have to</b> <b>change any other properties so what we</b> <b>can do now is click on save config and</b> <b>upsert we can now see</b> <b>that 25 documents were added to our</b> <b>vector database and if we go back to</b> <b>pinecone and if we click on</b> <b>flowwise we can indeed see that 25</b> <b>documents were added and in the namespace</b> <b>we can see that oak and</b> <b>barrel
was indeed created and on the</b> <b>browser we can indeed view</b> <b>each of those documents that were</b> <b>upserted another great feature about</b> <b>flowwise is that we can test the</b> <b>retrieval at this stage by</b> <b>clicking on test retrieval and let's ask</b> <b>what are the specials and</b> <b>these are the most relevant</b> <b>documents that were returned from our</b> <b>pinecone database and the very first</b> <b>document very clearly</b> <b>includes the specials we can also use the</b> <b>screen for fine tuning the</b> <b>results so if you find that</b> <b>only returning four documents is not</b> <b>enough we can easily change the top k</b> <b>value
to let's say eight</b> <b>documents when we run this again we now</b> <b>get eight documents back from the</b> <b>database and if we feel</b> <b>that this actually improves the results</b> <b>we can simply save these</b> <b>config changes i'll simply</b> <b>change this back to four let's save the</b> <b>config and let's go back to our</b> <b>configuration so what</b> <b>i do want to mention is if you do change</b> <b>any of this data so let's</b> <b>say we add an additional</b> <b>document loader you do have to run the</b> <b>upsert process again but</b> <b>here's the issue when i click</b> <b>on upsert although nothing has
changed</b> <b>you will notice that 25</b> <b>documents were added again and if</b> <b>i go to our database you will now notice</b> <b>that we have 50 documents</b> <b>this means that all those</b> <b>documents were duplicated but this is not</b> <b>ideal we only want to</b> <b>upsert the new documents and that</b> <b>is where record manager comes in the</b> <b>record manager will keep</b> <b>track of the documents that</b> <b>we've already upserted and when we run</b> <b>upsert again it will</b> <b>compare our existing documents</b> <b>to the new set of documents and only</b> <b>insert the difference so to clear out</b> <b>these existing records</b> <b>in this
database i'm simply going to go</b> <b>to namespace and i'm going</b> <b>to delete this oak and barrel</b> <b>namespace and that will delete all the</b> <b>documents linked to it so</b> <b>now that we have a clean start</b> <b>let's add a record manager and i highly</b> <b>recommend using Postgres or MySQL for</b> <b>this and i do have a</b> <b>dedicated video taking you through the</b> <b>process of setting up a</b> <b>Postgres database and using it as a</b> <b>record manager but to keep things simple</b> <b>for this tutorial we'll</b> <b>simply add the SQL lite record</b> <b>manager we actually don't have to change</b> <b>too much
i do want to set</b> <b>the namespace to be the same as</b> <b>the namespace in our pinecone database</b> <b>and i'll change the cleanup</b> <b>method to full now let's save</b> <b>this config let's run upsert and as</b> <b>expected 25 documents were</b> <b>added and if we run upsert again</b> <b>we can see that 25 documents were skipped</b> <b>this time if we go back to</b> <b>our document store we can</b> <b>delete entries as well so let's delete</b> <b>this CSV file then under</b> <b>actions let's click on upsert all</b> <b>chunks let's click on upsert we can see</b> <b>that five documents were skipped those</b> <b>are
the documents from</b> <b>the Q&A doc but all the items in the CSV</b> <b>file were actually deleted</b> <b>so in our pinecone database</b> <b>the amount of documents that have been</b> <b>reduced to five documents i'm</b> <b>just going to add the CSV file</b> <b>back so i'll click on preview chunks</b> <b>let's click on process let's run upsert</b> <b>again our menu items</b> <b>were added obviously five documents were</b> <b>skipped great we now have a</b> <b>custom knowledge base next</b> <b>let's give our customer agent access to</b> <b>this knowledge base so</b> <b>back in chat flows let's open</b> <b>up our customer support agent then under</b> <b>tools
let's add the</b> <b>retriever tool let's attach this</b> <b>retriever tool to our agent let's give</b> <b>our tool a name like oak</b> <b>and barrel for the description</b> <b>let's enter returns documents related to</b> <b>oak and barrel and the menu</b> <b>then let's go to add nodes and</b> <b>under vector stores let's add the</b> <b>document store node we can attach this</b> <b>document store to this</b> <b>retriever tool and from the drop down</b> <b>let's select oak and barrel</b> <b>if you do not see your document</b> <b>store in this list it simply means the</b> <b>document store has not yet</b> <b>been inserted into your database</b> <b>that
should be it let's test this out so</b> <b>in the chat let's ask what</b> <b>are your current specials</b> <b>and indeed we get the correct response</b> <b>back we can also see that</b> <b>the retriever tool was called</b> <b>and this was the response from our vector</b> <b>store in some instances you</b> <b>might want to cite the sources</b> <b>of this information and show it to your</b> <b>users what you can do is go</b> <b>to your retriever tool and</b> <b>enable return source documents so now</b> <b>when we ask that same</b> <b>question we get the source documents</b> <b>along with their metadata so all that's</b> <b>left
now is to embed this</b> <b>chatbot into our website by</b> <b>clicking on this button then simply copy</b> <b>the script and you can</b> <b>add it to any website simply</b> <b>by pasting in that script into the body</b> <b>tag and if we have a look at</b> <b>this simple web page we can</b> <b>view this chat bubble and we can chat to</b> <b>our chatbot so let's say hello let's ask</b> <b>what are the current</b> <b>specials and we get the correct answer</b> <b>back which we probably</b> <b>don't want to show in this case</b> <b>i do want to mention that it is possible</b> <b>to customize
the look and</b> <b>feel of this chat window</b> <b>and the chat bubble and i have a complete</b> <b>video going through this</b> <b>process step by step along</b> <b>with instructions on embedding this</b> <b>chatbot into different types</b> <b>of websites so definitely check</b> <b>out that video as well this project is</b> <b>actually going to be super quick and</b> <b>that's why design in</b> <b>the previous projects we created this</b> <b>research assistant that has</b> <b>access to a couple of tools</b> <b>for instance search api that allows the</b> <b>agent to go online and</b> <b>retrieve real-time data we also</b> <b>created this customer support agent which</b> <b>has access
to a custom</b> <b>knowledge base now these are</b> <b>such common scenarios that flowwise</b> <b>created a super simple way</b> <b>of setting all this up without</b> <b>having to write code or even drag notes</b> <b>onto a canvas let's go to</b> <b>assistance let's click on</b> <b>custom assistance let's create a new</b> <b>assistant and let's give it a name like</b> <b>oak and barrel support</b> <b>now instead of building our agent in a</b> <b>canvas we can simply fill</b> <b>out a few fields on this form</b> <b>and everything will be done for us let's</b> <b>start by selecting our model</b> <b>and for this we'll use chat</b> <b>openai
then i'm going to grab the same</b> <b>system prompt that we used in our</b> <b>customer support agent</b> <b>so i'll just go back to this to replace</b> <b>this prompt now watch how</b> <b>easy it is to assign the</b> <b>document store we simply select it from</b> <b>this drop down and we can</b> <b>then describe this knowledge base</b> <b>by effectively copying the same retrieval</b> <b>prompt that we used here</b> <b>like so then for the ai model</b> <b>we do have to specify our credentials we</b> <b>also have to select our model</b> <b>which i'll leave as gpt40 mini</b> <b>let's change the temperature to 0.6 and</b>
<b>since we've now connected</b> <b>our model we can actually</b> <b>use this generate button to generate this</b> <b>text for us so let's click</b> <b>on this and now we've used</b> <b>an allo m to clean up this description</b> <b>scrolling down we can also</b> <b>allow image uploads and set the</b> <b>image resolution but what i'm interested</b> <b>in is this tool section so</b> <b>to add tools we can simply</b> <b>click on add tool and select our tool</b> <b>from the drop down let's</b> <b>select the SERP API tool let's</b> <b>select our credentials and if we wanted</b> <b>to we could add more tools</b> <b>let's save this
assistant</b> <b>and now when we scroll up we have this</b> <b>preview window which we can</b> <b>use to test this out as with</b> <b>chat flows we can start click on api</b> <b>endpoints and we get the</b> <b>snippet to embed this assistant into</b> <b>websites we can call it from python and</b> <b>everything else making this a super</b> <b>efficient way to build</b> <b>assistance now let's move on to one of</b> <b>the most important</b> <b>features in flow wise and that is</b> <b>agent flows with agent flows we can</b> <b>create multi-agent</b> <b>workflows this means we can add</b> <b>multiple agents to the same flow and</b> <b>these
agents can work</b> <b>together in a team or sequentially to</b> <b>achieve a goal this is similar to</b> <b>frameworks like crewai and autogen and</b> <b>this is definitely a</b> <b>growing area and it's definitely a skill</b> <b>that you need to learn in</b> <b>2025 and this is also where</b> <b>flow wise shines we can create a new</b> <b>agent flow by going to the</b> <b>agent flows menu let's click on</b> <b>add new and under nodes things will look</b> <b>a little bit different</b> <b>scrolling down you now have access</b> <b>to this multi-agent menu or if you scroll</b> <b>further down you also have</b> <b>access to this
sequential</b> <b>agents menu these are two very different</b> <b>approaches for building multi-agent flows</b> <b>with multi-agents we can use a supervisor</b> <b>agent that will</b> <b>automatically delegate the work between</b> <b>a different worker agents whereas with</b> <b>sequential agents we have way more</b> <b>control over the flow of</b> <b>the logic in this project we'll create a</b> <b>multi-agent team using a</b> <b>supervisor agent which will delegate</b> <b>the work between different worker agents</b> <b>and more specifically we'll build a</b> <b>software development</b> <b>team that contains three worker agents a</b> <b>software developer a code</b> <b>reviewer and a document writer</b> <b>these agents are a lot of fun to
build</b> <b>let's start by giving our flow a name</b> <b>like software development</b> <b>team then let's start by adding our</b> <b>supervisor node so under multi-agents</b> <b>let's add the supervisor</b> <b>node let's go ahead and design a chat</b> <b>model to this agent so on the</b> <b>chat models i'm going to add</b> <b>the chat openai node and for multi-agent</b> <b>flows i highly recommend</b> <b>using an intelligent model</b> <b>like gpt40 so i'll select my credentials</b> <b>then let's select gpt40</b> <b>let's change the temperature</b> <b>to something like 0.5 now that we have</b> <b>our supervisor node we</b> <b>need to start adding worker</b> <b>nodes so under add
nodes let's go back to</b> <b>multi-agent and let's add a</b> <b>worker node so i like to add</b> <b>these worker nodes just below the</b> <b>supervisor node and what we need to do is</b> <b>attach our supervisor</b> <b>to the input on our worker node now let's</b> <b>have a look at this worker</b> <b>first i'll give my worker a</b> <b>name this will be our software developer</b> <b>so let's enter something</b> <b>like software developer and for</b> <b>the worker prompt we can specify the role</b> <b>and tasks of this worker so</b> <b>let's enter something like</b> <b>role and also you are an experienced</b> <b>developer with experience</b>
<b>in react typescript nodejs</b> <b>shat cn tailwind and other web</b> <b>technologies then for the tasks we can</b> <b>enter something like write</b> <b>clean and well commented code make</b> <b>changes to the code based on the feedback</b> <b>from the code reviewer</b> <b>as we will add the code reviewer as a</b> <b>team member in a second this should be</b> <b>good enough let's save</b> <b>this and before we add the second worker</b> <b>i do want to mention that</b> <b>you can assign tools to the</b> <b>worker agent as we did with the research</b> <b>agent earlier in this</b> <b>tutorial and we can also assign</b> <b>a chat
model to this node and if we don't</b> <b>assign a chat model this node</b> <b>will simply inherit the same</b> <b>model that be assigned to the supervisor</b> <b>node but sometimes it might</b> <b>make sense to assign a different</b> <b>model based on the worker's function</b> <b>certain workers might not</b> <b>need an expensive model to</b> <b>be assigned to it and for software</b> <b>developer worker it might</b> <b>make sense to assign a different</b> <b>model which is better at writing code</b> <b>let's actually save this</b> <b>flow and let's test it and</b> <b>let's expand this and let's say build a</b> <b>to-do list app first we</b> <b>can
see the message from the</b> <b>supervisor and the supervisor is now</b> <b>calling the software developer and if you</b> <b>scroll up we can see</b> <b>the response from the software developer</b> <b>showing how to set up this</b> <b>project how to install all the</b> <b>dependencies and here we have all the</b> <b>code for the project so if</b> <b>we wanted to we could simply</b> <b>copy this code and paste it into a code</b> <b>editor if we keep</b> <b>scrolling down we can see the final</b> <b>response from the supervisor saying that</b> <b>no further action is</b> <b>needed and therefore the task</b> <b>is completed great now let's
create</b> <b>another worker agent i'll simply copy</b> <b>this worker let's attach our</b> <b>supervisor node to this worker let's</b> <b>rename this to code reviewer in the</b> <b>worker prompt let's actually</b> <b>replace the role and the tasks the role</b> <b>will be you are</b> <b>responsible for reviewing the code</b> <b>as written by the software developer and</b> <b>in tasks we can say ensure</b> <b>that the code is of a high</b> <b>standard and well commented recommend</b> <b>changes and improvements to the code or</b> <b>pass the process on to</b> <b>the document writer if the code is of</b> <b>acceptable quality let's save this and</b> <b>let's also create
our</b> <b>document writer so let's attach a</b> <b>supervisor to this worker</b> <b>node let's change the name to</b> <b>document writer and for the prompt we'll</b> <b>replace this role and we'll</b> <b>replace the tasks for the role</b> <b>we'll say you are responsible for writing</b> <b>the user manual for the</b> <b>code solution as written by</b> <b>the software developer and for the tasks</b> <b>let's simply say write</b> <b>the manual in markdown and</b> <b>include things like the setup</b> <b>instructions document the features and</b> <b>troubleshooting tips</b> <b>let's save this and let's test our team</b> <b>let's save this flow then</b> <b>i'm going to clear the chat</b> <b>and
let's ask it again build a to-do list</b> <b>app now we can see the</b> <b>supervisor is running and the</b> <b>supervisor correctly identified that the</b> <b>software developer should</b> <b>be called first now that the</b> <b>software developer is done the code</b> <b>reviewer is being triggered</b> <b>and it seems like the code</b> <b>reviewer was indeed happy with the</b> <b>results and therefore the</b> <b>document writer is being triggered</b> <b>and finally we get the user manual for</b> <b>our to-do list app and as a</b> <b>bonus tip there's actually a</b> <b>super easy way to get flow wise to</b> <b>generate all of these worker</b> <b>prompts for you
simply go back</b> <b>to the dashboard go to marketplace then</b> <b>under type search for</b> <b>agent flow then click on prompt</b> <b>engineering team and now we can click on</b> <b>use template we can give</b> <b>this a name like prompt</b> <b>template team save this if you do get</b> <b>this little warning messages</b> <b>simply click on this button to</b> <b>update all the nodes to the latest</b> <b>version now let's select our</b> <b>credentials if you don't want</b> <b>to use chat openai you can definitely</b> <b>swap it out for your provider</b> <b>and if we have a look at this</b> <b>flow it uses a supervisor node
to</b> <b>delegate the tasks between</b> <b>two worker nodes and these two</b> <b>workers are responsible for generating</b> <b>all the system prompts for our own</b> <b>workflows let me show</b> <b>you how this works let's say i want to</b> <b>build a software</b> <b>developing team with three workers</b> <b>software developer then code reviewer and</b> <b>lastly document writer</b> <b>now we can press enter</b> <b>and this team will generate all the</b> <b>system prompts for us so let's have a</b> <b>look at this result when</b> <b>we scroll up we can see agent one with</b> <b>the name software developer</b> <b>and here is the full system</b> <b>prompt now we
can simply copy this prompt</b> <b>and paste it into our</b> <b>multi-agent solution the same</b> <b>goes for agent two and we also have the</b> <b>system prompt for agent</b> <b>three this could save you a lot</b> <b>of time in coming up with creative system</b> <b>prompts with multi-agents</b> <b>we were able to assign a</b> <b>supervisor node and this supervisor was</b> <b>able to intelligently</b> <b>delegated tasks between our</b> <b>different worker agents one thing to keep</b> <b>in mind with this approach</b> <b>is that we are relying on the</b> <b>supervisor to make the right decisions we</b> <b>could try to force the</b> <b>sequence of events by changing</b>
<b>the system prompt in the supervisor node</b> <b>but if we really wanted</b> <b>fine-tune control we could instead</b> <b>use sequential agents let's see how that</b> <b>works let's go back to the</b> <b>dashboard make sure that you</b> <b>are on agent flows then click on add new</b> <b>and for this project we'll create a</b> <b>content creator agent</b> <b>this agent will be able to go online and</b> <b>retrieve some up-to-date</b> <b>information and then write an</b> <b>article or a blog post or an x post or</b> <b>whatever we want however it</b> <b>doesn't end there after this</b> <b>agent has written the post we want a</b> <b>reviewer
to review that post</b> <b>and suggest additional changes</b> <b>and we wanted review process to run about</b> <b>three times this will</b> <b>greatly improve the final output</b> <b>let's start by saving our flow and let's</b> <b>call this content</b> <b>creation team and let's save this</b> <b>we can create sequential agents by going</b> <b>to add nodes then we can</b> <b>scroll past multi-agents</b> <b>and instead we will use the nodes in the</b> <b>sequential agents</b> <b>menu i do want to mention</b> <b>that sequential agents are incredibly</b> <b>powerful and it's pretty</b> <b>much a topic all by itself so</b> <b>this project will pretty much just dip</b> <b>our toes
in how sequential</b> <b>agents work but if you want to</b> <b>learn more about building advanced</b> <b>applications with sequential agents then</b> <b>definitely check out</b> <b>the dedicated videos that i have on my</b> <b>channel on this topic right</b> <b>so sequential agents require a</b> <b>starting node and an end node so let's</b> <b>add our start node and</b> <b>let's also go ahead and add the</b> <b>end node so let's scroll down to</b> <b>sequential agents and let's add this end</b> <b>node this all makes sense</b> <b>so far right we need to start our flow</b> <b>somehow and end our flow</b> <b>somehow for the start node we</b>
<b>have to specify a chat model so let's go</b> <b>to add nodes let's go to</b> <b>chat models and i'll add this</b> <b>chat openai node let's attach it to the</b> <b>start node let's select</b> <b>our credentials let's select</b> <b>a model name i'll use gpt40 and i do want</b> <b>this agent to be</b> <b>creative so i'll just leave the</b> <b>temperature on 0.9 let's also assign</b> <b>agent memory as with the previous videos</b> <b>on agents we can use</b> <b>memory to have a conversation with our</b> <b>agent this means that after</b> <b>our agent has generated the</b> <b>article we can give it follow-up</b> <b>instructions to
make certain changes to</b> <b>the article so to assign</b> <b>agent memory let's simply go to this</b> <b>memory menu and let's select the sql</b> <b>light agent memory node</b> <b>and let's attach this to our starting</b> <b>node as well we can also</b> <b>assign state to this flow we</b> <b>won't have a look at state in this video</b> <b>as i do have other videos that cover</b> <b>state in great detail</b> <b>but all the state node allows us to do is</b> <b>to set certain values in fact let's</b> <b>quickly add this state</b> <b>node just to demonstrate this in the</b> <b>state node we can set
values and these</b> <b>are effectively global</b> <b>variables that are shared between all the</b> <b>nodes within this flow so</b> <b>we could as an example set</b> <b>something like name and for the operation</b> <b>let's select replace and</b> <b>by default the name could be</b> <b>an initial value and during the execution</b> <b>of this flow we might</b> <b>collect the user's name and then</b> <b>change the value in this global state and</b> <b>that means that all the</b> <b>nodes within this flow will</b> <b>have access to this name property by</b> <b>default the conversation history is</b> <b>stored within a variable</b> <b>in state called messages with an</b> <b>operation
of append so initially we won't</b> <b>have any values within</b> <b>our conversation history but as this flow</b> <b>runs and as we send</b> <b>messages to this flow all those</b> <b>messages will be appended to this</b> <b>messages variable but flow wise we'll add</b> <b>this for us so we don't</b> <b>have to explicitly add that messages</b> <b>value to state right but</b> <b>again if you are interested in</b> <b>learning more about using state then</b> <b>definitely check out my dedicated videos</b> <b>on sequential agents</b> <b>now let's get back to our agent flow</b> <b>let's add an agent that will be</b> <b>responsible for going online</b> <b>to perform
some research for us and then</b> <b>write a blog article so</b> <b>let's go to add nodes then under</b> <b>sequential agents let's add the agent</b> <b>node let's attach the start node to our</b> <b>agent node and let's</b> <b>attach our agent node to the end node</b> <b>super simple we can assign tools and</b> <b>since we want our agent to</b> <b>be able to go online let's actually</b> <b>assign the SERP API tool which we already</b> <b>set up in one of the</b> <b>previous projects so let's go all the way</b> <b>down to tools and let's add</b> <b>the SERP API tool and let's</b> <b>connect it
to our agent let's also select</b> <b>our SERP API credentials</b> <b>great now let's give our agent</b> <b>a name i'll call this writer i do</b> <b>recommend using lowercase</b> <b>characters without any spaces</b> <b>if you do want to add a space then rather</b> <b>use an underscore between the words</b> <b>instead now let's set</b> <b>a system prompt for our author i'll</b> <b>simply replace this with</b> <b>generate the best blog post</b> <b>possible for the user's request use the</b> <b>search tool to perform</b> <b>research if the user provides</b> <b>critique respond with a revised version</b> <b>of your previous attempts</b> <b>let's save this prompt and let's</b> <b>have
a look at the other properties on</b> <b>this node we can introduce</b> <b>human in the loop by enabling</b> <b>require approval this means that before</b> <b>this agent attempts to</b> <b>call a tool it will first ask</b> <b>you if it's allowed to proceed and you</b> <b>can then approve or decline</b> <b>that request if you do enable</b> <b>require approval you can then click on</b> <b>additional parameters and</b> <b>then you can change the approval</b> <b>prompt as well as the text for the</b> <b>buttons that will be displayed to approve</b> <b>or reject the request</b> <b>but i think this is good enough for now</b> <b>let's save
this flow and</b> <b>in the chat window let's say</b> <b>write the blog post on openai-03 and</b> <b>after a few seconds we get</b> <b>our article back and we can see</b> <b>that the search tool was indeed used and</b> <b>we get this article back on</b> <b>the openai-03 model which was</b> <b>recently announced because we attached</b> <b>memory to this agent we are</b> <b>able to ask follow-up questions</b> <b>or make changes to this article for</b> <b>instance let's say place more focus on</b> <b>the negative impact of</b> <b>03 on the environment and human job</b> <b>security and our agents</b> <b>should now use the article that</b> <b>it's
written and just slightly change it</b> <b>to place the focus on these</b> <b>different aspects so if we go</b> <b>up to our article we can now see that the</b> <b>article is definitely way</b> <b>more focused on the environmental</b> <b>impact and things like costs and carbon</b> <b>footprint cool we can</b> <b>greatly improve the quality of our</b> <b>article by assigning another large</b> <b>language model to review</b> <b>the article and to request</b> <b>additional changes for this application i</b> <b>actually want that review process to</b> <b>happen three times so</b> <b>it will basically run in a loop and after</b> <b>the third attempt we will</b> <b>receive the
final article</b> <b>so instead of jumping directly to the end</b> <b>node we want to</b> <b>conditionally call the article reviewer</b> <b>and after the third attempt we will call</b> <b>this end node so in order to</b> <b>conditionally call nodes</b> <b>we can go to add nodes then under</b> <b>sequential agents let's add this</b> <b>condition node let's attach</b> <b>our agent to this condition node we can</b> <b>give our condition node any name this</b> <b>really doesn't matter</b> <b>i'll just call this if less than three</b> <b>times like so and we can</b> <b>now set up our conditions by</b> <b>clicking on this condition button let's</b> <b>click on
add item and under</b> <b>the variable we can access all</b> <b>sorts of variables and if we were using</b> <b>state we could use the</b> <b>values in the state object but as</b> <b>i mentioned earlier the messages so the</b> <b>conversation history is automatically</b> <b>added to state by flowwise</b> <b>so we are able to access the conversation</b> <b>history in this instance we</b> <b>actually want to access the</b> <b>messages dot length so i'll simply select</b> <b>that then we can say if the</b> <b>amount of messages is less</b> <b>or equal to six messages then we want to</b> <b>call the review path so just</b> <b>explain this
value the output</b> <b>from the writer node so the post or the</b> <b>article will count as one</b> <b>message then our reviewer will</b> <b>provide feedback and that will count as a</b> <b>second message our writer</b> <b>will then make changes to the</b> <b>article based on the feedback from the</b> <b>reviewer which will count</b> <b>as the third message and that</b> <b>will then go back for review and that</b> <b>will count as a fourth message of course</b> <b>the writer will then</b> <b>make additional changes which will be the</b> <b>fifth message and then our</b> <b>reviewer will perform a final</b> <b>review counting as a sixth message
then</b> <b>our writer will make the final changes</b> <b>and that means we're</b> <b>now on seven messages and that will end</b> <b>our flow let's save this</b> <b>condition and now we get this end</b> <b>output so let's actually attach that to</b> <b>our end node over here and we</b> <b>also have this review output</b> <b>so now we can use this to call another</b> <b>agent or a large language</b> <b>model to review this article</b> <b>let's go to add nodes under sequential</b> <b>agents we could use an agent</b> <b>node but since we don't have</b> <b>to call tools we can actually just simply</b> <b>use a large
language model so let's</b> <b>attach this LLM node</b> <b>let's attach this review output to our</b> <b>LLM node let's give this</b> <b>node a name like reviewer under</b> <b>additional parameters we can set the</b> <b>system prompt which we can set as you are</b> <b>an editorial reviewer</b> <b>grading a blog post submission generate</b> <b>critique and</b> <b>recommendations for the user submission</b> <b>provide detailed recommendations</b> <b>including requests for</b> <b>length depth stall etc let's save</b> <b>this it's close to spot and this node</b> <b>will generate a review of</b> <b>the article written by the</b> <b>reviewer now we somehow need to loop back</b> <b>to the writer node so
that</b> <b>the writer can include all of</b> <b>these changes so how do we loop back to a</b> <b>different node that's super</b> <b>easy let's go to add nodes under</b> <b>sequential agents let's add the loop node</b> <b>and we can now attach our</b> <b>LLM to the loop node and this</b> <b>will ask us which node to loop back to</b> <b>all we have to do is copy the</b> <b>name of the agent that we want</b> <b>to loop back to and paste it into this</b> <b>field and i just noticed</b> <b>that i actually made this an</b> <b>uppercase R and i do recommend using</b> <b>lowercase
letters instead and</b> <b>this should be it let's test</b> <b>this flow by saving it then in the chat</b> <b>window let's ask it again</b> <b>write an article on the new</b> <b>openai-03 model and we keep receiving the</b> <b>new articles with the</b> <b>reviews and this is running in</b> <b>a loop all right execution just completed</b> <b>and if we scroll up we can see the</b> <b>initial article from</b> <b>the writer then we can see that our</b> <b>condition node was called which decided</b> <b>to go to the reviewer</b> <b>output this is the feedback from the</b> <b>reviewer with its</b> <b>recommendations which then loop back to</b>
<b>the writer node which then made changes</b> <b>to the article based on that</b> <b>feedback we then called the</b> <b>condition node again the writer then made</b> <b>additional changes and for</b> <b>the final time we called our</b> <b>reviewer again with additional feedback</b> <b>which then led to this</b> <b>final article being written</b> <b>and now we get the final output what's</b> <b>really cool about this is</b> <b>we can see all the tool calls</b> <b>for each of those loop iterations and in</b> <b>my experience this final</b> <b>result is way better than</b> <b>the initial output from the model so as i</b> <b>mentioned sequential</b> <b>agents are really
powerful</b> <b>for building these types of workflows so</b> <b>definitely check out my</b> <b>other videos on sequential agents</b> <b>where we build incredibly complex</b> <b>self-correcting rag solutions using</b> <b>sequential agents welcome to</b> <b>the final video in this flow wise</b> <b>masterclass i do want to congratulate you</b> <b>on making it this far</b> <b>we've definitely learned a lot we've</b> <b>built several different chat flows and</b> <b>we've also learned how to</b> <b>build complex agent flows using flow wise</b> <b>now for this final project</b> <b>i am going to switch over</b> <b>to a cloud instance or flow wise because</b> <b>in this project we'll</b> <b>integrate one of these
flows with</b> <b>telegram that way we can access our</b> <b>agents from anywhere in the</b> <b>world using our phones now</b> <b>hopefully it does make sense that</b> <b>telegram or whatsapp would not</b> <b>be able to access a chat flow</b> <b>running on your local machine for this</b> <b>demo i will be using our</b> <b>research agent and because i've</b> <b>created this locally i am going to export</b> <b>this flow so i'll export it</b> <b>to my machine and now i'll</b> <b>log into my cloud instance and as a</b> <b>reminder you can sign up for the flow</b> <b>wise cloud instance by</b> <b>using my affiliate link in
the</b> <b>description of this video and you will</b> <b>get access to a 14 day trial</b> <b>without needing to provide your credit</b> <b>card details so from here i'll go to chat</b> <b>flows let's create a</b> <b>new chat flow let's click on settings and</b> <b>load chat flow and then</b> <b>let's save this and let's call</b> <b>this research agent let's select our SERP</b> <b>API credentials i'm</b> <b>actually going to delete this</b> <b>custom tool as well as the calculator so</b> <b>we only have web search</b> <b>available then for the openai node</b> <b>i'll select my credentials and let's save</b> <b>this flow i'm just going to</b>
<b>test it in the chat by saying</b> <b>hey let's ask something like what is the</b> <b>current weather in cape</b> <b>down and i suspect this didn't</b> <b>work because my SERP API credentials are</b> <b>not correct so i'm going</b> <b>to sign into SERP API.com</b> <b>i'll grab my API key and i'm simply going</b> <b>to click on edit and paste</b> <b>in that key i'm going to save</b> <b>this and in the chat let's ask it again</b> <b>what is the current weather</b> <b>in cape town and this time it</b> <b>did use the search tool now that we have</b> <b>a research agent working we</b> <b>can
add it to telegram it's</b> <b>important to know that flowwise is</b> <b>focused on building AI</b> <b>applications and the way you can</b> <b>interact with flowwise from outside of</b> <b>the platform is to call their API</b> <b>endpoints flowwise does not</b> <b>provide out-of-the-box integration with</b> <b>platforms like telegram or whatsapp</b> <b>therefore you still need</b> <b>to add some sort of integration tool into</b> <b>the mix like make.com,</b> <b>zapier or n8n i will be using n8n</b> <b>in this tutorial and i actually have a</b> <b>lot of n8n related tutorials on my</b> <b>channel as well so if</b> <b>you want to follow along with what i'm</b> <b>doing
in this video then</b> <b>click on the n8n link in my</b> <b>description and sign up for your free</b> <b>trial alternatively you</b> <b>can use make.com which is</b> <b>free to use and again if you want to</b> <b>support my channel then</b> <b>use my affiliate link in the</b> <b>description of this video and although</b> <b>i'll be using n8n in this tutorial</b> <b>make.com is very similar</b> <b>and you'll be able to follow along after</b> <b>signing into n8n you will</b> <b>be provided with a dashboard</b> <b>let's create a new workflow let's rename</b> <b>this i'll just simply call</b> <b>this flowwise agent tutorial</b> <b>and let's click on
add first step then</b> <b>let's add telegram like so and for the</b> <b>trigger let's select</b> <b>on message so whenever we receive a new</b> <b>message from telegram that</b> <b>will trigger this workflow</b> <b>we don't have to change anything on this</b> <b>screen so let's go back to</b> <b>the canvas then let's add a</b> <b>new action and let's search for HTTP</b> <b>request now back in flowwise</b> <b>we can click on API endpoint</b> <b>then let's click on curl let's copy this</b> <b>url and let's paste it</b> <b>into url let's also change the</b> <b>method from get to post then let's enable</b> <b>send body and we'll
leave</b> <b>the content type as json</b> <b>and for the body parameters we need to</b> <b>pass in a property called question so</b> <b>i'll just paste it in</b> <b>there and for the value i'll just test</b> <b>this out by saying hello</b> <b>then let's go back to the canvas</b> <b>and after HTTP request let's click on</b> <b>this final action let's search for</b> <b>telegram and then let's</b> <b>select send a text message now let's set</b> <b>all of this up let's open</b> <b>up the telegram trigger and</b> <b>under credentials let's click on create</b> <b>new credential here we</b> <b>have to provide an access</b> <b>token which we
need to get from telegram</b> <b>itself thankfully n8n is</b> <b>very well documented we can</b> <b>simply click on open docs and then follow</b> <b>those instructions the</b> <b>first thing we need to do is to</b> <b>start a chat with bot father so let's</b> <b>click on this link you do</b> <b>need to sign into telegram if</b> <b>you haven't done so already and then</b> <b>let's click on open in web then let's</b> <b>click on start and in</b> <b>this list of commands let's click on new</b> <b>bot now we have to give</b> <b>our body name and this can be</b> <b>anything i'll just call this one
flow</b> <b>wise research and now we have</b> <b>to enter a unique username and</b> <b>this name needs to end with the word bot</b> <b>so let's just enter</b> <b>something like flow wise research</b> <b>but great now we can copy our token and</b> <b>add it to telegram i'm also going to</b> <b>rename this connection</b> <b>and i'll just call this flow wise</b> <b>tutorial let's save this and if</b> <b>everything was done correctly</b> <b>you should see this green connection</b> <b>message let's go back to</b> <b>the canvas let's also set that</b> <b>connection in this send message node so</b> <b>i'll change it to this</b> <b>flow wise tutorial
connection</b> <b>let's go back to the canvas let's test</b> <b>this workflow i'm</b> <b>actually just going to disconnect</b> <b>this final connection as this is giving</b> <b>us errors at the moment let's click on</b> <b>run test flow in fact</b> <b>it seems that this will keep giving us</b> <b>issues so i'm actually just going to</b> <b>delete this node for</b> <b>now let's click on test workflow again</b> <b>and now it's waiting for a</b> <b>message from our telegram bot</b> <b>so back in telegram we can now click on</b> <b>this bot to access it</b> <b>let's start the conversation</b> <b>and now we can see that n8n was
indeed</b> <b>triggered let's run this</b> <b>again and i'm just going to send</b> <b>the message like hello so going back to</b> <b>n8n if we double click on this trigger</b> <b>node on the right hand</b> <b>side we can see the output of this node</b> <b>it changes to the schema view</b> <b>and in this view we can see the</b> <b>name of the person who sent the message</b> <b>and at the very bottom we</b> <b>can indeed see the message text</b> <b>so what we can do now is on this http</b> <b>request node instead of</b> <b>hard coding the value as hello</b> <b>we can instead change
this to schema mode</b> <b>and then grab the text that we received</b> <b>from telegram itself</b> <b>i'm going to test this node by itself and</b> <b>this actually made a call</b> <b>to flowwise and from our</b> <b>flowwise agent we received this text</b> <b>hello how can i assist you i do want to</b> <b>add one more parameter</b> <b>to the body and that is the chat id if we</b> <b>call flowwise without</b> <b>providing a chat id then a new</b> <b>chat id will be generated for each</b> <b>interaction this is not ideal</b> <b>if we want to use chat memory</b> <b>so this means the agent won't
be able to</b> <b>recall our previous</b> <b>conversations so what we can do is</b> <b>pause in the chat id that we received</b> <b>from telegram and now our</b> <b>agent should be able to recall</b> <b>information for example let's say my name</b> <b>is leon let's run this okay</b> <b>it's saying hello leon and now</b> <b>let's ask what is my name let's run this</b> <b>and it was able to recall</b> <b>that our name is leon if we go</b> <b>back to flowwise we can go to settings</b> <b>view messages and we can</b> <b>see that conversation with</b> <b>an id of 5784 and if we go back
to</b> <b>telegram this is indeed the 5784 number</b> <b>that we received from</b> <b>telegram and of course we can see our</b> <b>conversation history great now finally</b> <b>let's send the response</b> <b>back to telegram by adding in that</b> <b>telegram node and more</b> <b>specifically the send a text message</b> <b>action let's select our credentials and</b> <b>for the chat id we do want</b> <b>to use the chat id node that</b> <b>we received from the telegram node so</b> <b>this guy over here and let's</b> <b>grab the chat id and finally</b> <b>for the text we can grab the text from</b> <b>the flowwise api great</b> <b>let's run
this and now back in</b> <b>telegram we can receive that response</b> <b>coming through but we</b> <b>also get this additional text</b> <b>which we don't want so in order to remove</b> <b>that click on add fields</b> <b>append n8n attribution and</b> <b>disable this it stays a step again and</b> <b>now we simply get our ai's</b> <b>response now all that's left</b> <b>to do is to save this flow and activate</b> <b>it we can click on got it and</b> <b>now we can have conversations</b> <b>with our agent so let's say hey what is</b> <b>openai03 and it says your</b> <b>name is leon which is definitely</b> <b>not
correct and that is because in the</b> <b>http request node i still</b> <b>have this hard coded value</b> <b>so let's make sure to use the message</b> <b>that we received from</b> <b>telegram cool let's save this and</b> <b>back in telegram let's start this again</b> <b>with a let's ask it what</b> <b>is openai03 and great that's</b> <b>working of course you can attach any of</b> <b>your flows to telegram now including</b> <b>multi-agent flows and</b> <b>sequential flows and that takes us to the</b> <b>end of this course if you</b> <b>enjoyed it then please hit the</b> <b>like button subscribe to my channel and</b> <b>share this video
i've got</b> <b>plenty of other content on</b> <b>flowwise especially on multi-agents and</b> <b>sequential agents so definitely check out</b> <b>those videos as well</b> <b>thank you for your time i'll see you in</b> <b>the next one bye bye</b>