📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

How To Build a Startup Team of AI Agents (n8n, OpenAI, FeedHive)

Simon Høiberg24:47

Transcription

This was my startup team in 2024. We were nine people in total, but this year we only have four people left. I replaced more than half of my team with AI agents, and in this video, I'll show you how you can create your own AI startup team. Yes, you can do this without writing code.

Every business is going to have a, um, an AI agent that their customers can talk to. Agents will begin to deliver on the hype. I got to tell you, the opportunity for agents is gigantic. As we AI agents are AI systems that can do work for hundreds of millions of billions of different AI agents. Billions of different AI agents. Whether you think this is good or bad, AI agents are here, and you can be certain that they're here to stay. Millions of jobs worldwide will soon be replaced by AI agents, and thousands of tech companies and small startups will reduce their headcount and their dependency on human labor. It's very likely that startup founders, just like myself, can go back to basics and become a solopreneur, running everything as a one-man business without reducing the output and without losing revenue.

And for you, the upcoming founder who wants to run a SaaS business but is blocked by the sheer thought of having to manage a team, this is incredible news. We're still very early, so don't miss out on this opportunity. Let's get ready, cuz we have work to do. In this video, I will show you step by step how you can create a fine-tuned, specialized AI model, how you can use it as an AI agent, and how to make it collaborate with other AI agents on your team. Let's get started.

One area of work I replaced with AI is content creation. I used to have people help me write content for social media, for my weekly SaaS newsletter, and my YouTube scripts. So in this video, we'll set up an AI agent that creates content for social media. Though the process I'll demonstrate here can be used for almost any type of task you typically run into on a startup team. Fortunately, OpenAI has made this incredibly easy for us. We can just ask ChatGPT to generate some content. Right, hey ChatGPT, can you create a banger post about SaaS and Entrepreneurship for me, please? Sure, how about this: Exciting times in the world of SaaS and Entrepreneurship. Every day presents new opportunities to innovate and lead in this dynamic industry. Uh, that's no, that's not something I would post. Uh, try again, please. Okay, how about this: Feeling grateful for the amazing journey of SaaS and Entrepreneurship. Here's to more coffee-fueled brainstorms and chasing dreams. That's really tacky and lame, and what's up with all the emojis? No. All right, all right, I got you. Leveraging and utilizing synergies in the existing realm of SaaS. You know what? Thank you. This is not going to work.

So it turns out we cannot just ask ChatGPT to create content for us and expect it to create anything of good quality. And many people who try this will stop here. They'll conclude that AI is bad, it's generic, poor, completely lacking substance, and so on. But let's just back up for a second and compare this to hiring a new employee. If you hired a content writer and you gave them no onboarding, access to no brand guidelines, no initial instructions, and just ask them to create a post about some topic, how do you think they do? Do you think you would magically be happy with their first result, or would you expect them to first learn about your brand, your core values, your style of writing, and the history of your company, and then start delivering good results? Cuz that's exactly what we need to do to prepare our AI agent.

Now I've seen many different approaches to this. A common method is including examples and instructions in the system prompt or the first message of the conversation. It rarely produces good results. That's why most of the custom GPTs suck, cuz that's exactly what they are. It's just a ChatGPT with some instruction in a system prompt injected into the chat before the conversation starts. These are not AI agents, even though some people incorrectly call them that. We need to fine-tune a model. In essence, instead of explaining what the AI should do, we will show it a whole bunch of examples of what an output should look like. Fine-tuning an AI model is the process of specializing an AI by training it on specific data. So in this case, we will prepare examples of social media content. It can be your own content; it can also be content from other creators that you really like. We should put together 20 to 50 good examples. Now, for each of them, we need to reverse engineer the prompt. So take this post and imagine ChatGPT generated this. What would the prompt have looked like? Probably something like this. Perfect. We need to repeat this for all examples. If you want to save some time, you can actually ask ChatGPT to reverse engineer the prompts for you. In most cases, it actually does quite well.

Now let's head over to platform.open.com and sign in with your ChatGPT account. Click fine-tuning in the left side menu and click create. This is where we create our fine-tuning job, but before we can upload our training data, we need to turn it into this specific format called JSONL. It's JSON, and it's one example per line. If you're a programmer, you can write a quick script to automate this. If you don't know what JSON is, just follow my lead here. For each example, we need one line on this specific format. We have a field called messages, which is a list that has two messages: one from the user, that will be our [Music] prompt, and one from the assistant, which would be the reply from the AI. If you want to include the line breaks as part of the data, you just need to use backslash n. There we go. Once we have all our training data in a JSONL file, we just need to upload it. Choose the base model. I recommend using GPT-4, and that's it. We can leave everything else as is and click create. Now OpenAI will start training your custom model. Once it's ready, we can go to the playground and try it out. So let's try again. Create a post about SaaS and Entrepreneurship. Okay, let me see. I was failing SaaS until I finally understood this: Your team should be remote; you should work async; taking VC money is your best bet. Awesome. That sounds exactly like my way of writing. Love it. Wait a minute. Well, what was that last line? Taking VC money is your best bet? No, no, we can't have that. I'm all about bootstrapped startups, so we can't have that thing with VC money. Ah, okay, got it, got it. How about this one? I was failing SaaS until I finally understood this: The easiest way to create a bootstrap SaaS is using cloud tools like Vercel or Netlify. No, no, no, absolutely not. You sound like me. Okay, but you're saying things I would never say, and this is our next problem.

