Skip to main content

LangGraph - Orchestration Framework

LangGraph is an open-source orchestration framework designed for building stateful, multi-actor AI applications.

It represents an application as a graph. Each graph has nodes, edges, and state. This makes it easier to build workflows where multiple actors collaborate, route tasks, call tools, pause for approvals, and continue from saved state.

How LangGraph Works

LangGraph workflows are built from a few core concepts.

State

State is the information passed through the workflow.

For chat-based agents, state usually contains messages. A worker reads the current messages, performs a step, and appends a new message.

Nodes

Nodes are the actors or execution steps in the workflow.

Examples:

  • Router node
  • Billing worker node
  • Technical worker node
  • Tool node
  • Escalation approval node

Edges

Edges define where the workflow goes next.

Examples:

  • Start with router
  • Route billing requests to billing worker
  • Route technical requests to technical worker
  • Stop when a final answer is ready

Conditional Routing

Conditional routing lets the workflow choose the next node dynamically.

For example, the router can classify the user request and send it to the correct specialist.

Tool Loops

A worker can call a tool, receive the tool result, and continue reasoning until it has enough information to answer.

This pattern is useful for:

  • Searching knowledge bases
  • Checking account data
  • Creating support tickets
  • Running diagnostics

Checkpointing

Checkpointing stores workflow state so execution can be inspected or resumed.

This is important for long-running workflows and human approval flows.

Interrupt and Resume

Interrupt and resume lets a workflow pause for a human decision.

For example:

  1. Agent detects refund amount is above a threshold
  2. Workflow pauses and returns an approval request
  3. Human approves or declines
  4. Workflow resumes from the same state

How This Maps to Agents SDK

The CAIP Agents SDK and LangGraph work together with clear responsibilities.

The SDK takes care of the platform integration layer:

  • Creating a LangGraph-backed agent client
  • Loading agent configuration from CAIP
  • Connecting to the CAIP-configured LLM
  • Registering tools through the same SDK patterns
  • Persisting messages and thread context through the Agents API

LangGraph takes care of the workflow orchestration layer:

  • Defining the graph structure
  • Moving execution between nodes
  • Managing state across workflow steps
  • Supporting routing, tool loops, checkpoints, and resume flows

Together, they let you build stateful multi-agent workflows while keeping the standard CAIP agent lifecycle for configuration, execution, and conversation history.

Next, use Build a Multi-Agent Workflow to see how these concepts come together in a practical router and specialist-worker example.