Skip to main content

Introduction to LangGraph

Speaker: Colin McNamara Company: Always Cool Brands / Always Cool AI (Co-founder) Date: November 5, 2025

Overview

Colin McNamara delivered an introduction to LangGraph using community training materials provided by the LangChain team. This talk focused on how LangGraph balances agent autonomy with developer control for production systems, particularly in compliance-heavy environments.

Key Concepts

What is LangGraph?

LangGraph is a framework that balances agent control with agency:

  • Allows both deterministic workflows (chains) and flexible agent behavior (for loops)
  • Built on bulk synchronous parallel architecture (similar to Pregel/Facebook's graph processing)
  • Enables controllability through graph structures: nodes, edges, and state

The Control Flow Spectrum

Chains (Synchronous Execution):

Start → Step 1 → Step 2 → Step 3 → End
  • Developer-defined sequence
  • Predictable, repeatable
  • Limited flexibility

Agents (LLM-Controlled):

Start → Step 1 ⟲ → Step 2 ⟲ → End
  • LLM decides control flow
  • Flexible, adaptive
  • Non-deterministic

LangGraph (Hybrid):

Graph of nodes and edges with:
- Developer-defined structure
- LLM-controlled routing
- State management
- Human-in-the-loop breakpoints

Core Features

1. Controllability

Graph Structure:

  • Nodes = Steps in your workflow (functions)
  • Edges = Paths between steps
  • State = Shared memory across the graph

You can make graphs as flexible or rigid as needed:

  • Fully static (FDA compliance)
  • Partially dynamic (some agent decisions)
  • Fully dynamic (React agent behavior)

2. Persistence

State can be stored in:

  • Postgres - Enterprise production
  • Redis - Fast caching layer
  • File systems - Development/testing
  • LangSmith Cloud - Managed service

Benefits:

  • Survive process crashes
  • Support long-running workflows (hours, days)
  • Enable human-in-the-loop that waits for responses
  • Time travel debugging

3. Human-in-the-Loop

Built-in breakpoint support:

# Pseudo-code example
graph.add_node("process", process_func)
graph.add_node("approve", human_review)
graph.add_edge("process", "approve")

Integration options:

  • Email notifications
  • Slack messages
  • Discord webhooks
  • Console prompts
  • Custom webhooks

Use cases:

  • Financial approval workflows
  • Safety-critical decisions
  • Compliance verification
  • Quality control checkpoints

4. Streaming

  • Real-time token streaming
  • Event streaming for each step
  • Progress monitoring
  • User feedback during execution

5. Fault Tolerance

  • Checkpoint-based recovery
  • Failed nodes can be respawned
  • State persists across failures
  • Replay capabilities for debugging

Production Use Cases (Always Cool Brands)

Colin runs 5 LangGraph applications in production:

1. FDA Label Verification

  • Criticality: Life safety
  • Why LangGraph: Deterministic workflow required
  • Features: Audit trails, repeatable steps, state logging

2. Nutrition Facts Calculation

  • Criticality: Legal compliance
  • Why LangGraph: Must execute every step, every time
  • Features: Validation at each stage

3. Allergen Checking

  • Criticality: Life safety
  • Why LangGraph: Can't miss any allergen
  • Features: Structured checking, verification

4. Religious Context Validation (Halal/Kosher)

  • Criticality: Religious compliance
  • Why LangGraph: Consistent rule application
  • Features: Rule-based workflows

5. ERP Image Processing

  • Criticality: Financial accuracy
  • Why LangGraph: Multiple image engines, human verification
  • Integration: Pytesseract, Cloud Image API, Google OCR
  • Features: Human-in-the-loop for invoice approval

"People can die if you screw up, right? And I'm legally liable as an officer in the company... I want to make sure that it does every step every time and I want to make sure that's logged."

When to Use LangGraph vs React Agents

Use LangGraph When:

Compliance requirements

  • FDA regulations
  • Financial regulations
  • Safety-critical systems

Repeatability needed

  • Must execute same steps every time
  • Audit trail required
  • Deterministic behavior

Cost efficiency matters

  • Control token usage
  • Prevent unnecessary LLM calls
  • Optimize execution path

Complex state management

  • Long-running processes
  • Multiple decision points
  • Human approvals needed

Use React Agents When:

Flexibility more important than reliability

  • Exploratory tasks
  • Research and discovery
  • Creative problem solving

Simple tool use

  • Calculator, web search
  • Single tool, single call
  • No state persistence needed

Architecture Benefits

Bulk Synchronous Parallel (BSP)

LangGraph implements BSP architecture:

  • Same approach Facebook uses for graph processing
  • Processes 4 billion Facebook accounts on 39 commodity servers in ~4 hours
  • Enables massive scale
  • Parallel processing capabilities

Subgraphs

Composable agent graphs:

Main Graph
├── Subgraph A (reusable)
├── Subgraph B (reusable)
└── Subgraph C (reusable)

Two patterns:

  1. Microservices: Deploy each graph behind FastAPI, register with A2A
  2. Nested graphs: Compose graphs within graphs

MapReduce Support

Split complex jobs into parallel tasks:

Input → [Map: Split] → [Process A, Process B, Process C] → [Reduce: Combine] → Output

Integration & Observability

LangSmith Integration

Two lines of configuration:

# .env file
LANGSMITH_API_KEY=your_key
LANGSMITH_PROJECT=your_project

Benefits:

  • Automatic trace logging
  • Step-by-step debugging
  • Performance metrics
  • Cost tracking

OpenTelemetry Support

Export to your own observability stack:

  • Splunk
  • Datadog
  • New Relic
  • Custom Otel collectors

Advanced Features

Branching & Parallel Execution

Conditional branching:

Start → Decision
├─→ Path A → End
└─→ Path B → End

Parallel execution:

Start → Split
├─→ Task A ─┐
├─→ Task B ─┤→ Merge → End
└─→ Task C ─┘

Middleware

Intercept and modify execution:

  • Pre-processing hooks
  • Post-processing hooks
  • Logging
  • Validation
  • Error handling

Time Travel Debugging

Navigate through execution history:

Step 1 → Step 2 → Step 3 → Step 4
↑ ↓
└──── Go back, inspect state

Development Tools

Colin's preference: Claude Code

  • Not visual, but effective
  • Good for iterative development

LangChain's tool: Visual Agent Builder

  • Recently released
  • Drag-and-drop interface
  • Good for beginners

Other options:

  • LangFlow - Visual workflow builder
  • N8N - Workflow automation with MCP support

Resources

Official Resources

Community Resources

  • Community training materials from LangChain team
  • AIMUG labs and examples
  • AIMUG GitHub

Statistics

  • 15M monthly downloads
  • 100K production applications
  • ~3,000 open source contributors

Key Takeaways

  1. Controllability - Define workflows as flexible or rigid as needed
  2. Persistence - State management solves real problems (crashes, long-running processes)
  3. Human-in-the-loop - Native support for approval workflows
  4. Production-ready - Used by 100K apps, proven at scale
  5. Observability - Easy integration with LangSmith and OpenTelemetry
  6. Choice - Works with or without LangChain, integrates with any framework

Q&A Highlights

Q: Is there a visual interface for building graphs? A: LangChain just released a visual agent builder. I personally use Claude Code, which is code-based but very effective for iteration.

Q: How does human-in-the-loop handle timeouts? A: The state persists in your database. If you're running on Cloud Run or Lambda, the process can die and restart when the human responds hours or days later. The graph pulls its state back from the database and continues.

Next Steps

  1. Try LangChain Academy - Start with quickstart courses
  2. Explore examples - Check AIMUG GitHub for production patterns
  3. Join office hours - Tuesdays at 5pm for Q&A
  4. Build something - Best way to learn is by doing

Want to dive deeper? Watch the full talk: YouTube Recording