TRANSCRIPTEnglish

Build 100% Self-Hosted AI Agents in 2026 (Surprisingly Easy)

34m 26s6,811 words553 segmentsEnglish

FULL TRANSCRIPT

0:00

What if I told you that you can create as many AI agents or AI automations you

0:04

want without paying for the APIs or the platforms?

0:08

Plus, all your data is confidential with you and is not shared with any third-party

0:13

apps. Sounds too good to be true, right?

0:16

Well, with open source platforms like n8n and open source LLMs like Ollama,

0:22

you can actually achieve this.

0:23

The logic is simple. You run it all on your own server so that you don't have

0:28

to pay the platforms or the APIs plus everything is confidential because it is with you.

0:34

Now you would think that okay that makes sense but in order to run it on my

0:37

own server will I have to get those expensive CPUs, GPUs, will I have to upgrade

0:43

my setup or anything like that?

0:45

Well the good news is no you don't. The other question you might have is do

0:49

I have to be technical enough to set this up?

0:52

Well no again surprisingly this is very easy and any non-technical person can easily set it up.

0:59

And in this video I'm going to show you exactly how you can self-host your entire

1:04

AI agent text tag starting from n8n moving on to Ollama for the LLM and then

1:10

using Postgres for memory as well as the database.

1:13

And this system is going to be quite flexible to use which means that different

1:17

users living at different locations will be easily able to access this system

1:21

and it won't be just restricted to one person.

1:25

I'm going to make it extremely easy for you to follow it step by step.

1:28

All you have to do is watch this video till the very end.

1:32

Now, this setup is not going to be at $0. You'll still have to pay a little bit for it.

1:36

But that's going to come at a fraction of the fraction cost that you would generally

1:40

pay for a setup like this if you weren't self-hosting it.

1:44

Speaking in dollars, you're going to be spending less than $7 a month on this.

1:48

And speaking in rupees, you're going to be spending less than 600 rupees a month

1:53

on this setup. And just to be honest, one generally spends more than this just on the LLM models.

1:59

So you can think of how affordable it is.

2:01

All right, so now that everything is clear, let's go ahead and set up this system.

2:06

All right so the goal for this video is going to be to build

2:09

an ai agent by the end of the video and the

2:11

condition would be that everything should run on

2:14

our end which means it should run on our server

2:18

or on our machine and yes it's not limited

2:20

to just one ai agent you can create as many ai

2:23

agents or ai automations or workflows as you

2:27

want talking about the tech stack so we're going to be

2:29

using any 10 which is a no code ai

2:32

agent slash ai workflow builder which is

2:35

going to allow you to create the ai agent without writing a single

2:38

line of code it is completely visual it has 400 plus integrations you can connect

2:43

it to any app and again it's open source that's why we're going with it the

2:48

second is going to be Ollama which is going to be our llm so for the ai agent

2:52

we're going to need ai intelligence right so that's where Ollama steps in so

2:56

it's open source and it's free,

2:58

which means you can use the LLM's intelligence without paying for the tokens.

3:03

And a cherry on the top is that Ollama also gives you access to Meta's Lama LLM model.

3:09

The third one on the list is going to be Postgres. So this is going to act as

3:14

a backend database for us, which

3:16

is also going to be to store our internet workflows and stuff like that.

3:20

And apart from that, it's going to also act as a memory holder for our AI agent.

3:26

The next one on the list is Coolify which is going to add to

3:29

the easiness of the deployment which means that even if you're a non-technical

3:33

person if you have no idea about how these things work you will still be able

3:37

to set it up just by clicking a few buttons and yes this is a one-time setup

3:41

you just have to spend your energy once and then you can keep on using it.

3:46

Now before we jump in a quick introduction about myself so hello everybody my

3:50

name is Yashica Jain I am the founder of Automatez AI, which is an AI automation

3:54

agency that focuses on automating businesses using AI.

3:59

In simpler words, we first understand a business's processes.

