How to Build AI Agent Teams (NO-CODE!) | Flowise Agentflows Tutorial

23.99k visualizzazioni2831 ParoleCopia testoCondividi
Leon van Zyl
How to Build AI Agent Teams using Flowise Agentflows. Flowise Agentflows makes it easy to build AI ...
Trascrizione del video:
<b>Flowwise recently added a solution for</b> <b>creating AI agent teams</b> <b>without needing to write any code. </b> <b>You can simply add team members to the</b> <b>team by dragging and</b> <b>dropping nodes onto a canvas,</b> <b>and then providing the roles and</b> <b>responsibilities to each worker agent. </b> <b>The team members will then work together</b> <b>to solve the user's task.
</b> <b>This is similar to frameworks like Crew</b> <b>AI and AutoGen without the</b> <b>need to write any code yourself. </b> <b>In fact, Flowwise uses</b> <b>LangRoth under the hood. </b> <b>With an AI agent team, you can pass an</b> <b>instruction to a supervisor agent,</b> <b>and the supervisor will then delegate and</b> <b>orchestrate the tasks between the</b> <b>different team members.
</b> <b>In this video, we will have a look at</b> <b>learning the fundamentals of creating</b> <b>agent teams in Flowwise</b> <b>by creating two exciting projects. </b> <b>First, we will create our very own</b> <b>software development team,</b> <b>and second, we will create a lead</b> <b>research team that will make use of tools</b> <b>to achieve their task. </b> <b>If you're new to Flowwise, then check out</b> <b>this video to set up</b> <b>Flowwise on your local machine.
</b> <b>Also, if you don't see agent flows in the</b> <b>menu, then please ensure to</b> <b>update your Flowwise instance. </b> <b>We can create our very first agent team</b> <b>by clicking on "Add New"</b> <b>within the Agent Flows page. </b> <b>Let's give our team a</b> <b>name by clicking on "Save",</b> <b>and let's call this</b> <b>"Software Development Team".
</b> <b>Let's save this, and let's start by</b> <b>adding a supervisor to the canvas. </b> <b>Within "Add Nodes", go to the multi-agent</b> <b>section, and add a supervisor. </b> <b>This supervisor agent is responsible for</b> <b>delegating the tasks</b> <b>between the different workers,</b> <b>and orchestrating the work</b> <b>until the task is achieved.
</b> <b>The supervisor node takes in an LLM as</b> <b>input, and optionally we</b> <b>can also add input moderation. </b> <b>We can also give our supervisor a name,</b> <b>but I'll just leave it as "supervisor",</b> <b>and under additional parameters, we can</b> <b>see the system prompt for the supervisor,</b> <b>and we really don't have to change this. </b> <b>This prompt is simply telling the</b> <b>supervisor that it needs</b> <b>to manage the conversations</b> <b>between the different team members.
</b> <b>We can go ahead and close out of this</b> <b>popup, and let's start</b> <b>by adding a chat model. </b> <b>Under "Add Nodes", let's go to "Chat</b> <b>Models", and for this video,</b> <b>we're going to add the</b> <b>"Chat OpenAI Model", like so. </b> <b>Let's connect our chat</b> <b>model to the supervisor.
</b> <b>Then within the "Chat OpenAI" node, let's</b> <b>select our credentials,</b> <b>and I've already set up my OpenAI</b> <b>credentials, but if you</b> <b>haven't done so already,</b> <b>simply click on "Create New", give your</b> <b>credential a name, and</b> <b>paste in your OpenAI API key. </b> <b>You can also check out this video, which</b> <b>shows you how you can</b> <b>create your OpenAI API key. </b> <b>Simply select your credentials from this</b> <b>drop-down, then under "Model Name",</b> <b>go ahead and select the new GPT40 model.
</b> <b>Let's also change the</b> <b>temperature from 0. 9 to 0. </b> <b>Now we can start adding</b> <b>team members to this team.
</b> <b>Let's go back to "Add Nodes", then under</b> <b>"Multi-Agents", let's</b> <b>add a "Worker" node. </b> <b>The "Worker" node can take in a list of</b> <b>tools as input, and we also need to</b> <b>assign a "Supervisor" node. </b> <b>So let's go ahead and attach our</b> <b>supervisor to this worker.
</b> <b>We can also add a chat model to this</b> <b>node, and this is optional. </b> <b>If we don't attach a</b> <b>model to the worker itself,</b> <b>the worker will simply inherit the chat</b> <b>model that is being used</b> <b>by the supervisor node,</b> <b>so this OpenAI node over here. </b> <b>But if we wanted to override the model</b> <b>that is being used by</b> <b>this specific worker,</b> <b>we can simply attach a</b> <b>different chat model to this.
</b> <b>This can be very useful for creating a</b> <b>team where different models need to</b> <b>verify each other's results. </b> <b>For this demo, we'll simply</b> <b>inherit the same chat model. </b> <b>Let's give our worker a name.
</b> <b>For this team, I</b> <b>actually want three workers. </b> <b>First, I want a product designer that is</b> <b>responsible for coming up with the</b> <b>feature set for our application. </b> <b>The second worker will be the software</b> <b>developer that is</b> <b>responsible for writing the code.
</b> <b>And the third worker</b> <b>will be the technical writer</b> <b>which is responsible for writing the user</b> <b>manual for our application. </b> <b>Let's start by</b> <b>creating our product designer. </b> <b>I will call this worker product designer,</b> <b>and for the worker prompt,</b> <b>we can specify the</b> <b>roles and responsibilities.
</b> <b>Let's enter something like, "You work for</b> <b>a software development company. "</b> <b>"Your role as product designer is to come</b> <b>up with the features and product design</b> <b>based on the user requirements. "</b> <b>Let's save this prompt, and let's have a</b> <b>look at the rest of</b> <b>the inputs on this node.
</b> <b>We can also provide</b> <b>variables in this prompt template</b> <b>which we can then specify</b> <b>within the prompt values. </b> <b>And we will have a look at</b> <b>that in the second example. </b> <b>We can also specify the max</b> <b>iterations or leave it blank.
</b> <b>This will simply tell the application how</b> <b>many times this node</b> <b>can go back and forth</b> <b>and make changes to its solution. </b> <b>Let's simply leave this blank. </b> <b>We can already test our team out by</b> <b>saving the chat flow.
</b> <b>We can then click on this chat bubble. </b> <b>Let's expand this, and let's ask our team</b> <b>to build a to-do list app. </b> <b>First, you will notice a</b> <b>message from the supervisor,</b> <b>and the supervisor is passing the request</b> <b>on to the product designer</b> <b>who is now currently</b> <b>busy with their task.
</b> <b>And after a few seconds, we can see the</b> <b>response coming back</b> <b>from the product designer. </b> <b>Let's have a look at this. </b> <b>And the product designer did indeed list</b> <b>all the core features</b> <b>of our to-do list app.
</b> <b>And this also includes some advanced</b> <b>features, the user interface design, the</b> <b>tech stack, and more. </b> <b>Now let's add our</b> <b>other two workers as well. </b> <b>So under add nodes,</b> <b>let's add another worker.
</b> <b>Let's call this worker the developer. </b> <b>Let's attach our</b> <b>supervisor to our developer as well. </b> <b>And for the developer's prompt, let's</b> <b>enter something like,</b> <b>you work for a</b> <b>software development company.
</b> <b>As an experienced software developer,</b> <b>you build software solutions using React,</b> <b>Next. js, Tailwind, CSS, Express,</b> <b>JavaScript, and Node. </b> <b>Let's save this, and let's also add our</b> <b>final worker, which is the</b> <b>technical document writer.
</b> <b>So let's attach our</b> <b>supervisor to this node. </b> <b>Let's call this technical writer. </b> <b>And for the worker prompt, let's enter.
</b> <b>You work for a</b> <b>software development company. </b> <b>Write a detailed user manual based on the</b> <b>product design and code</b> <b>written by the team members. </b> <b>The manual should be in markdown format.
</b> <b>It's safe as prompt, and</b> <b>let's test our flow by saving it. </b> <b>And in the chat, let's expand this. </b> <b>Let's clear the chat, and let's ask it</b> <b>again, build a to-do list app.
</b> <b>So we can see the supervisor passing the</b> <b>message to the product designer. </b> <b>What is impressive about this is the</b> <b>supervisor is able to correctly determine</b> <b>the sequence of events. </b> <b>It wouldn't make sense to ask the</b> <b>document writer or the</b> <b>developer to go first.
</b> <b>So after we receive the product design,</b> <b>the supervisor now passes the product</b> <b>design over to the developer. </b> <b>The developer now put everything in place</b> <b>to build a software application,</b> <b>and it's also produced the code. </b> <b>We can now see the supervisor requesting</b> <b>the technical writer to</b> <b>write the user manual.
</b> <b>And finally, we can see the manual that</b> <b>was produced by the technical writer. </b> <b>And this is in markdown format. </b> <b>Building an AI agent</b> <b>team couldn't be any easier.
</b> <b>Now let's have a look at the second</b> <b>example, where we will build a lead</b> <b>research team that</b> <b>will be able to use tools. </b> <b>But first, if you like this video, hit</b> <b>the like button and</b> <b>subscribe to my channel. </b> <b>Also, let me know in the comments if</b> <b>there are any scenarios or use cases</b> <b>that you would like me to</b> <b>cover in a future video.
</b> <b>Let's go back to the dashboard and let's</b> <b>go to agent flows and let's</b> <b>create our second example. </b> <b>Let's save this. </b> <b>Let's call this lead</b> <b>outreach team and let's save this.
</b> <b>Let's start by adding our supervisor. </b> <b>So we'll drag and</b> <b>drop the supervisor node. </b> <b>The supervisor also needs a chat model.
</b> <b>So let's grab the chat open AI node. </b> <b>Let's attach the open AI</b> <b>node to the supervisor. </b> <b>Let's also select our credentials.
</b> <b>Let's change the model to GPT40. </b> <b>And let's set the temperature to zero. </b> <b>Now this team needs two workers.
</b> <b>So let's go ahead and add those workers</b> <b>and I will explain</b> <b>what each of them will do. </b> <b>So let's add our first worker. </b> <b>Let's duplicate this and let's attach the</b> <b>supervisor to these two workers.
</b> <b>So we'll do this and we'll</b> <b>attach it to this worker. </b> <b>Great. </b> <b>I'm going to clear the prompt</b> <b>templates for each of these.
</b> <b>And let's give our first worker a name</b> <b>like lead researcher</b> <b>and for the second one,</b> <b>we'll call it the lead</b> <b>sales representative. </b> <b>So what we want to do here is we want our</b> <b>researcher to go online</b> <b>and build out a detailed</b> <b>report of a specific lead. </b> <b>So effectively we want to tell this</b> <b>researcher to go online</b> <b>and build out a full report for a</b> <b>specific individual.
</b> <b>This report needs to contain information</b> <b>like the professional experience,</b> <b>their involvement in</b> <b>projects and companies, etc. </b> <b>And the lead sales representative is then</b> <b>responsible for</b> <b>generating personalized messages</b> <b>based on the results from the researcher</b> <b>for that individual. </b> <b>So one obvious issue here is that this</b> <b>researcher will have no way</b> <b>of going online and performing research.
</b> <b>It will only be able to produce its</b> <b>report based on the data</b> <b>that it was trained on,</b> <b>which is not up to date and</b> <b>will not work in most instances. </b> <b>So what we'll do to solve this problem is</b> <b>to add a tool to this worker</b> <b>that will allow it to</b> <b>perform Google searches. </b> <b>And we will get back to that in a second.
</b> <b>Let's first complete these prompts. </b> <b>So for the first worker, I'm actually</b> <b>going to paste in this prompt</b> <b>and feel free to pause the video to have</b> <b>a look at this prompt. </b> <b>But this is something that you could very</b> <b>easily generate with chat GPT.
</b> <b>This is simply a role description for a</b> <b>lead research agent. </b> <b>And this is simply saying that this</b> <b>researcher needs to use</b> <b>all the tools available to it</b> <b>to build out a detailed report for a lead</b> <b>person working for a lead company. </b> <b>Let's save this and let's do the same for</b> <b>the sales representative.
</b> <b>And this is simply telling this agent</b> <b>that is responsible</b> <b>for writing personalized</b> <b>messages for the lead person. </b> <b>So feel free to pause the video and have</b> <b>a look at this prompt. </b> <b>Again, your prompt does not have to be</b> <b>nearly as complicated as this,</b> <b>but this prompt does</b> <b>seem to work quite well.
</b> <b>Let's save this. </b> <b>And you might have noticed that in these</b> <b>prompts, we are using these curly braces</b> <b>and these represent variables, as we will</b> <b>be entering these variables</b> <b>by going to format prompt values. </b> <b>Within here, we can now swap out these</b> <b>values and I'm going to</b> <b>call my company Lion Research.
</b> <b>Let's accept this. </b> <b>And for the lead person and company, we</b> <b>want to perform</b> <b>research for Harrison Chase,</b> <b>who works for Lang chain. </b> <b>So for the company,</b> <b>let's enter Lang chain.
</b> <b>And for the person, let's</b> <b>enter Harrison Chase, like so. </b> <b>Let's close this pop up and let's do the</b> <b>same thing for the sales representative. </b> <b>Our company is called Lion Research.
</b> <b>The lead company is called Lang chain. </b> <b>The lead person is called Harrison Chase. </b> <b>And for the lead activity, we</b> <b>will focus on the Lang graph.
</b> <b>And as a reminder, this agent flow</b> <b>solution in Lang flow is</b> <b>actually based on the Lang</b> <b>graph framework that was</b> <b>developed by Lang chain. </b> <b>Let's close this. </b> <b>Let's save this flow.
</b> <b>And we can go ahead and save this,</b> <b>although we haven't provided</b> <b>a tool for the researcher yet. </b> <b>And we will do that in a second. </b> <b>Let's just see if this is</b> <b>working so far by just typing go.
</b> <b>Our supervisor is asking the researcher</b> <b>to write out that</b> <b>detailed report for our lead. </b> <b>And after the researcher is complete, the</b> <b>supervisor is now asking</b> <b>our sales representative</b> <b>to draft up those personalized messages. </b> <b>And we can indeed see those different</b> <b>messages being produced.
</b> <b>Now the issue here is this researcher</b> <b>produced this report based on the</b> <b>training data that is</b> <b>baked into the open AI models. </b> <b>This data could very much</b> <b>be outdated and inaccurate. </b> <b>We can greatly improve the results by</b> <b>giving this researcher</b> <b>access to a Google search tool.
</b> <b>Let's do that now by going</b> <b>to add nodes and under tools,</b> <b>we can see a list of different tools that</b> <b>we can assign to any of these workers. </b> <b>For example, you could use a chat flow</b> <b>tool to allow the user to</b> <b>call any of your chat flows</b> <b>in flow wise, or you can use the custom</b> <b>tool to write your very</b> <b>own tools that could call</b> <b>service endpoints, for</b> <b>instance, to Zapier or make. </b> <b>But what we're interested in is this</b> <b>Google custom search tool.
</b> <b>Let's add this to the canvas and let's</b> <b>connect this tool to our worker. </b> <b>It's also useful to know that you can</b> <b>attach more than one tool to a worker. </b> <b>So as an example, let's add this</b> <b>calculator tool, we can</b> <b>take this tool and also attach</b> <b>it to the same worker and the worker will</b> <b>decide which tool to use and when.
</b> <b>Right, so now to get this custom search</b> <b>tool working, we need to</b> <b>provide some credentials. </b> <b>Click on this drop down. </b> <b>And for you, there won't</b> <b>be any credentials yet.
</b> <b>So click on create new, then</b> <b>give your credentials a name. </b> <b>I'll call this Google custom search</b> <b>YouTube tutorial, but you can</b> <b>call yours whatever you want. </b> <b>Then we need to provide a Google custom</b> <b>search API key, as well as a</b> <b>programmable search engine ID.
</b> <b>These are very simple to set up. </b> <b>First, let's go to the</b> <b>Google Cloud console. </b> <b>You will be asked to sign</b> <b>in with your Google account.
</b> <b>Afterwards, you should</b> <b>see some sort of dashboard. </b> <b>Let's create a new project by clicking on</b> <b>this drop down and</b> <b>let's create a new project. </b> <b>Let's give our project a name.
</b> <b>I'll call mine flow</b> <b>wise agent flow tutorial. </b> <b>Let's click on create. </b> <b>We can click on this drop down again.
</b> <b>And then let's select the</b> <b>project that we just created. </b> <b>Now go to the navigation menu, then click</b> <b>on API and services,</b> <b>and then click on library. </b> <b>From the library, let's</b> <b>search for the custom search API.
</b> <b>Click on the custom search API. </b> <b>And then lastly, click on enable. </b> <b>Once this has been enabled, click on</b> <b>credentials, then click on create</b> <b>credentials, and then API key.
</b> <b>Let's copy this key and then back in flow</b> <b>wise, paste in that API key. </b> <b>So let's go ahead and</b> <b>create our search engine ID. </b> <b>Let's click on this link and here simply</b> <b>enter the name of your search engine.
</b> <b>I'll just call it flow wise agent flows. </b> <b>And then under this section, select</b> <b>search the entire web. </b> <b>And under search settings,</b> <b>I'm going to enable safe search.
</b> <b>I'm also going to tell it that I'm not a</b> <b>robot and let's click on create. </b> <b>Now we can click on</b> <b>back to all search engines. </b> <b>We can then click on the search engine</b> <b>that we just created.
</b> <b>And from here, we can</b> <b>find our search engine ID. </b> <b>Let's copy this. </b> <b>And now we can paste this into this field</b> <b>and let's click on add.
</b> <b>Ensure that you've selected the</b> <b>credential that you just</b> <b>created and save your chat flow. </b> <b>So let's run this again. </b> <b>But this time we're expecting the</b> <b>researcher to use the Google custom</b> <b>search to perform its research.
</b> <b>I'll just enter something like go. </b> <b>The supervisor is passing the instruction</b> <b>over to the researcher. </b> <b>Once the team has completed their work,</b> <b>let's go back up to the lead researcher.
</b> <b>We can see that the lead researcher used</b> <b>the Google custom search tool four times. </b> <b>When we open up these tools,</b> <b>we can see the search query</b> <b>that was executed and the</b> <b>response from the Google results. </b> <b>And we can see that for each</b> <b>and every one of these tools.
</b> <b>It is impressive to see how this</b> <b>researcher determined</b> <b>which search queries to use. </b> <b>And this time the results from the model</b> <b>is actually based on up to date</b> <b>information from Google. </b> <b>I hope you enjoyed this</b> <b>video and I would like to know</b> <b>what use cases you would like me to cover</b> <b>in these tutorial videos.
</b> <b>If you would like to learn everything</b> <b>there is to know about Flow-wise,</b> <b>then check out this</b> <b>tutorial series over here.
Copyright © 2025. Realizzato con ♥ a Londra da YTScribe.com