LANGGRAPH
LangGraph graph-based agentic workflows 2024.
Definition
LangGraph key concepts: (1) StateGraph: main graph builder, define states (TypedDict Python or Pydantic models), add nodes (functions taking state -> new state), add edges (transitions between nodes), can be conditional (decide next node based on state). (2) Nodes: Python functions or LLM calls (ChatOpenAI, ChatAnthropic, etc.), transform state. (3) Edges: (a) Static edges add_edge(source, target), (b) Conditional edges add_conditional_edges(source, condition_function, mapping), enable cycles + dynamic routing. (4) Entry + End points: set_entry_point, set_finish_point. (5) Compile: graph.compile() returns Runnable executor. (6) Persistence: checkpointer SQLite + Redis + Postgres, save state across invocations, enable resume + Human-in-the-Loop interruption. (7) Multi-agent: Supervisor pattern (one agent orchestrates sub-agents), Sequential pattern, Hierarchical pattern. (8) Streaming: stream events + tokens via Runnable streaming API. Integration: LangSmith automatic tracing all nodes + transitions, debugging easy. LangGraph Cloud 2024: SaaS managed deployment LangGraph workflows, Postgres backend, integrated observability, API access via REST. Use cases: complex multi-step agents, multi-agent collaboration, conversational flows with state, Human-in-the-Loop approval workflows.
Origin
LangGraph initial release January 2024 by LangChain Inc. ; ~10000+ GitHub stars 2024 ; LangGraph Cloud SaaS launched mid-2024.
Example in context
Customer support multi-agent system: LangGraph supervisor agent receives user query + decides which sub-agent to invoke (Sales Specialist, Technical Support Specialist, Billing Specialist), each sub-agent has own tools + state, supervisor synthesizes responses + may invoke multiple sub-agents iteratively until query resolved ; LangGraph Cloud hosts production deployment.
Related terms
- LangChain Agents — predecessor pattern.