4:03

After that, we identify which AI solutions are going to make the most sense in their case.

4:08

And after that, we go ahead and implement those.

4:11

We take care of building and deploying it end to end. And then we also take

4:15

care of maintaining it for them moving forward.

4:18

So if you're looking to automate your business using AI or if you're looking

4:22

to get your custom AI dream project implemented then don't forget to check out

4:27

the link to our website in the description below.

4:30

Apart from that I'm also an AI consultant so if you would like to get on a one-on-one

4:33

call with me then you can check out the link to my calendar in the description below.

4:37

And as you already know I run my own YouTube channel for educating people on

4:41

AI and its implementations so if you're interested for more such content don't

4:45

forget to subscribe to the channel.

4:47

Do press the bell icon to get the notification every time I post a video.

4:51

If you'd like to connect with me personally, send me a connection request on

4:54

LinkedIn. I'll put the link to my account in the description.

4:57

And yes, this video has been sponsored by Hostinger.

5:01

So yeah, that's pretty much it. Now we can continue with the video.

5:04

The next question, why are we even self-hosting it? Why can't you just skip

5:08

this video, just create accounts with these platforms, pay them and use them?

5:12

So the majority of people are going to go with this for two reasons mainly the

5:16

first is cost savings you don't have to pay for apis you don't have to pay for

5:20

those expensive platforms for automation for ai agents.

5:25

Secondly, privacy and data control. If you're trying to keep your data confidential,

5:30

if you don't want anyone else to access your conversations, then this is the way to go about it.

5:36

The third reason is that it's publicly accessible, which I'm also going to explain on the next slide.

5:41

Apart from that, you're going to learn a little bit of DevOps skill throughout

5:45

this process and that too towards the AI technology.

5:48

Next up, you have full customization. You can do whatever you want because everything

5:52

is literally on your own server.

5:55

Now, even when we talk about hosting things on our own server,

5:58

there are two different categories to it.

6:00

The first one is through a VPS and the second one is locally.

6:04

VPS stands for virtual private server and local is nothing else but your laptop or your PC.

6:11

And in this case, we're going to go with a VPS. You're going to know why just in a moment.

6:15

But the majority of videos that you're going to find online are going to be

6:18

leaning towards local, which means everything on your own machine,

6:22

which is not something I personally prefer and that is again a reason why I created this video.

6:27

So yeah, let's see the difference between the two because you should know what you're doing.

6:31

The end results for both of these are going to be the same, but the features

6:35

and the benefits and the pros and the cons are going to be different for both of them.

6:39

So if you self-host it via a vps everything would

6:43

be accessible from anywhere which means

6:46

one team member could be from the us the other team member

6:49

could be let's say from australia and they would still be able to access any

6:53

turn they would still be able to access ulama or you can say postgres but in

6:58

case of local only the person who is you know hosting it on their machine can

7:03

access it The other thing is that the VPS runs 24 by 7, which means it's always online.

7:09

But in case of local, it just shuts down when your laptop shuts down.

7:14

So let's suppose that your AI agent or your automation has to run every single morning at 9am.

7:19

In that case, you'll have to make sure your laptop is running if you want your AI agent to run.

7:24

And not just your laptop, your server should also be running.

7:27

But in case of a VPS, you don't have to worry. It's kind of just like the cloud.

7:31

So even if you're sleeping, things are still going to work on the back end.

7:35

And since a VPS is accessible from anywhere, it facilitates team collaborations,

7:40

whereas in case of local, it is just single user.

7:43

The other major point because of which I lean towards the VPS is that no laptop

7:48

resource usage, which means it's not going to take space out of your system.

7:53

It's not going to drain its battery.

7:55

It's not going to cause performance issues, nothing like that.

7:58

Even if you have a basic laptop, a basic PC, it's

8:00

still going to work because it is not dependent on your

8:03

machine while in case of local it drains your battery your

8:06

cpu and there are performance issues and stuff

