Glossary
What is LangGraph?
LangGraph is an open-source framework, built on top of LangChain, for orchestrating stateful, multi-step LLM agents as directed graphs of nodes (steps) and edges (transitions). It is particularly useful when an agent needs branching logic, persistent state across turns, sub-agents, or conditional control flow — the cases where a simple "prompt the LLM in a loop" pattern breaks down.
How LangGraph models agents
A LangGraph agent is a graph: nodes are functions (each typically wrapping an LLM call or a tool call), and edges define which node runs next based on the agent’s current state. State is explicit — you define a TypedDict or Pydantic model for the agent’s working memory, and each node reads and writes to it.
This explicit-state-machine model makes complex agent behavior tractable. A legal intake agent, for example, might have nodes for "ask matter type", "ask jurisdiction", "ask conflict", "schedule consult" — and edges that route based on what the caller said. Compared to writing the same logic as one giant prompt, the graph model is easier to debug, test, and modify.
When to use LangGraph (and when not to)
LangGraph shines when agent behavior has clear branching logic, when you need to inspect or modify state mid-run, when multiple sub-agents need to coordinate, or when the agent needs to backtrack and try a different path. It is overkill for simple "answer a question" or "summarize this document" agents — those are fine with a single LLM call.
In voice agents specifically, LangGraph is useful for managing the qualification flow — the part where the agent decides what to ask next based on what it has already learned about the caller. The voice infrastructure (LiveKit) handles the audio loop; LangGraph handles the conversation logic on top.
LangGraph in the Hodos360 stack
The Hodos360 voice agent uses LangGraph to manage practice-area-aware qualification flows. Each practice area (immigration, PI, WC, family, criminal) has its own subgraph with the right qualification questions. A router node at the top of the graph picks the subgraph based on the caller’s initial response. State persists across the call so the agent doesn’t re-ask known information.