Now we have a fine-tuned model that has learned to adopt a specific writing style, but it's not really that valuable if it doesn't know what our brand is all about. It needs to know which core beliefs and opinions to adopt, which common themes can be found in our content, which hot takes to drop, and which values to align with. And this is not exactly something we can find you in our way out of. Instead, we're going to do exactly what we would do with regular employees. We should write a brand brief in plain English. This brand brief should provide clear writing guidelines, describe our brand in terms of core values, content themes and objectives, dislikes and opponents, associated products and services, and other areas of our brand. Write this in a text file, Notion page, a Google Doc, or whatever you prefer. If you've never done this before or you haven't really thought about your personal brand in this way, I actually think it's a great exercise to spend some time writing all of this down. But again, if you want to save some time, you can have ChatGPT do this too. Simply take all of the training data you used to fine-tune your model in the previous step, upload it to ChatGPT directly, and ask it to create a brand brief given these posts. Then edit it to your liking and simply use that. For now, I've written my brand brief in a text file, and if we head back over to the playground, we can now upload this file and ask our fine-tuned model to use this brand brief as a base for creating our posts. I have to say, this is really good content. No one likes a feature creature. How did you come up with that? Well, I guess I learned from the best. Ah, I think you will fit in very well on this team. Though not going to lie, it's a little bit time-consuming to have to ask you to write every single post. Can't you work a little, a little bit more autonomously? I would love to, Simon, but I'm just an AI model. I can't do anything on my own initiative or make any active decisions. All I can do is answer you when you ask me for something.