8:09

like that in case of vps you can have professional urls but

8:12

in case of local you just have the local host vps

8:16

is actually enterprise level as i said they're client ready deployments but

8:21

local is more for demo purposes testing purposes or learning purposes so long

8:26

term vps is a better option and the other point which i haven't mentioned here

8:30

but it's still on the back of my mind is that in case of local,

8:34

you have to actually install certain platforms.

8:37

You have to run certain commands and do it. It's a little bit technical,

8:40

but in case of VPS, it should be quite straightforward if you watch someone who has done it before.

8:47

So now let's go ahead and set up our VPS, which is nothing else but a virtual

8:51

private server, which is again your server, but it is virtually present.

8:57

In simpler terms, you're just renting it out from someone.

9:00

Now, out of all the different VPSs that I could choose from,

9:03

I'm going to choose Hostingles VPS because I've been using it for such a long time.

9:09

Their performance, value for money and support are the things that makes it

9:13

stand out as compared to the other ones in the market.

9:16

Their VPS plans are very affordable. You can go ahead and compare it.

9:20

And the timing couldn't be better because they're running their New Year's sale right now.

9:25

And this is the best time to turn your one day into day one.

9:29

Look, New Year's is all about making big moves, right?

9:32

Maybe working on that one project you're extremely passionate about,

9:36

maybe shifting your career or making your very first automation so that you

9:41

can start selling it to businesses or even deploying your first real AI application.

9:46

And with hosting as VPS, you get the freedom and the performance to stop planning and start working.

9:52

As I said in the beginning of the video, it's going to cost you less than $7 a month.

9:56

And talking about rupees, it's less than 600 rupees a month.

10:00

They have up to 71% off on their VPS plans and a cherry on the top.

10:04

If you go with their 24 month plan, you're going to get one month of free hosting

10:09

along with one free domain for an entire year.

10:12

So for this tutorial, I'm going to go with the KVM2 plan which is coming with

10:16

2 vCPU cores, 8GB RAM and 100GB NVMe disk space along with 8TB of bandwidth.

10:23

Now it's not that this VPS is just limited to what we are going to do today

10:27

and you're just buying it for this thing. No, that's not the case.

10:31

You can add more and more open source platforms or services that you would like to use on the same VPS.

10:37

The only condition is that the usage should not exceed this.

10:40

Alright, so you'll find the link to this page in the description below.

10:44

Don't forget to use that link. Once you land there, simply scroll down,

10:47

head over to KVM2 and click on Choose Plan.

10:50

Alright, so now we have to select the period for how long you'd like to have this VPS.

10:55

So, I would recommend you go with 24 months because I already said you're going

10:59

to get one additional month for free along with one domain for free for an entire year.

11:05

Plus, there are extra savings if you go with 24 months.

11:09

Then, if you want daily auto backup, you can go with this extension.

11:13

Next up, we have to select the server location. In most cases,

11:16

it's going to automatically fetch it for you.

11:18

If not you can just look into this list and find

11:21

the one and select the one which is the closest to you next up

11:24

we have to select the operating system so you can simply go

11:27

with ubuntu and for the version just select the latest stable

11:30

which is lts and click on confirm next up you will be able to see your order

11:35

summary here as you can see for the 24 month plan i have my domain name for

11:40

free and on top of that i also have one extra month and we also have domain

11:45

privacy protection Now,

11:47

though we have already saved a lot of money, we are not going to stop here.

11:50

Since you are watching my video, you can use the coupon code YASHICA15 to get

11:54

flat 15% off on your cart value.

11:58

There you go, discount applied. And mind you, this cost is for two years plus

12:03

one free additional month. And if you compare it with the non-self-hosted version,

12:08

you would exhaust this money just in a couple of months.

12:11

Now, just in case you're going with 12 months, you can use the coupon code Yashica

12:16

to get a flat 10% off on your cart value.

12:19

But yes, if you go with 12 months, you're not going to get that additional free month.

