Why Do We Need LangGraph?

Let’s assume we don’t know anything about:

We just know how to call an LLM.


Step 1: What People Normally Do

Most beginners build AI systems like this:

async function runAgent() {
  const plan = await planner()
  const data = await fetchData(plan)
  const result = await analyze(data)
  return result
}

Or they use a while loop for agents.

Everything runs inside one function.

When it finishes → done.

If it crashes → everything is lost.


What Problems Appear?

1️⃣ If system crashes in middle

Suppose: