Back to all articles

6 November 2026 - 5 min

Codex, LangGraph or n8n: which one should you actually learn?

Three frameworks, three different jobs. What our instructor Isabella Bicalho teaches about choosing between Codex, LangGraph and n8n, plus the four components every agent needs.

Maya Tazi

Artificial Intelligence

In short. These three tools get compared as if they were competitors. They aren't. Codex is for building code, LangGraph is for orchestrating decisions, n8n is for automating processes. Choosing between them isn't a matter of preference: it's a description of what you're trying to build.

Why the comparison keeps going wrong

Search for any two of these together and you'll find posts ranking them, as if one is objectively better.

That framing comes from tool-review content, where everything has to have a winner. It doesn't survive contact with real projects. In our First Class on building AI agents, Isabella Bicalho put it plainly: the framework follows from the project requirements, not the other way round.

So here is the honest version: what each one is for, and the signals that tell you which one you're looking at.

Codex: when the agent's job is to write code

Codex sits inside your development environment. You install it in Visual Studio Code, and it works on your codebase: reading files, writing code, running things, iterating on what it produced.

Choose it when the output you want is code. Building a feature, refactoring something ugly, writing tests, understanding an unfamiliar repository.

Don't choose it when the task isn't about code at all. Using a coding assistant to schedule a weekly report is possible and pointless.

What it assumes about you. You're comfortable in a code editor and you can read what it produces well enough to catch mistakes. That last part matters more than people admit. An agent that writes code you can't evaluate is a liability, not a productivity gain.

LangGraph: when the agent has to make decisions

LangGraph is a framework for building workflows where the path isn't fixed. You define states and the transitions between them, and the agent decides which way to go based on what it finds.

Choose it when the flow branches. "If the document is a contract, do this; if it's an invoice, do that; if it's neither, escalate." Or when you need multiple agents handing work to each other: one researching, one drafting, one reviewing, with the reviewer able to send it back.

Don't choose it when the sequence is fixed and known. If step one always leads to step two, you're paying for flexibility you don't need with extra complexity.

What it assumes about you. Python (or JavaScript/TypeScript), and comfort with the idea of a state machine. This is the most technical of the three and the one with the highest ceiling.

n8n: when you're connecting things that already exist

What is n8n? It's low-code automation. You build workflows visually by connecting nodes: a trigger, some data sources, a model call, a destination. It can be self-hosted, which matters when your data can't go to a third party.

Choose it when the work is moving information between tools on a schedule or after an event. Most business automation is exactly this, which is why n8n covers more real use cases than its reputation suggests.

Don't choose it when the logic is genuinely complex and branching. You can build it, but you'll be fighting the interface.

What it assumes about you. Almost nothing technical. This is where to start if you've never built an agent.

The four components every AI agent needs

Underneath the framework choice sits a structure that doesn't change. Isabella's session breaks it into four parts, and understanding them transfers between all three tools.

MCP (Model Context Protocol). This is how an agent reaches things outside itself: your files, an API, a database, another piece of software. Without it, the model can only talk. MCP is what turns talking into doing, and it has become the standard way of connecting agents to tools.

Skills. Reusable, step-by-step instructions the agent can call on. Instead of re-explaining your process in every prompt, you write it once and the agent applies it consistently. The underrated benefit is collaboration: a skill is something a team shares, so two people's agents behave the same way.

Harnesses. The scaffolding around the model that manages the loop: what gets sent, what comes back, when to stop. You mostly don't build this yourself; you choose one when you choose your framework. Knowing it exists explains why the same model behaves differently in different tools.

Sub-agents. Specialised assistants handling one part of a larger job. A narrow agent with three tools is more reliable than a general one with thirty, so splitting work is a reliability strategy, not just an organisational one.

So which should you learn first?

If you've never built an agent: n8n. You'll have something running today, and you'll learn what actually breaks in production, which is the knowledge that transfers.

If you already write code and want agents in your workflow: Codex. The setup takes minutes and the payoff is immediate.

If you're aiming at this as a job: all three, in that order. The people getting hired to build agent systems are the ones who can look at a problem and say why it's an n8n job rather than a LangGraph one. That judgement only comes from having built in both.

Where to see it done

Isabella walked through the full comparison and set up Codex live in VS Code during our free First Class on building AI agents. The session is available on demand, including the framework decision tree and the Codex installation, step by step.

Watch the First Class on demand.

Frequently asked questions

Is n8n an AI agent framework?

It's a low-code automation platform that can build agents. For scheduled, rule-based workflows it's often a better choice than a code framework.

Do I need Python for LangGraph?

Python is the most common choice, and there is also an official JavaScript/TypeScript version. Either way, it's the most technical of the three and assumes comfort with code and state-based logic.

What is MCP in simple terms?

The standard way of connecting an AI agent to external tools and data, so it can act rather than only respond.

Can I use more than one?

Frequently, yes. Codex to build the components, n8n to run the scheduled workflow around them.

Related Articles

Ready to join?

More than 10,000 career changers and entrepreneurs launched their careers in the tech industry with Ironhack's bootcamps. Start your new career journey, and join the tech revolution!