12:23

So you're going to find the link to hostinger along with the coupon codes in

12:27

the description and my recommendation is that please don't miss out on this save.

12:31

Let's turn your one day into day one.

12:34

Just click on continue complete your purchase and now let me show you how you

12:38

can go ahead and set up this VPS and then self-host those platforms so that

12:43

we can create our AI agent.

12:45

So whilst the purchase is successful it's going to ask you

12:47

to create a root password for your VPS which is

12:50

nothing else but a password that you would need to

12:53

access your vps all right so now all

12:56

you have to do is just simply create a password and store it somewhere then

13:00

simply click on next and next then it's going to ask you to wait for about five

13:04

to seven minutes while it you know sets up your vps so you can wait till that

13:08

time once that is done all you have to click on is manage vps and now let me

13:13

show you how the rest of the process is done.

13:16

So after your purchase is done all you have to do is

13:19

head over to vps then simply click on manage

13:22

and there you will see that it is running next up

13:25

you have to head over to os and panel and then

13:28

select operating system after that here search for

13:31

coolify okay so if you write cool it's going

13:34

to show you simply click on this so as

13:37

you can see it's an open source platform that simplifies deployment

13:40

and management of applications so once

13:43

you see this simply click on change os if it

13:45

is giving you a warning that just make sure to back up

13:48

your important data that's completely okay just click on

13:51

i recognize and then click on next then it's

13:54

going to ask you to create a new root password so this

13:57

is basically going to be to protect your vps and so

14:00

that only you can log into your vps so just create

14:03

a new password and make sure to store it somewhere make sure

14:06

you're following these rules and then click on confirm after

14:09

that is successful you will be able to see recreating your

14:13

vps and it's saying it can take up

14:15

to 10 minutes but it usually takes about three to five minutes

14:18

and while this is happening just for your future knowledge

14:21

if you ever want to change the operating system in the future what you can do

14:25

is you can always head over to operating system here and you can choose any

14:29

one of these okay so as you can see you have plain operating systems you have

14:33

operating systems with panel and you also have applications for example wordpress.

14:39

So once your operating system has been changed to

14:42

coolify all you have to do is head over to overview and then

14:45

you should see a screen something like this next up

14:48

let's click on manage panel then it's going to ask you

14:51

to create your coolify account so simply fill

14:54

in your details and then click on create account all right

14:57

so now let's click on let's go now we have to choose

15:00

our server type so in this case you're going to choose this

15:03

machine all right so now we have to go ahead and create a

15:06

project so simply click on create my first project then

15:10

it's going to show setup complete and then simply click on deploy your

15:13

first resource all right so this is how coolify looks

15:16

like as you can see and this is basically used to simplify the deployment process

15:21

and again it's open source and free so you can easily like deploy um github

15:27

repositories you can have your own private or public ones deployed here you

15:31

can do docker based deployments then you can have certain databases,

15:36

and all of these apps that you're seeing on screen.

15:41

And as I said previously, if you have remaining space on your VPS,

15:45

you can install other softwares out there as well.

15:48

And in our case we are going to go with docker-based and specifically

15:51

docker compose empty so docker compose

15:54

basically lets us deploy multiple services together

15:57

for example in this case we want anyten we want Ollama then we also want postgres

16:03

so that is where this comes in handy so you can think of it this way it creates

16:07

different containers for these different services one container for anyten one

16:12

for Ollama so on and so forth and we can easily interlink and interconnect them.

16:17

Now, before we go ahead and set these containers up or set these services up,

16:22

what we'll have to do is we'll have to pre-download their images,

16:25

which is going to help prevent any deployment errors.

16:29

So, you can also think of downloading installers before you install the actual app.

16:34

And in order to do that, you have to head back to Hostinger.

16:37

Come over to VPS, select your VPS, and then click on terminal.

16:42

Then we have to run these simple commands, which are going to you know pre-download

16:47

