you2idea@video:~$ watch V-0ExE6imTg [15:59]
// transcript — 219 segments
0:02 I get asked this question more than anything, so it is about time that I
0:06 make a video covering this. Should I be building my AI agents with N8N or
0:11 Python? Or more generally, should I build my agents with no code tools or in
0:17 code? If I had a dime for every time someone asked me this, Elon Musk would
0:21 wish he had my net worth. And so my goal in this video for you, just very
0:25 broadly, is to make it easy for you to make a decision use case by use case.
0:30 Should I stick to N8N as the easy way to build AI agents or move to code, get
0:34 over that learning curve and probably learn how to leverage AI coding
0:38 assistance as well? And all the pros and cons that I have here in this beautiful
0:43 diagram that'll guide our video today, I honestly don't think that any of them
0:47 are hot takes. But of course, there are always nuances that you might think of
0:50 as we go over this. And so definitely let me know in the comments if you agree
0:54 with everything that I'm saying here or if you think that there's something that
0:57 I've missed. And before I go and say anything positive or negative about
1:01 either, I just want to be super clear that I have a deep level of respect for
1:06 building AI agents both with N8N and Python and all the AI agent frameworks
1:10 that we have there. In fact, at the end of the video, there is something else
1:13 that I want you to consider. We don't necessarily have to pick one over the
1:18 other. More on that later. But right now, I want to explain my general
1:23 recommendation and then get into the pros and cons to really help you think
1:27 for yourself how what I'm saying applies to your use case. And so, at a high
1:32 level, I recommend using N8N to build your AI agents for any kind of
1:36 integrationheavy internal tools, proof of concepts, and team collaboration
1:41 across skill levels. So, N8N is a very integrationheavy platform. You can
1:44 connect to hundreds of different services so easily. And so any kind of
1:48 internal automations you have for your team, N8 is great for that. And then
1:52 proof of concepts simply because you can build so quickly with N8N. And then
1:57 across different skill levels because there is a lot less of a learning curve
2:00 building your agents and automations in N8N versus in Python. Now, when you
2:06 really want to get to production scale applications or anything where speed,
2:11 control, and flexibility, like how much can you really design the solution
2:15 around exactly what you want, that is when I recommend going with Python. I
2:19 know a lot of people that start with N8N because it's easier and then they move
2:22 to Python when they really want to take their ideas far. Not saying that you
2:26 can't do the same with N8N, but that's just generally what I see. And I do use
2:31 both as a part of my workflow still because I'll use nitn to prototype so I
2:35 can ideulate quickly and then move to Python when I really want to scale
2:38 things and have a lot of the flexibility that I'll be talking about throughout
2:43 this video. And so with that, I want to move on to the pros and cons here. I
2:48 love my pros and cons list and I made it look all nice and pretty for you as
2:51 well. And so I want to start with N8N, talk about the good and the bad there
2:55 and then how that relates to Python. And by the way, when I say N8N versus
2:59 Python, I mean more generally no code versus code, these are just the two
3:03 tools that I use extensively myself and what I cover on my YouTube channel. So
3:08 starting with N8N, it is both very easy to get started. The learning curve is
3:13 quite small and it is a beautifully visual agent builder. So I've got a
3:17 workflow up just as an example to talk about here. When I'm building with N8N,
3:22 it feels like I have this canvas. It's like an art form to create my AI agents
3:27 and automations. I just love how easy it is to connect my different nodes
3:30 together. I can visualize the tools I have connected to my agent, for example.
3:35 You definitely don't have this kind of experience when you're working with code
3:40 instead. And of course, you've got your hundreds of integrations and thousands
3:43 of templates to help you get started. One of the things that N8N makes so easy
3:47 is integrating with your different services like my database with Postgress
3:52 or Google Drive. I just go in here. I can pick from the hundreds of different
3:56 integrations that we have. And then it walks me through setting up my
3:59 credentials. And then boom, I'm good to go for each service in just a couple of
4:03 minutes. And it's not that easy to do with code. A lot of times you find
4:06 yourself rebuilding the same integrations that other people have
4:10 thousands of times because it isn't just a node you can drag into your workflow.
4:14 And speaking of leaning on other people, there's also thousands of templates for
4:19 us to use in the N template library. No matter what you want to build or the
4:22 service you want to integrate with specifically, you'll probably find
4:25 something here to help you get started so you don't have to start anything from
4:29 scratch. And that's part of what I do with my YouTube channel as well is
4:32 sharing these templates like this one for an Aentic rag agent with knowledge
4:37 graphs so that you have a place to start from. This isn't the end goal, but this
4:40 is a template for you to build on top of and customize to your use case. And so
4:44 there's a lot of things out there to help us do that with N8N. And also for a
4:51 noode platform, N8N scales extremely well because of something called Q mode.
4:54 That's definitely more advanced. I'm not going to cover that in this video
4:58 extensively obviously, but like for a noode platform, N8N scales to thousands
5:04 of users quite well. And also, I definitely have to call out that N8N is
5:09 open- source and self-hostable, which also means we can build our AI agents to
5:12 run completely locally if we're working with sensitive data or just want a very
5:17 secure environment. And so, I have always appreciate N8N a lot for that.
5:21 So, a lot of high praise for N8N. It really is an incredible platform, but
5:25 there are unfortunately some cons that we have to cover here. First of all, N8N
5:31 is 100% open- source and self-hostable, but that doesn't mean that it's free for
5:35 you to commercialize your workflows. You have to pay a license fee. Now, I'm not
5:40 going to do a cost breakdown right now, but definitely go research that if it
5:44 applies to you. Just know that this is a big reason that I use N8N for internal
5:49 tools and proof of concepts because I'm not commercializing either of those.
5:54 Also with N8N we hit what I call the noode performance and noode integration
6:00 box. So for performance there is an overhead for these noode platforms with
6:05 these node builders. They're never going to be as efficient as directly running
6:10 code. Even with a language like Python that is generally considered to be one
6:15 of the slower languages, it still has a lot better efficiency compared to N8N.
6:19 And then what I mean by the integration box is we are boxed in to the
6:25 integrations that N8N supplies us. And sure, it's pretty fantastic how many
6:30 there are overall, but it's going to get to that point where you find that one
6:34 tool that you really want to use, but it's not there in the integration list.
6:38 And so you have to build the integration yourself, typically with an HTTP request
6:43 node. But that gets more complex. And often times, especially because of AI
6:46 coding assistance, at that point it's easier to just code the solution. And
6:51 even for the integrations that are there for you, they don't always have what you
6:56 need. One good example is Google Drive. We're able to watch for files that are
7:00 created or updated in a Google Drive folder, but not for files that are
7:04 deleted. And for something like a rag pipeline where we need to keep our
7:07 knowledge base in sync with Google Drive, that's actually pretty important.
7:11 And so this is a good example where I had to build this workflow with a direct
7:15 integration using the HTTP node to the Google Drive API to watch for files that
7:20 are deleted and I have to do so periodically. It's not an ideal
7:23 solution, but that's what I was forced to do with N8N. And kind of going along
7:28 the same lines here, when you can't do something in N8N, a lot of times you'll
7:33 resort to using code nodes, which don't get me wrong, it's fantastic that N8N
7:39 gives this to us. So we can inject code anywhere in our workflows when we need
7:42 some more customizability, but these code nodes are not very efficient. And
7:47 because of security reasons, you're very limited to the libraries that you can
7:52 import into the JavaScript or Python code nodes. And so they're fantastic.
7:57 They solve the problem they aim to solve, but they're never going to be
8:00 ideal. And I see these workflows all the time where they end up just being half
8:03 code now. And it's like, come on, man. Why don't you just code the solution in
8:08 the first place? Also, end workflows are difficult to version control. One of the
8:13 beautiful things that we have with code is we can track the changes in our files
8:17 over time and even revert things when the things go wrong. And that's all
8:21 thanks to git. Now, we can just throw the JSON workflows for N8N in our Git
8:29 repository, but JSON diffs are pretty ugly. Not to get too technical here.
8:32 It's actually quite difficult to really see what has changed in your workflow
8:36 over time, and it's kind of unal because you have to translate things between Git
8:40 and then like bringing it back into GitHub when you want to revert something
8:43 or see what you had in a previous version. And then last but not least,
8:47 N8N does not work very well for large files, which is especially important for
8:53 your RAG AI agents. I have had N8N choke, even with 20 megabyte PDF files,
8:58 bringing it through something like a RAG pipeline. And that's even if my machine
9:04 hosting NAN definitely has enough memory because there's a separate problem with
9:09 node buffering. And generally what I've seen in the nan community is especially
9:13 once you get to 200 megabytes for your files nan is going to choke so bad and
9:18 you can handle tens hundreds of gigabytes easily in your Python code as
9:22 long as you have the memory in your machine to handle that. So that's nan at
9:26 a high level. There are definitely cons to code as well. So I want to cover that
9:30 too. So moving over to code now I'm going to start with the cons with Python
9:35 here. First of all, we obviously have a higher learning curve. Even with the
9:39 help of AI coding assistance, which I cover so much on my channel nowadays,
9:45 you still need to validate the code. And so, it's important for you to understand
9:49 Python or really whatever language or AI agent framework you're working with. And
9:53 so, it does take more to get yourself comfortable. And also, there is a higher
9:59 chance of security issues. You need to know your stuff more. So, kind of
10:02 related to the higher learning curve, but security I wanted to call out
10:05 specifically because there's a lot that NAN handles for us with security because
10:10 they manage the credentials. They help us set up the credentials like I showed
10:13 earlier and so you have to worry about that less. Also, one of the biggest
10:18 things with N8N is they give us the integrations ahead of time. We don't
10:22 have to set up things oursel unless we're hitting the integration box. With
10:27 code, that's different. Even if there are a million developers that have
10:30 already set up a Google Drive integration, a lot of times you'll find
10:34 yourself rebuilding it from scratch because there's no clear here's your
10:38 node to dump into your workflow like we have with N8N. And then last but not
10:43 least, code can often be very difficult to visualize. There are some tools to
10:48 help this. For example, when I'm building my AI agents with Langraph, I
10:52 have the Lang graph studio. So I can see for my multi- aent workflows, for
10:56 example, here are the different agents that I have. Here's my guard rail.
11:00 Here's my fallback. And I can see what my workflow looks like even as I execute
11:05 it. And you have tools like Langfuse for tracing. So you can get a lot of
11:10 visibility and sort of a visualization into what is going on, but it's never
11:15 going to be as much of that canvas like we have with N8N. So definitely there is
11:20 the advantage to no code tools there. But now we get into the pros of code.
11:24 And this is where I think you'll really start to see why people will start with
11:30 N8N but then move to Python for a lot of things. As much as both are fantastic
11:35 because Python is where you have full control and customizability.
11:39 There are limitations you'll hit with no code tools where there's just nothing
11:43 you can do because when you have the code, that's when basically every
11:48 possibility is open to you. Just to give one really quick example here in N.
11:54 There isn't actually the idea of parallel execution. You can set up your
11:59 workflow in a way where it will run two different things, but these will end up
12:03 running simultaneously. Even though the workflow builder kind of makes it look
12:08 like they're going to run in parallel, but in code, you can truly run things in
12:14 parallel. For example, one of the AI agents that I build in the AI agent
12:19 mastery course in Dynamis is this research agent that runs multiple
12:23 research agents in parallel. So, for example, I can say I want to build an AI
12:29 pet startup. And so, this AI agent helps me with competitor research. It helps me
12:34 analyze SEO and marketing. Take a look at this. And it kicks off all of these
12:38 specialized research agents at exactly the same time to help me with my
12:44 request. And you can't do this in NAND. It's just not possible. But with Python
12:48 and any programming language, we're able to do parallel execution. So, not only
12:52 is it faster because the language itself is faster than no code tool, but also
12:56 we're able to do things like parallel execution. Also, token streaming like
13:00 you're seeing right here is another thing we can't do in N8N. So, just
13:03 showing you a really good example of a couple of random things. You'll see this
13:08 quite a bit where we have a better user experience, a better speed thanks to
13:12 everything being in code. And going back, we got the better performance kind
13:16 of like I've already covered. Also, access to top open-source AI tools and
13:20 libraries. All these things that I've covered on my channel like graffiti for
13:25 knowledge graphs, dockling for rag. We have crawl for AI for crawling websites.
13:30 You can integrate these things with NN and I've shown some of that with like
13:33 crawl for AI and graffiti for example, but it's a lot more difficult. It's not
13:37 as simple as installing a Python package, setting up your environment
13:40 variable, and then boom, you're good to go. And then the big thing that I
13:44 mentioned a couple of times already is being able to use AI coding assistance
13:49 because they are getting so powerful, especially tools like Codeex and Claude
13:54 Code. Right now, you can build things so quickly that part of the advantage of
13:59 N8N being easier to build things. That's starting to diminish just thanks to AI
14:04 coding assistance. Also, code is always going to scale better even though Q mode
14:09 is really nice for N8N. We can also run our agents locally. So, everything can
14:14 be open source with Python assuming you're using the right tools. But then
14:18 also there's no license concerns also assuming you are using the right tools.
14:21 And then of course we've got version control with Git. So it's just a lot
14:25 easier to manage our different environments, having backups and being
14:29 able to revert to different versions of our code, the kinds of things that it's
14:34 just not as realistic with our no code tools. So there you go. That was a lot
14:39 of detail on the pros and cons of both, but I wanted to be very specific for you
14:44 so that you can take what I said here. Think for yourself how it applies to
14:48 your own use cases. Make the decision for you. And the last thing that I'll
14:54 leave you with to consider is the hybrid approach. You don't have to just pick
15:00 N8N or just pick Python. You can for example use N8N for the orchestration
15:04 all of the entry points and integrations for your applications but then offload
15:09 the heavy processing like your agents chunking for rag the data set handling
15:13 for those larger files you can give that all to external Python microservices and
15:18 even deploy both of the things together Python and N8N on the same instance in
15:22 the cloud and I've even shown that on my channel before like with my graffiti MCP
15:27 server video for example because then you can take advantage of the pros and
15:31 cons of both platforms, using them together, relying on their strengths.
15:36 So, I hope this video has been very helpful for you to help you make that
15:40 allimportant decision that will apply no matter what you are building. And of
15:43 course, let me know in the comments if you agree with what I'm covering here or
15:47 if you think there are some nuances that I should be covering or anything that
15:51 I've missed. And with that, if you appreciated this video and you're
15:54 looking forward to more things on AI agents, I would really appreciate a like
15:57 and a subscribe. And with that, I will
$

Should I Build My AI Agents with n8n or Python?

@ColeMedin 15:59 8 chapters
[AI agents and automation][developer tools and coding]
// chapters
// description

Should I build my AI agents with n8n (no code) or Python (code)? This is one of the most common questions I get, and for good reason! So in this video, I break down the pros and cons of n8n and Python, and more generally building AI agents with no code tools and code. There is definitely a time and place for both, and an opportunity to use them together! ~~~~~~~~~~~~~~~~~~~~~ - If you want to learn how to build AI agents with either n8n or Python, I cover both extensively in the Dynamous AI

now: 0:00
// tags
[AI agents and automation][developer tools and coding]