From the course: AI Agents for Everyday Professionals: Simple Automations to Speed Up Your Work (No Code Required)
Overview of AI agent interface - ChatGPT Tutorial
From the course: AI Agents for Everyday Professionals: Simple Automations to Speed Up Your Work (No Code Required)
Overview of AI agent interface
The tool that we're going to be using for AI agent workflow creation is called N8n and it's designed to actually do a lot more than just create AI agent workflows. You can actually automate a lot of different processes and workflows, but it's one of the best platforms to seamlessly integrate the APIs of your large language models like ChatGPT. So if we quickly scroll on the homepage here, we can see that this is what a lot of the user interface of N8n is actually going to look like. For my previous workflow, you can see here, This is the triggering node, right? The initial conditions that have to be met in order for the workflow to begin. This right here would be an example of an API, right? The anthropic API, which is Claude's brains, is being used to power this AI agent tool. And then this one also feeds into Slack and other profiles for its ultimate output. Once you've signed into it and created a profile and you can create a free trial on N8n. You should see an interface that looks something like this, but it'll probably be empty. Here you can go to the Workflows tab. You can find previous workflows that you've created or worked on. In the Credentials tab, you can actually find where you've logged in to a bunch of other third party accounts and incorporated them so that you can, again, use them for this workflow. And then in Past Executions, you can see where you maybe have some tools that have executed successfully and you can click on those and go into them and you can also see how long it takes to run those executions. The first thing that we're going to do is see an example of a successfully created workflow in 8.8n. So this is a weekly science and tech news tool that I've created and you can see how all the nodes here are put together to do something really, really simple. So the objective of this workflow is to take some different news sites that provide information about science or technology headlines and aggregate them, decide which things are important, and then compile an e-mail similar to how a weekly newsletter might and send me the links to those articles based on things that I might be interested in. We're going to unpack exactly what steps are taken in this very simple no code workflow. The first thing you have here is a trigger. And this is a manual execution. This is a really, really simple trigger where you basically just click Execute to start the workflow. Now, I could set up something that is more automated, where just every week just times it at a specific time of day. But for this one, I just wanted to set it up so I could just click on it and then make it work. So if we go into the AI Agent Summary, we can see what kind of prompt I'm using for the ChatGBT API so that it can make decisions about the data that it receives. You have to create a prompt very similarly to how you would engineer a prompt. And this is something that can be found in a lot of other prompt engineering courses on LinkedIn Learning. For this simple prompt, I just wanted to summarize science and tech news from the last 24 hours. Then I wanted to include any additional comments. And then I wanted the titles to also be science news and tech news, and then limit this list to 10 bullet points. And then I wanted to add links to each of the items at the end so that I could seamlessly click on them. And then this is a little bit of JSON that's automatically put in here that we don't have to worry about. But it just lets us know that that's today. What you can do if you're using a trial version of N8n is you can use the free credits that they provide for OpenAI so that you don't have to plug your API key in. But if you want to plug your API key in, And what you would have to do is go to platform.openai.com and make sure that you have an OpenAI account, which could be a similar account to what you use for chatGBT. And you'll have to set up everything on the backend to get API credentials. And then it'll provide you with a secret API key that you should not be sharing with anybody else. You can tap this dropdown menu to either connect with the innate and free OpenAI credits or your own credits from your OpenAI account. And you can actually select from this dropdown, specific model of GPT that you want to use. Now, one important thing to understand about this is that the larger the models, the larger the parameters of the model, the more tokens and credits it burns, and the more money you have to spend overall to actually execute on this workflow from your API key side. For something as simple as this, I always like to use the mini models because not a lot of thinking is required. Not a lot of intelligence. Now a lot of parameters of intelligence are required to successfully execute this workflow. Once you've added your brains, your API to this AI agent summary, you also want to add the tools for this AI agent summary to use. Where is it going to get its data from? And for that, we've created a link to an RSS feed from a popular news platform, The Verge, right? They talk about a lot of innovative, futuristic news. And a lot of these websites, you can simply type in the name of the news outlet and RSS feed, and they'll have a link that provides you with the raw data that you need to see the latest news headlines fed directly to your platform. And this is exactly what this URL achieves. So we've done that for the Verge, in addition to doing that for Science Daily as well. Once our API has received the RSS feeds of the news and then responds to the prompt by summarizing it, it has this output, which is the bulleted list of 10 links that I asked it for. From there, we can ask it to send a summary, this final output, to Gmail. And so what you can do here in the dropdown is connect your Gmail account, which is pretty seamless in the most recent version of N8N, similar to how you can sign in with Google on a lot of platforms these days. And then you can have it send to your preferred e-mail address. So mine is obviously blurred out here. Let's, let's go ahead and execute this workflow. So you can see here when this, this orange little ring is circling around the tools, it's still processing in real time. These two workflows are completed, it's already gotten information from the RSS feed. And so now it just has to synthesize that information and then give me an ultimate output. And this is something I could do once a day, it's something I could do once a week. And now we get different results every single time because there's new news stories that are updated. It looks like this workflow was now successfully executed. This means it has successfully been sent to Gmail. So let's go ahead and open up Gmail and see what's inside. Now that I've opened up Gmail, I can see that I received an e-mail from myself that's titled the way I wanted it to be titled your weekly science and tech news. And it has some recent headlines from articles on Science Daily, as well as The Verge, that are focused on science and technology. And I have links right here that I can click on if I want to get to those stories. I think this is really cool, because what I can do with this is create a curated custom newsletter that gives me exactly the types of news I want exactly when I want it and maybe not have to be subscribed to some annoying newsletter to get those emails. The next thing that we're gonna do is look at some of the pre-built AI agent workflows and use them to iterate on them and build our own agentic workflow that incorporates our own data sets into it. Still no code required.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.