or they're going to download the images for any 10 postgres as well as ulama

16:52

you're going to find this command in the resources so anything

16:55

i copy paste may be the commands the codes anything it would be available in

16:59

the resources and the link for the same would be in the description it's going

17:03

to be free to access but again if you want to support the channel it's up to

17:06

you so these are the three commands and they are basically to you know get the

17:10

images the latest images for all three as you can see postgres.

17:14

Niter and ulama once you paste it all

17:17

you have to do is hit enter and it's gonna take care

17:20

of the rest so as you can see downloading Ollama basically

17:23

takes two gb worth of your space and

17:27

this is what adds up to the disk space and

17:30

if you still have remaining you can go ahead and download other ones which are

17:34

within that limit so how would you know if it's done or not so if you say root

17:38

at the date and then a couple of words basically a string then it means it has

17:43

been completed and again if you see your cursor where you can type something

17:46

like this white box, then it means it has been completed.

17:50

Now we can head back to Qualify. So again, you can either click on manage battle

17:55

or you can head back to your other tab and then go to your project,

18:00

my first project, click on add resource and then simply select Docker Compose empty.

18:07

Now this is where it's going to ask for a Docker Compose feature.

18:12

And the docker compose file is basically a file that specifies

18:15

the different services you would like to access and their

18:18

versions etc it also mentions things like

18:21

passwords urls etc and all

18:24

those services are interlinked using docker networking so

18:27

don't worry i already have this thing ready for you

18:30

all you have to do is copy it from the resources it has

18:33

been tried and tested it's working fine but if you

18:36

ever want to make any change to the file maybe add some

18:39

service delete it while then what you can do is you can

18:42

use the help of child gpd or claude to do it just just

18:45

in case you don't know how to do it all right so here is

18:48

our docker compose file it's not that big it's just 46 lines and this is how

18:53

it looks like again just copy it and paste it you should be good now here are

18:58

a few things that you could change so if you start from the very top the first

19:03

thing are these environmental variables for Postgres.

19:07

Postgres is basically our back-end database.

19:10

So here you can change the user id, the password, and the database.

19:14

Now I wouldn't recommend changing the user or the db, the database,

19:17

but yes you should change the password.

19:20

So right now it is just anytime secure pass123. You can change it to whatever you feel like.

19:26

This password would be needed later on when we connect Postgres to anytime.

19:30

So yeah you can change it but just make note of it next up if you scroll down

19:34

you'll spot any turn and again a couple of environment variables for example

19:39

dd type which is Postgres.

19:42

Then we have some more details around it. Again, we have another password.

19:46

And then you can also change the time zone for your NATEN account.

19:51

Now, this is not necessarily your NATEN password. That is something which we will set up afterwards.

19:57

But this is your Postgres database password, which is used on the back end of NATEN.

20:02

So again, if you want, you can change this. But just make a note of it.

20:06

I wouldn't recommend changing anything else.

20:08

Then if you scroll down, you'll spot ulama.

20:10

Nothing to change here. and just to summarize these are

20:13

the volumes we are going with so once this is

20:16

done all you have to do is click on save which is going to bring you to this

20:20

screen and here all you have to do is spot anyton under services and then click

20:25

on settings right there you will spot domains which is going to help you assign

20:29

a url to your anyton account which means that every time you go to that url

20:34

you will be able to access your anyton account.

20:36

So just like you have any 10.io or stuff

20:39

like that here you can specify your own domain now

20:43

if you have a domain of your own which you

20:45

would like to specify here you can do that and then do

20:48

the dns settings etc but in case you

20:51

don't have a domain um like a .com.io

20:55

or anything like that in that case what you can do is you

20:58

can use this domain that ends with

21:01

.sslip.io and then

21:04

the port name which is basically a free uh you know

21:07

domain or dns uh service and this

21:09

one automatically points to your ip and you don't

21:12

really have to do any sort of dns setting okay and here all you have to do is

21:18