So far, we've solved two major shortcomings of the normal ChatGPT. We fine-tuned a model to write in a specific way, and we taught it about our brand to understand what we're all about. It now knows what to say and how to say it, but it's still not an AI agent. It doesn't do anything on its own, and it doesn't make any decisions. To be fair, at this stage, it's still very useful. I've been using this exact setup for a long time, and it has been tremendously helpful, but it's also been very time-consuming: chatting with my fine-tuned model, refining, giving it feedback, copy-pasting the results into FeedHive, my social media tool, and so on. So at some point, I got this idea: What if I created a small team of AIs and gave them the agency to collaborate with each other and push the final results into FeedHive all by themselves? We can do better. How about an engaging question? We should also use a more consistent tone of voice. Here's how it would work: We want one AI agent to generate topic ideas; we want another agent to create a post from one of these topics; we want a third agent to check the quality of the post and give feedback to the second agent. The second agent will use the feedback to refine and improve the post. These two agents will go back and forth for a bit until they agree that the post aligns with the brand, uses the right tone of voice, and is of high quality. Then, finally, push the post to FeedHive, where it shows up under my drafts. Let's set this up. For this, we need a tool called n8n. n8n is an automation tool in the same family as Zapier and Make, but just way, way better. You can sign up and use n8n in the cloud, but you can also install it locally or self-hosted, which gives you unlimited workflow runs totally free of charge. Let's set this up in n8n. Click create, and then choose credential. Here you need to add the credentials to the apps you want n8n to access, such as Notion, Google Docs, OpenAI, and so on. You will, at the very least, need to give n8n access to OpenAI by adding an API key. There are many guides online on how to do this, so moving forward, I will assume that you have set up credentials for all the apps you need. So now that we have that done, let's start cooking. We'll start from the smallest task and work back up. In the n8n dashboard, create a new workflow. Let's call it brand brief. Add the first step. Since this is going to be a subtask, we will use when called by another workflow. I have my brand brief in Notion, so let's add a Notion node. We want to get all child blocks and add the URL to the Notion page. Hit test step. There we go. Now, because Notion outputs a page in blocks, we want to aggregate at the parts we need, so let's drag in an aggregate node. What we're interested in is the content fields. There we go. We now have a simple list of individual pieces of text, so let's add an edit fields node. Drag in our content list. We want the final output to be one piece of text, so we'll change this to string, and after content, we'll simply write .join, and there we go. This workflow is done. Let's move on. Create new, call it get content ideas. Once again, use when called by another workflow. Now, in order to get ideas, we first need the brand brief, so we'll use a call another workflow step, and we'll choose the brand brief workflow we just created. Let's rename this to get brand brief. Awesome. Next, let's add a simple OpenAI node called message a model. For this task, we can simply choose GPT-4 mini. In the text field, give the model a prompt that describes what it's supposed to do. We'll tell it to create 10 topic suggestions that align with the provided brand brief. We'll tell it to use a JSON output format like this, and we'll provide the brand brief from the step before. Enable output content as JSON. Let's try it out. That's perfect. And also here, let's add an edit node, and let's map this over to a simple list called suggestions, like that. Let's move on to the next workflow. We call this get content feedback. It's similar to the workflow we just did, so let's set up the execute workflow trigger and the get brand brief nodes just like before. This workflow is a little different since it will take some incoming data, namely the post to give feedback on, so let's double-click on the first node, click set mock data, then add some data like this. Perfect. And also here, we want a node from OpenAI that messages a model. And also here, we can choose GPT-4 mini. This time, we want to give the AI some rules to follow, so let's change this first message to the type system. The role of this AI is to give feedback and ensure the quality of a post is good, so we will simply give it some criteria to follow. Of course, you should adjust this to fit your specific brand. The most important part here is to have the model give a score between 0 and 1 and show it in the JSON format we want to use for the output. Let's make sure to include the brand brief, and this time we want to add another message with the role user, and this will simply be the query from the first step. Also here, we want to output as JSON, and let's test it. Perfect. And yeah, since this is just a mock input, I'd expect the score to be pretty low here, so that seems to work. Finally, also here, let's make sure to simplify the output a bit. There we go. Now we got everything we need. Let's put the whole thing together. I'll show you how to do this, but if you want to download and import all of these workflows directly into your own n8n, I will share access to these files with members of FounderStack. I'll tell you more about this towards the end of the video. Create a new workflow. Let's, let's call it content creator for now. The first step will be on chat message, but we'll change that in a bit. The next node will be an AI [Music] agent. Now we need to give this AI agent three things: a model, memory, and tools. For the model, we'll use OpenAI [Music], and because we linked our OpenAI account, we have access to the fine-tuned model we created earlier. For the memory, let's just use window buffer. Now we need to give this agent some tools. These tools are going to be the workflows we already created, so let's pick n8n workflow. Let's give the tool a name, get brand brief. Let's describe and pick the workflow from the list. We'll add the feedback tool in the very same way. There we go. Awesome. Now let's double-click the AI agent. We need to give this agent a description of its main objective, so we'll use system message, and we'll give it a description similar to this: a quick explanation of how we want it to work, how to use the tools we provided, and which final output we expect. Now let's hit chat and try it out. All right, and we can see that the models start collaborating, going back and forth, and there we go. Look at that. Really cool. At this point, the basic AI agent functionality is pretty much done. The agent has access to a fine-tuned model; it has access to the tools it needs to access the brand brief and get feedback; and because it's an agent, it figures out when and how to use these tools correctly given its task description. This right here is an actual AI agent. Let's finish up. Since we want the output of this AI agent to be passed onto another tool, in my case FeedHive, we'll add an HTTP request node here. In FeedHive, under automation, we can create a new trigger. I'll call this AI content and pre-select a few social accounts. I'll grab the URL from here and add it to n8n. We don't have images in this workflow, so I'll remove the media URLs part, and for the text, I'll grab the output from the AI agent and simply add it here. Now every time the agent finishes a post, it'll add it directly to FeedHive, where I can schedule it to go out. And instead of this chat message input, let's use the content idea task we created. We'll replace this with trigger manually. We'll add a call another workflow node, choose get content ideas from the list. There we go. Now let's add a split node. Drag in the suggestions from the idea step. Now let's add a loop to loop over each item. Awesome. Now, for each of the suggestions that was generated, we'll trigger the AI agent flow, but because the AI agent expects an AI chat input, we just need to add a temporary step here. So once again, edit fields. This time, let's use JSON, and we want an object that looks like this. For the session ID, we use an inbuilt variable called item index. The action should just be send message, and the chat input will be the suggestion we got from the idea generation step. Perfect. We can feed this directly into the AI agent, and after each loop is done, we need to make sure to go all the way back to continue with the next item, which is the next idea. Now all we have to do is click test workflow and see the whole thing in action. The AI agents will start working and a bit of back and forth, and finally off to FeedHive, where the post will appear under drafts: high-quality posts that are on-brand, using the right topics and using the right style of writing, fully automated. Isn't that just awesome?

Also, in case you didn't know, FeedHive, which is the social media management tool I used here, is one of the SaaS products my team and I run. And if you think all of this looked way too overwhelming and complex, FeedHive actually has a lightweight version of this exact flow built-in. You can write your posts, ask FeedHive's AI to give it a grade, and it will give you feedback and suggest changes to make your post better. To it's not using a fine-tuned model trained on your specific content, so it's not as good as a custom setup like the one we built here, but it's pretty solid and a very user-friendly experience. You can get lifetime access to FeedHive, as well as three other tools my team and I run, for a single one-time purchase. They all come with APIs and automation; they're all AI agent compatible. Go to founderstack.pro to check it out. I'll leave a link in the description.

Now I know I ran through some of this pretty fast, but I have put the full workflows together for you to easily import into your own n8n account and a step-by-step tutorial on how to set this up in a Notion doc. If you are a FounderStack member, you can go and access this right away. I have left the link in the description below. All you have to do is enter the email you used to buy FounderStack, and you'll get access to this immediately. If you want a more slow-paced technical introduction to n8n, just search here on YouTube. There are many excellent videos from creators showing you how to build all kinds of cool automation with these agents. Now I picked one example for this video, which is content creation, but through this, I'm using similar workflows for a whole range of different tasks. I hope you got inspired. Thanks for watching.