Skip to content
Nitmonk
Agent Brain Deep-Dive

Section 3 · Planning Graphs Instead of Prompts

Stateful graphs that plan, decide and act.

Section 3 · Planning Graphs Instead of Prompts — infographic explaining Stateful graphs that plan, decide and act.
Section 3 · Planning Graphs Instead of Prompts — visual explainer by Nitmonk.

Enterprise agents are not one-shot prompts — they are stateful graphs that plan, decide and act. This explains planning graphs instead of prompts: replace 'prompt → answer' with 'state → decision → action → new state'.

In simple terms

Model agents as stateful graphs of nodes and edges, not single prompts.

How it works

  1. 1A planning graph has a planner node that understands the goal.
  2. 2Conditional edges route to tool calls, retrieval or human approval based on state.
  3. 3Nodes do work; edges are transitions (simple, conditional, loop or interrupt).
  4. 4State is updated after each step, and the graph loops until done.
  5. 5Example (research agent): plan → search → read/extract → summarise → cite → validate → end.

Key points

  • Graphs give explicit control over flow, branching and loops.
  • They support memory, retries, fallbacks and human-in-the-loop.
  • LangGraph provides StateGraph, conditional edges, checkpointers and streaming.
  • From linear prompts to dynamic graphs = from basic assistants to reliable agents.

Why it matters

Real workflows have branches, loops and approvals that a single prompt can't express. Planning graphs make agents controllable, observable and reliable.

Frequently asked questions

Why graphs instead of prompts?
Graphs handle branching, loops, retries and human approval explicitly, which single prompts can't.
What are the core building blocks?
Nodes (do work), edges (transitions), state, conditional edges, loops and interrupts.