change this part with your ip where are you going to get your ip head back to

21:23

hostinger and this is your ip these numbers okay not the starting part but these

21:29

numbers starting from 72 and it ends at 160.

21:33

Now this is my IP. This is not yours.

21:35

Yours would be different. And then you come back and then you replace it with

21:39

your IP and the port name remains the same.

21:42

Don't change this. But yes, if you want, you can change this.

21:45

For example, right now it is any 10, right?

21:48

What I can do is I can put Yashica.

21:51

So any 10 dash Yashica. Okay, but I'm not going

21:54

to do that and it's going to keep it as editor and then

21:57

let's simply save this next up all you have to do is click on deploy and this

22:03

is going to deploy our entire docker compose file which includes all the three

22:08

platforms so the way how it works is that Postgres starts first then editor

22:13

and connects to it and then comes Ollama.

22:15

Postgres is going to help us in two different ways here.

22:18

The first is acting as a backend for anything. For example, let's say you created

22:23

five different workflows and now you restarted the VPS, right?

22:28

If you again want to see your five different workflows and those modules,

22:32

etc., then you need to have a backend database, right?

22:35

And apart from that, let's say you are running your automations and you want

22:39

to check your automation history or executions history. Then again.

22:43

Everything is basically stored on Postgres.

22:47

And the second reason why we're going to use it is for our AI agent's memory.

22:52

So if it's a chat agent, it's really important to have memory.

22:55

For example, you send a first message and then in the second message,

22:59

you ask it, what was my first message?

23:01

If it's able to answer it, then that means the memory is configured.

23:05

And that is not automatically done in an AI agent.

23:08

You have to set it up. And that is where we're again going to use Postgres,

23:12

which is again production ready.

23:14

All right so this seems to be completed so now

23:17

let's simply close this and as you can

23:20

see it is running now how are you going to access anything

23:23

so all you have to do is copy this domain up until dot io okay and in your case

23:29

if you're using some other domain it could be dot com dot in whatever so just

23:33

copy this you can leave the colon and the port name we don't really need that

23:37

and in a new tab simply paste that and hit enter.

23:42

If everything was set up correctly you will see the screen that says set up

23:47

your owner account and you'll see N8N's logo.

23:50

All right so now all you have to do is set up your Eniton account.

23:53

So add your email first name last name and password and then simply click on next.

23:59

Make sure to check it so that you get any sort of

24:02

security and product updates then it's going

24:04

to ask you to fill out a form just do that if not

24:07

then just click on get started then it's going to ask if

24:10

it can send you that key that activation key so

24:13

just select send it to me because there is

24:16

no harm in having it in your inbox and there

24:19

you go anything has been successfully set up

24:22

easy and quick right now the first thing you

24:25

should do is you should bookmark your url because

24:28

again every time you want to access anything you have to

24:31

go to this url now here you will be able

24:33

to spot the other templates if you want to see more you

24:36

can see more and this anything is like any

24:39

other anything if you open this up you can check your

24:42

chats you can check out the templates insights help

24:46

you can also see settings here and another

24:49

good thing is you can easily access anytons mcp i have already created a video

24:53

on anyton mcp in case you're interested i'm gonna link it somewhere above here

24:58

apart from that you can also access anytons api you can access all the other

25:03

features you usually get with

25:04

your cloud plan or with you know a single self-hosted anything instance.

25:09

All right so yeah let's go ahead and create a workflow here.

25:12

There we go let's add the first step so as

25:15

a part of the trigger i'm going to select a chat trigger

25:18

since we want to create a chat agent now

25:22

my focus wouldn't be on teaching you ai agents

25:25

and anything in this video because i've already created

25:28

tons of videos on that so what i'm going to do is i'm

25:31

going to put a playlist in the description maybe i'll link it

25:34

above here as well where you will find videos for example um and it is crash

25:39

course by me you can find a video which is and it is tips and tricks you must

25:43

