★ 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
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 element | LangGraph concept | Example |
|---|---|---|
| Process step | Node (function) | classify_intent, search_docs, generate_response |
| Decision diamond | Conditional edge | if intent == 'billing' → billing_node |
| Sequential arrow | Normal edge | classify → route → handle |
| Data passed between steps | State (TypedDict) | messages, intent, order_id, draft_response |
| Human approval gate | interrupt_before / interrupt_after | Pause before process_refund |
| Parallel branches | Send API / fan-out | Search docs AND check inventory simultaneously |