Why I pick LangChain over LangGraph for multi-stage agents
A pipeline with many stages is not a graph problem. What decides it is how many decisions the agent makes, and how much state has to survive between them.
The agent I run at 6 Sigma Code answers questions about Kuwaiti law. Each question goes through several stages: a pre-filter, BM25 and vector search, rank fusion, an answer, and a second call that pulls out verbatim citations. That is a lot of stages, and the usual advice for “multi-stage agents” is to reach for a graph framework.
I used LangChain. Here is the rule I used to decide.
Stages are not decisions
A graph earns its place when the system has to decide what happens next. My law agent has exactly one decision point per turn: given the question and what retrieval returned, answer. Everything before it runs in a fixed order, and everything after it does too. Fixed order is a pipeline, and a pipeline is a function call after a function call.
When I did pick LangGraph
InterVox, my voice mock-interview system, is the opposite case. It runs five agents under one supervisor: planner, interviewer, router, evaluator and report. The router decides what happens after every answer, the interview has to keep its state across turns, and the path branches depending on what the candidate says. That is what a graph is for, so that is where I used one.
The three questions
Before adding a graph framework, I ask:
- How many decision points does one turn have? One means a pipeline. Several, with different outcomes, means branching.
- Is there more than one role? Separate agents with separate jobs are easier to coordinate as nodes under a supervisor.
- Does state have to persist and change across turns? If the answer is no, you are paying for state machinery you will never read from.
The cost of getting it wrong
Reaching for LangGraph on the law agent would not have broken anything. It would have added nodes, edges and a state schema to maintain around a flow that never branches. The simpler tool does the same job with less to read, less to debug and less to explain to the next person who opens the code.
The point is not that one framework is better. It is that the tool should be sized to the problem, and the problem is measured in decisions and state, not in stages.