know and it is must know nodes etc and even a full video on the ai agent node

25:50

so yeah if you're interested in learning anytime then you can check it out.

25:54

All right so here's the ai agent node i have added it

25:57

now comes chat model which is basically adding an

26:00

lm to your ai agent now it could be

26:03

open ai and gemini anthropic as your

26:06

deep seek tons of options but what

26:09

we're gonna go with is Ollama so before we

26:11

set this up you'll have to go back to coolify so either

26:14

you can go through hostinger like you can go to manage panel or

26:18

if you already have the tab open you can just go back

26:21

to coolify now here what you'll have to do

26:23

is under projects after selecting your project

26:26

you'll have to go to terminal okay and then

26:29

select Ollama as the container then click

26:32

on connect and here you'll have to paste this simple

26:36

command which is going to help you download this particular model

26:39

so this is a small model llama again

26:42

um it's fast it's small like a

26:45

good one to get started with and the way this command

26:48

is written is Ollama pull and then the

26:50

name of the model okay you'll find this command

26:54

in the resources after you hit enter it's going to start downloading that model

26:58

for you and then you will be able to access it inside anything so just like

27:02

llama they have other models as well that you can access so if you just search

27:07

for Ollama models list and head over to the first link you'll be able to spot

27:11

the different models that you can work with.

27:13

For example, we have gpdoss, we have deep seek, we have these different ones.

27:20

So right now we're going with medazlama, then you have mistril, you have a lot of these.

27:25

So let's say you want to go with this one. So you can just click on it.

27:29

You will spot this command here. All you have to do is just copy this model's name.

27:33

And while you write these commands, all you have to do is replace the last part with that modeling.

27:38

And then if you hit enter, it will download it for you and then you can access it.

27:42

Again, it's going to take space on your VPS. So don't download all of them.

27:47

Just download the ones you actually need.

27:49

All right. So now that this is done, we're going to head back to anything.

27:53

Then we're going to click on select credentials. We're going to create a new

27:56

one. And here all you have to do is replace localhost with Ollama.

28:00

Okay. So it's like the same for everyone. This is how it should look like.

28:04

You can save this. It is connected.

28:06

Next up, we have to select the model. So you can either just select it from

28:10

here or else you can select expression first.

28:13

And then just copy the name of the model you had downloaded it so that you don't

28:18

get any errors and then simply paste it.

28:21

In this case, it's the same, but yeah, it's just a good practice to use the

28:24

same model name you downloaded. Then let's click on save.

28:28

Now, if we send a message to our AI agent, it should be able to reply.

28:33

So let's click on open chat and let's say hi. And as you can see,

28:36

it is running Ulama. And there we go. How can I help you today.

28:41

So let me just do this. Now if I ask it what was my last message it shouldn't

28:48

really be able to tell me that because we haven't connected memory yet.

28:52

So it's saying your last message was what was

28:55

my last message which is wrong because my last message

28:58

was hi and it is saying this because it does

29:01

not have memory and it's just taking this as my first

29:04

and my last message and that's where postgres is

29:07

going to step in so under memory just click on

29:10

add and then select postgres chat memory it's

29:13

going to ask you to create credentials so just create new

29:16

now here we'll have to change a couple of things so the

29:19

host is going to be postgres in this case

29:22

the database is going to be anything now this is

29:25

nothing else but the details that we had added inside our docker

29:28

compose file the user is again going to be anything and the password is again

29:32

that password that you had entered into your docker compose file the one you

29:37

had copied from the resources so in case you had changed it then it's going

29:41

to be something else but if you didn't change it then it was anything secure.

29:47

Pass one two three s capital

29:50

and p capital and the rest of it remains the

29:52

same simply click on save and there we go successful

29:56

now here you can choose how many uh like

29:59

past interactions you'd like to save so let's say

30:02

uh 10 i mean all of them are saved but

30:05

how many of these should the model receive as

30:08

context okay now let's uh come out

30:11

