Agent Architecture/System Design
★ OverviewIntermediate12 min

Designing Agent Workflows

How to map business processes onto LangGraph workflows: identifying nodes, edges, state, and human checkpoints.

Quick Reference

  • Map each distinct step in your business process to a graph node — keep nodes single-responsibility
  • Use conditional edges for decision points and normal edges for deterministic flow
  • Define your state schema upfront: what data flows between nodes, what persists, what is ephemeral
  • Place human-in-the-loop interrupts before irreversible actions (sending emails, updating databases, charging cards)
  • Use subgraphs for reusable workflow components — e.g., an 'approval' subgraph used across multiple workflows

From Flowchart to Graph

SimpleComplexityComplexDeterministicAutonomousPromptChainingSequential stepsRoutingClassify & dispatchParallel-izationFan-out / fan-inOrchestratorCentral coordinatorAutonomousAgentSelf-directed loopsAgent Workflow Patterns

Choose the least complex pattern that solves your problem

Every LangGraph agent is a directed graph. The design process starts with a flowchart of your business process, then maps each element to a LangGraph concept:

Flowchart elementLangGraph conceptExample
Process stepNode (function)classify_intent, search_docs, generate_response
Decision diamondConditional edgeif intent == 'billing' → billing_node
Sequential arrowNormal edgeclassify → route → handle
Data passed between stepsState (TypedDict)messages, intent, order_id, draft_response
Human approval gateinterrupt_before / interrupt_afterPause before process_refund
Parallel branchesSend API / fan-outSearch docs AND check inventory simultaneously