← Back to Library

i converted all my n8n agents to real code and it was stupid easy

{"content"> "Chase H has a confession that might surprise AI developers: converting those messy n8n workflows you've built into proper Python applications is surprisingly simple — and the benefits are substantial. In a practical demonstration, he walked through taking a RAG AI agent powered by LightRag and transforming it from a JSON file into a full-stack web app using Claude Code. The results? Faster performance, lower costs, and more control over your infrastructure.

Why Move Away From n8n

The core argument isn't about abandoning visual automation tools — it's about knowing when real code makes sense. Three factors drove this conversion: performance, cost, and control.

First, performance. When the RAG agent lives inside n8n, it must make a trip to wherever your LightRag server is hosted, figure out the answer, and bring it back. That's latency added with every query. Second, cost. Running both n8n and LightRag separately means managing two different servers, two sets of costs, and ensuring they communicate. Compare that to a single Python application where everything lives in one place — lower cost, higher performance. Third, control. Working inside n8n means being constrained by the platform's tools and its terms of service. Building a SaaS application where you want to monetize? You'll feel those constraints. Writing your own Python code means owning it all.

The Conversion Process

Here's what surprised Chase about how easy this actually is. You don't need to manually rewrite anything. Instead, you drop your n8n automation JSON file into a Claude Code project folder, enter Plan Mode, and tell Claude what you want to build. The system reads the JSON structure and essentially rewrites it in Python.

For well-created JSON files with clear documentation, this process goes smoothly. You explain how the automation works, ask for modifications, and let Claude Code generate all the code. The main roadblock you'll face is authentication — particularly Google Cloud setup, which can be tedious but follows the same patterns as n8n. Once you've done it once in Python, you can reuse those credentials.

The result is a full web application with a front end, proper Python architecture, and the ability to deploy on platforms like Railway. Testing the converted RAG agent showed it citing sources while answering questions — just like the original workflow, but now running as actual code.

When n8n Still Makes Sense

This isn't a dismissal of visual automation tools. n8n still has a crucial place in your AI stack for three reasons:

First, prototyping and MVP development. The visual nature helps you figure out how data flows through a system — something that's hard to grasp when you're just writing code.

Second, non-technical teams. If you're working with clients or colleagues who aren't technical, the visual interface makes communication easier than trying to explain Python architecture.

Third, speed and customization. Once you've got the hang of n8n, you can build and tweak things quickly without the back-and-forth of prompting an AI assistant to make sure it understood what you meant.

Critics might note that moving everything to code assumes you have the technical skills to maintain it — a fair point for less experienced developers who may benefit more from staying inside visual automation tools until those skills develop.

"Why are we even inside of n8n if we're just scaffolding a bunch of code notes together?"

The real insight isn't that conversion is easy — it's knowing when to convert. If you're building something simple with a non-technical team, or prototyping to feel out what you want to build, stick with the visual tools. But once you're ready to ship a production application where performance matters and you need full control over your infrastructure, that's when making the leap to real code pays off.

Bottom Line

Chase's strongest argument is practical: moving from n8n workflows to Python isn't about abandoning what works — it's about understanding that visual tools are great for prototyping, but real applications require real code. The vulnerability? This assumes you have the technical capacity to maintain Python code, which is a genuine barrier for many teams. The transition isn't scary, though — you've already done the hard work inside n8n. Now it's just about translating that into something more powerful."}

NADN has been one of the most powerful noode tools on the market for some time now. But today, as platforms like Claude Code, Codeex, and anti-gravity become both more powerful and more userfriendly, one of the skills you need to master is taking your NADN automations, agents, and workflows and being able to convert them into proper applications when called for. Now this is something we have touched on in previous videos where we have taken any automations and used cloud code to essentially build a wrapper around them. We've given them a front end, a backend, databases, the works.

But at its core, it was still an NAN JSON file essentially powering all the logic. But in today's video, we're taking it a step further. We aren't creating a wrapper this time because instead we're going to be taking an NAND JSON file and turning it into a proper Python app. And for today's demo, we are going to be converting one of my favorite NAND workflows.

It's a Rag AI agent powered by LightRag. But this video isn't about any one-off project. What this video is really about is giving you a framework to convert any NAND automation you want while also having a nuance discussion about when this sort of conversion when this transformation from NAN to real code actually makes sense and when it doesn't and what the pros and cons really are. So with that let's get to it.

So let's take a look at the AI agent we are going to be converting today. This is a RAG AI agent. Rag stands for retrieval augmented generation and essentially that means our AI agent is hooked up to a vector database in this case a graph rag system using light rag which allows it to take on a bunch of documentation and then answer questions about it right that's essentially all that means and there's three parts to this AI agent you have the AI agent system right here which allows you to actually query and ask questions second you have a data pipeline so we need some way to actually ingest docu douments into the system. Right?

If I want to ask this AI agent questions about meeting notes, well, how do I get the meeting notes into the vector database? That's what this does. And then third, we need some sort of ...