of this let's save it let's go back to open

30:14

chat let's start a new one and this

30:17

time again let's say hi and now let me

30:19

ask it what was my last message now

30:22

it is saying your last message was hi because it

30:25

was able to access the memory now this is

30:28

the basic structure of an AI agent you can

30:31

obviously go ahead and prompt it in order to

30:33

do that all you have to do is add option select add

30:37

option and then select system message here you

30:40

can write your prompt and the AI agent is going

30:43

to follow that here you can add different tools for

30:46

the AI agent all of these that you're seeing on the screen they're

30:49

all available as integrations just in case you're not seeing any tool you'd

30:54

like to have you can always use HTTP which is making an API request now again

30:59

I have a detailed video on the AI agent explaining all of these so if you're

31:03

interested in this topic you should give that a watch now this thing doesn't stop here.

31:08

You can create any sort of an automation which might or might not have an AI agent.

31:13

You can create any sort of AI agent with any trigger, any tool and any nodes.

31:19

If you want you can also head over to templates and from here you can choose a template.

31:23

You can also click on see more templates and you can choose from 7754 templates

31:29

which is as per today's date and you can easily use any of them.

31:33

Just make sure to use Ollama as the chat model and postgres for the chat memory.

31:39

If you click on add and you search for postgres you

31:42

will also see it as an integration again you

31:45

can use any of these nodes out there same thing

31:47

for Ollama you can search for Ollama and you

31:50

can also use analyze image or messenger model

31:53

we have the connections ready just letting you know for your future use cases

31:57

what all things you can use so now let's justify the statement i started with

32:02

so i said that you can create unlimited ai agents which is correct you can head

32:08

back to overview and you can create as many workflows as you want.

32:11

The other thing I said is that you don't have to pay for the APIs.

32:15

Basically, you know, chat models API, which is again correct.

32:18

You can use Ollama, you can change the model to whichever you like.

32:22

And the other thing I said was you don't have to pay for the platforms like

32:25

Make or anything, which is again correct.

32:27

You can run it as many times as you want and there is no cap on that.

32:31

Whereas on your actual cloud plan, you would have a

32:34

cap and that is how we self-hosted our ai agent a

32:37

hundred percent so the goal was to build an ai agent we

32:40

did that and the condition which was everything should

32:43

run on our end was fulfilled i would highly

32:46

recommend checking out my other videos on any

32:49

turn if you want to use this entire system to its

32:52

maximum capacity i have some great tutorials

32:55

of some great automations that can help you for let's

32:59

say your social media for your everyday operations to

33:02

help you automate a lot of things and again the cost

33:05

is less than seven dollars a month or you

33:08

can say 600 rupees a month and also you can add team members to it you can invite

33:13

them you can share the link etc with them and you should be good to go and this

33:18

is a long-term thing and it's production ready so i hope this video was valuable

33:22

you were able to learn something new and build something new If that was the case,

33:27

don't forget to like the video, subscribe to the channel and do press the bell

33:30

icon to get a notification every time I post a video.

33:34

And yes, I love going through the

33:35

comment section. So do drop your honest feedback in the comments below.

33:39

And if there's anything else you would want me to cover in my future videos,

33:43

then again, let me know in the comments below.

33:45

Don't forget to follow me on LinkedIn. Do send me a connection request there.

33:49

And also follow me on X. You'll find the link to both the platforms in the description.

33:54

And as I said, anything that I've copy pasted throughout the video,

33:57

maybe any code, maybe any command, you will find it in the resources linked

34:01

in the description below.

34:03

It's going to be free to access but if you want to support the channel

34:06

then that's up to you you'll find the link to Hostinger's VPS in the description

34:09

along with the coupon codes and yes don't miss out on the new year's sale if

34:14

you're thinking of doing this sometime later then do it today because they're

34:18

giving you great offers and great deals all right so I'm going to wrap up here

34:22

I'll meet you in the next video till then bye.

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.