AI Agent software - n8n

Yes.  I did just type that bunch of words.  I am so against using "AI" and the word "Agent", it actually makes me want to vomit.  It is buzzword bingo in its purity.  Getting beyond that, let me document a tool that could be really useful.  Potentially, I see the good old BPM (Business Process Management) software being used in conjunction with an orchestrated workflow process tool as being really useful for companies that want and need to do automation of business processes.  Not just jumping on the AI/LLM bandwagon.


Let me introduce you to the community edition of: n8n


So what is it? Well, it's kind of a bit like Node-Red in that it is a visual low code flow driven "programming" tool that allows you to hook up integrations really quickly and easily.

As you can see in the screenshot above, "AI Agent" is the "thing" that has got people mostly interested.  What does that really mean? Well, it just gives a consistent repeatable workflow approach that can be executed again and again, just the content of the workflow can change & be dynamic.

It's actually pretty simple and easy to get setup & running. Oh and it can run on MINIMUM hardware, yes, if it's smaller than a Raspberry Pi - it'll still work!


In fact this guy has a great intro tutorial that explains it really well - check it out:



Okay, here's another video tutorial:



And here's YET ANOTHER one - however, this is a 2 HOUR MASTERCLASS - ie. doing EVERYTHING from one video.  If you have the time, this is really really good (yes, I have watched all of the above).




As I say, if you've ever done anything with Node-Red, then this is really familiar, except it is what I've been looking for for quite a while - they've done a REALLY good job to create this tool & I see a great future for it - in todays world of "I don't want to pay for a programmer" and "I want this stuff built in a day" - this tool really helps with that.  Will it do the complex C code stuff? no.  Will it just help with an event driven starting point, capture / lookup data, integrate with LLM/GPT things, will it parse data and output to other integrated systems - sure - that's exactly what it is useful for.




Back to my setup.

I already have ollama installed and running, so I don't have to perform that install, but if I did I would use the ollama and web-ui docker container setup as that is really handy for development work.

Just incase you want to do the combined ollama/open-webui docker container, do the following:

$ docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama

That will make it available via a web-browser at http://localhost:3000 and the ollama LLM engine is available at http://localhost:11434

To install n8n as a container into an existing Docker Engine, do the following:

$ docker run -d -p 5678:5678 --name n8n --restart always -v /home/tony/.n8n -e N8N_SECURE_COOKIE=false n8nio/n8n


That will make it available via a web-browser at http://localhost:5678/

The environment variable setting above is required, otherwise you will get an error stating you cannot access the web application.

Once you do access it, you create a login account, the usual admin/admin credentials.

Then you get access to the tool.  You are asked if you want to sign up for a license key, you can [Skip>>] but I chose not to:


You then get an email with a key, you can then go to Settings and paste the key and you then get the extra features for free for the Community edition:

Then you are off!  You can start AUTOMATING everything you can think of - again, yes, this is all very Node-Red & probably nothing new here, however, it is the automation and usage of the LLM aspects that intrigues me - again, yes, you can do this from Node-Red, however, I want to see how seamless, quick and simple things like the SaaS integrations are for "normal people" usage.

One of the similarities with Node-Red is the ability to use pre-made Community nodes:


Again, like Node-Red, hosted on npm (as it makes sense that it's all based on nodeJS / JavaScript), okay not the 5000+ for Node-Red, but definitely a decent amount has been contributed & again, like Node-Red you can create your own nodes too

https://www.npmjs.com/search?q=keywords%3An8n-community-node-package




Now, we are ready to get started & use this awesome tool:


I selected to use a template for the AI Agent as a starter for 10.


Talking of Templates, click that link on the bottom-left and you'll be taken to >3500 Templates that you can use as inspiration, a starter or even just as a trigger to inspire you to use n8n:



I selected to use a template for the AI Agent as a starter for 10 (I later changed this as I wanted to use the local ollama install and, well, doing a HTTP Request directly was simpler - however, I didn't get the benefit of the Memory and other Tools, so there is a compromise)

https://n8n.io/workflows/6270-build-your-first-ai-agent/


The example flow:



However, starting from Scratch is also a good idea to get familiar:


As you can see, adding a trigger start from a button is simply a click away, then press the [+] and off to the right you see what you can add as a next Node.  We'll select an HTTP node, as I want to connect to something like theregister.com and gather the news stories listed on the home page and see whta I can do with it.  Yes, I could write JavaScript to do this, yes, I could write Python code to do this - however, point and click, configure not code, will always win.










x

Comments