How graphs execute — the Pregel model
Overview
Throughout this chapter, you have learned how to construct graphs that execute sequentially, branch into parallel paths, merge results, repeat operations, dynamically distribute work using Send, and combine state updates with routing using Command.
All these capabilities depend on the same underlying execution engine: Pregel.
When you call graph.invoke(), LangGraph does more than traverse a collection of Python functions. It determines which nodes are eligible to execute, prepares their inputs, schedules their work, collects their state updates, and determines which nodes should execute subsequently.
Understanding this runtime helps answer important engineering questions:
- Why can two parallel nodes update different state fields safely?
- Why does updating the same field from parallel nodes sometimes raise an error?
- When does a state update become visible to another node?
- Why does a graph with twenty parallel workers consume fewer execution steps than a long sequential workflow?
- What happens when one worker fails during parallel execution?
- How does LangGraph determine where execution should resume?
These questions become increasingly important when building production agents involving LLM requests, external APIs, database operations, and human approval.
In this lesson, we examine the execution model rather than introduce another control-flow pattern.
Preparing your environment
Install a current LangGraph 1.x release:
pip install -U "langgraph>=1.2,<2"The examples use ordinary Python computations so that you can investigate runtime behavior without model credentials, network latency, or LLM response variability.
Note: The examples use the current documented LangGraph 1.x interfaces, including version 2 streaming. The APIs were checked against the official documentation, but the examples were not execution-tested in the authoring environment. Displayed output is illustrative.
Where the name comes from
Pregel takes its name from Google’s graph-processing system, described in the 2010 research paper Pregel: A System for Large-Scale Graph Processing.
Google developed Pregel to perform computations over enormous graphs, including networks containing billions of vertices and connections.
The name itself references the Pregel River associated with the famous Seven Bridges of Königsberg problem, which helped establish graph theory.
Google’s system was influenced by a parallel computing approach called Bulk Synchronous Parallel, commonly abbreviated as BSP.
Instead of allowing every computation to modify shared information whenever it chooses, BSP organizes computation into synchronized rounds.
During a round, independent computations perform their assigned work. Communication produced during that round becomes available for subsequent rounds.
These rounds are called super-steps.
Consider a simplified recommendation system that calculates the importance of interconnected web pages. Each page computes a new score using previously available information and communicates its result to connected pages. Those pages incorporate the information during the following round.
Repeated rounds gradually produce useful results.
LangGraph adapts this execution philosophy to application workflows. Its actors might retrieve documents, call language models, execute tools, validate outputs, or make routing decisions.
Although LangGraph borrows Pregel’s computational model, running a LangGraph application does not automatically create a distributed computing cluster.
The historical research is available in the original Google Pregel publication.
Channels and actors
Pregel organizes application execution around two fundamental abstractions: actors and channels.
Actors
An actor is an executable processing unit represented internally by a PregelNode.
An actor can:
- Subscribe to channels that trigger its execution.
- Read information from available channels.
- Perform a computation.
- Produce writes to one or more channels.
An actor can perform a simple calculation or coordinate a sophisticated operation involving an LLM.
Importantly, a channel that supplies information to an actor is not necessarily a channel that triggers that actor. The runtime distinguishes between reading data and subscribing to execution signals.
Channels
A channel is a runtime abstraction that manages information exchanged between processing units.
A channel defines the type of information it holds, the updates it accepts, and how incoming updates modify its current value.
Think of a channel as a managed state container rather than an ordinary Python variable.
When several actors produce writes, the channel determines how those writes are handled.
The following diagram illustrates actors communicating through channels.
The result channel must support the kinds of concurrent updates produced by both actors.
Common channel types
LangGraph provides several channel implementations with different update semantics.
| Channel | Behavior | Typical use |
|---|---|---|
LastValue |
Accepts one update per super-step and retains the stored value | Ordinary state fields |
BinaryOperatorAggregate |
Combines incoming updates with an existing value | Counters, accumulated results |
Topic |
Collects published values, optionally across steps | Multiple results and event collection |
EphemeralValue |
Holds temporary information that clears after a step without a new write | Transient signals and intermediate communication |
An ordinary StateGraph field generally uses LastValue semantics.
For example, a field declared as answer: str normally accepts a single update during each super-step.
If you declare a field as Annotated[list[str], operator.add], LangGraph creates reducer-based aggregation behavior. Several workers can then contribute individual lists, which are combined into an accumulated result.
The reducer is not simply a convenience for manipulating Python collections. It defines how concurrent writes become shared state.
From StateGraph to Pregel
When you compile a StateGraph, LangGraph translates your high-level graph definition into a runnable Pregel application.
Conceptually, the translation includes:
| StateGraph abstraction | Runtime representation |
|---|---|
| Node function | Executable actor |
| State field | Data channel |
| Reducer | Channel update behavior |
| Edge | Execution dependency and scheduling signals |
| Conditional edge | Dynamically selected execution signals |
START |
Input and entry scheduling |
END |
Termination of a routing path |
These are conceptual mappings. Compilation can introduce additional internal channels and control machinery that are not visible in your original state schema.
You generally do not need to create these components manually.
The LangGraph runtime documentation describes the relationship between the high-level APIs and Pregel.
The super-step cycle
A super-step is one logical round of scheduled graph execution.
Several nodes may execute during a single super-step, but their ordinary shared-state reads are based on information available before that round’s writes are applied.
Pregel divides each round into three phases.
Phase 1: Plan
The runtime identifies which actors should execute.
For the initial work, this selection originates from graph input and entry routing. For subsequent rounds, execution signals, channel updates, and pending tasks determine what becomes eligible.
Consider a workflow that starts with document preprocessing, then runs classification and information extraction.
The first application-level round schedules preprocessing.
Once preprocessing finishes and its outputs become available, the runtime schedules classification and extraction.
The planning phase determines eligible work. It does not execute the business logic itself.
Phase 2: Execute
The runtime runs the selected actors, using concurrency where appropriate.
Each ordinary graph node receives its prepared state input. It performs its computation and returns a partial state update.
Writes produced by one parallel node do not immediately become visible to another parallel node through shared graph state.
Suppose two nodes read a counter whose committed value is 10. Both nodes execute in the same super-step.
Even if the first node finishes quickly, the second node does not automatically see the first node’s returned update.
Both began their work using the previously available state.
This separation prevents execution timing from silently changing the meaning of ordinary graph-state reads.
A Send invocation is a notable input variation: its target receives the custom argument supplied by the Send, rather than necessarily receiving the complete shared-state snapshot.
Phase 3: Update
After the scheduled work completes successfully, the runtime applies the collected writes to their corresponding channels.
For each channel, its update behavior determines the resulting value.
A reducer-based channel may combine several contributions. A normal single-value channel rejects incompatible multiple writes.
The updated state and execution signals establish the conditions for the next planning phase.
This synchronization point is often called a barrier.
The following diagram illustrates the recurring runtime cycle.
This diagram represents normal successful execution. Interrupts, failures, timeouts, and recursion-limit errors can suspend or terminate execution before ordinary completion.
Walking through a document workflow
Imagine a graph containing four processing nodes:
prepare_documentcount_wordsclassify_documentgenerate_report
The first node prepares the document. The next two execute in parallel. The final node combines their outputs.
The execution schedule is conceptually:
| Super-step | Scheduled nodes | Newly available results |
|---|---|---|
| Input initialization | Runtime entry handling | Original document |
| 1 | prepare_document |
Prepared document |
| 2 | count_words, classify_document |
Count and classification |
| 3 | generate_report |
Final report |
| Completion | No remaining work | Final graph state |
Four application-node executions occur across three application-level processing rounds.
The two parallel workers share a super-step.
Internal step counters and checkpoint history may additionally include input initialization and runtime bookkeeping. Avoid assuming that the displayed numeric counter always starts at the first business node.
Tip: When designing a graph, reason about which state values must already exist before each node runs. Those dependencies are more important than the visual positioning of nodes in a graph diagram.
What this explains
The Pregel model provides a unified explanation for the control-flow features introduced throughout this chapter.
Sequential and parallel execution
Sequential nodes require separate execution rounds because downstream work depends on upstream outputs.
Parallel nodes can share a round because neither needs the other’s newly produced output.
Suppose three independent API requests take two, four, and six seconds respectively.
Sequential execution would require approximately twelve seconds. With sufficient concurrency, parallel execution could require approximately six seconds, plus runtime overhead.
The slowest scheduled operation determines the duration of that parallel round.
This is why parallelism improves latency but does not eliminate synchronization costs.
The runtime also supports concurrency limits through configuration such as max_concurrency. A large fan-out can therefore remain one logical super-step even when resource limits prevent every worker from running simultaneously.
Branching, merging, and dynamic fan-out
A branch determines which actors become eligible for subsequent execution.
A merge establishes dependencies that must be satisfied before downstream processing begins.
For an explicit fixed fan-in, use a multi-source edge:
builder.add_edge(["worker_a", "worker_b"], "merge")
This expresses that both named predecessors must complete before the merge runs.
Separate incoming edges do not universally provide the same synchronization guarantee, particularly when branches have different lengths.
With Send, the scheduler can create multiple invocations of the same worker dynamically. Each invocation receives its own supplied input, while returned updates can contribute to shared reducer-based state.
For example, processing a hundred document chunks may require only one worker super-step followed by an aggregation step, rather than a hundred sequential processing steps.
Large fan-outs still consume computational resources, API requests, and memory.
Why concurrent writes require reducers
Suppose two parallel nodes return updates to the same integer field.
Should the runtime choose the first value, the last value, their sum, or something else?
Without an explicitly defined merge rule, the intended result is ambiguous.
LangGraph rejects multiple writes to ordinary single-value state fields rather than silently selecting a winner.
The following runnable example demonstrates the problem.
from typing import TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.errors import InvalidUpdateError
class State(TypedDict):
total: int
def worker_a(state: State):
return {"total": 10}
def worker_b(state: State):
return {"total": 20}
builder = StateGraph(State)
builder.add_node("worker_a", worker_a)
builder.add_node("worker_b", worker_b)
builder.add_edge(START, "worker_a")
builder.add_edge(START, "worker_b")
builder.add_edge("worker_a", END)
builder.add_edge("worker_b", END)
graph = builder.compile()
try:
graph.invoke({"total": 0})
except InvalidUpdateError:
print("Concurrent updates require a reducer.")Expected output:
Concurrent updates require a reducer.The failure occurs because both nodes attempt to update the same LastValue-style field during one round.
If total were declared as Annotated[int, operator.add], the updates would instead be accumulated to produce 30.
When using an additive reducer, return the new contribution, not the existing accumulated value plus the contribution. Otherwise, previously stored information can be counted repeatedly.
For reliable parallel aggregation, prefer associative and, where appropriate, commutative merge operations. List concatenation is associative but order-sensitive, so sort results by an explicit identifier whenever stable ordering matters.
Cycles, Command, and recursion limits
Cycles occur when execution produces a signal that schedules an earlier node again.
Each iteration requires additional super-steps. LangGraph does not implement ordinary graph cycles by recursively calling Python functions.
Similarly, Command(update=..., goto=...) supplies state updates and routing instructions that participate in the runtime’s scheduling process. It does not directly invoke the destination function like an ordinary Python call.
The destination normally executes in a subsequent round.
The graph terminates naturally when no executable work remains.
A graph that repeatedly schedules itself without a valid stopping condition continues until a limit or another termination mechanism intervenes.
In recent LangGraph 1.x releases, the default recursion limit is 10,007 super-steps. That default is too permissive for many production agents.
Set an application-specific limit:
graph.invoke(inputs, config={"recursion_limit": 25})
Exceeding the limit raises GraphRecursionError.
The limit controls execution rounds, not the number of parallel workers, tool calls, tokens, or elapsed seconds. Production agents therefore need separate resource and time budgets.
Checkpointing and failure recovery
Super-step boundaries provide useful synchronization points for persistence.
When a checkpointer is configured, LangGraph records graph state and execution progress, allowing a thread to be inspected or resumed.
If one worker fails while another succeeds, LangGraph can retain pending writes from successful tasks. With an appropriate checkpointer and subsequent resumption, those successful tasks need not be executed again.
This is more efficient than restarting the entire workflow.
However, a graph-state update boundary is not a distributed database transaction.
If a node sends an email, charges a customer, or modifies an external database before failing, LangGraph cannot automatically undo that external operation.
Use idempotency keys, transactional database operations, and explicit side-effect management.
Checkpoint durability is also configurable through durability="sync", "async", or "exit", depending on the required recovery guarantees and performance trade-offs.
Further details are covered in the checkpointer documentation.
Seeing it yourself
You can observe the execution model directly by combining state streaming with checkpoint inspection.
The following complete example implements a miniature parallel document-analysis workflow. Both workers read the accumulated total, contribute their own counts, and leave aggregation to the reducer.
import operator
import time
from typing import Annotated, TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver
class State(TypedDict):
documents: list[str]
total_words: Annotated[int, operator.add]
report: str
def worker_a(state: State):
print("Worker A reads:", state["total_words"])
time.sleep(0.2)
count = len(state["documents"][0].split())
return {"total_words": count}
def worker_b(state: State):
print("Worker B reads:", state["total_words"])
time.sleep(0.6)
count = len(state["documents"][1].split())
return {"total_words": count}
def generate_report(state: State):
print("Report reads:", state["total_words"])
return {
"report": f"Total words: {state['total_words']}"
}
builder = StateGraph(State)
builder.add_node("worker_a", worker_a)
builder.add_node("worker_b", worker_b)
builder.add_node("generate_report", generate_report)
builder.add_edge(START, "worker_a")
builder.add_edge(START, "worker_b")
builder.add_edge(
["worker_a", "worker_b"],
"generate_report",
)
builder.add_edge("generate_report", END)
graph = builder.compile(
checkpointer=InMemorySaver()
)
config = {
"configurable": {
"thread_id": "document-analysis-001"
},
"recursion_limit": 10,
"max_concurrency": 2,
}
inputs = {
"documents": [
"LangGraph enables parallel execution",
"Pregel coordinates graph execution efficiently",
],
"total_words": 0,
"report": "",
}
for chunk in graph.stream(
inputs,
config=config,
stream_mode=["updates", "values"],
version="v2",
):
print(chunk["type"], chunk["data"])
print("\nCheckpoint history:")
for snapshot in reversed(
list(graph.get_state_history(config))
):
print(
"Step:", snapshot.metadata.get("step"),
"Total:", snapshot.values.get("total_words"),
"Next:", snapshot.next,
)
final_state = graph.get_state(config)
assert final_state.values["total_words"] == 9
assert final_state.values["report"] == "Total words: 9"
assert final_state.next == ()
print("\nFinal report:")
print(final_state.values["report"])The important output, with other streaming and checkpoint details omitted, should resemble:
Worker A reads: 0
Worker B reads: 0
updates {'worker_a': {'total_words': 4}}
updates {'worker_b': {'total_words': 5}}
Report reads: 9
updates {'generate_report': {'report': 'Total words: 9'}}
Final report:
Total words: 9The order of worker logs is not guaranteed.
Interpreting the results
Notice that both workers read 0, even though Worker A finishes earlier than Worker B.
Worker A contributes four words. Worker B contributes five.
The reducer combines these contributions, making 9 available to the report node during the next processing round.
The stream can expose an individual worker’s completed update before the entire parallel round finishes. Receiving such an event does not mean sibling nodes can already observe that update.
This distinction matters when building live dashboards or progress indicators.
Choosing the right streaming mode
| Stream mode | Information exposed |
|---|---|
updates |
Individual node state updates |
values |
Full graph-state values at execution boundaries |
tasks |
Task lifecycle information, including failures |
checkpoints |
Persistence and checkpoint events |
debug |
Detailed execution and debugging information |
The tasks and checkpoints modes should be used with a configured checkpointer.
To investigate scheduling in greater detail, modify the example to use stream_mode=["tasks", "checkpoints"].
The checkpoint history is particularly useful because each snapshot’s next attribute identifies pending node executions at that boundary.
Find the snapshot containing both worker_a and worker_b in next. The subsequent completed state should contain their combined contribution and schedule generate_report.
Refer to the streaming documentation for the current event formats.
Inspecting compiled runtime components
The compiled graph also exposes its actor and channel mappings.
Add these statements to the preceding example:
print("\nRuntime actors:")
for name, actor in graph.nodes.items():
print(name, type(actor).__name__)
print("\nRuntime channels:")
for name, channel in graph.channels.items():
print(name, type(channel).__name__)You should find PregelNode actors corresponding to your application nodes, alongside internal runtime components.
The total_words field should use BinaryOperatorAggregate, while ordinary fields such as report use LastValue.
Internal channel names may change between releases. Inspect them for learning and debugging, but avoid making business logic depend on their implementation-specific names.
Using Pregel directly
Most developers should continue using StateGraph or the Functional API.
Nevertheless, constructing a Pregel application directly reveals what the higher-level APIs automate.
The public low-level interface includes Pregel and NodeBuilder, both available from langgraph.pregel.
Building a channel-based application
The following standalone example creates two actors that independently calculate information about a document.
Both subscribe to an input channel and contribute their outputs to a shared Topic channel.
A third actor subscribes to that topic and creates the report.
from langgraph.channels import LastValue, Topic
from langgraph.pregel import Pregel, NodeBuilder
def count_words(document: str) -> str:
count = len(document.split())
return f"Words: {count}"
def count_characters(document: str) -> str:
count = len(document)
return f"Characters: {count}"
def merge_results(results: list[str]) -> str:
return " | ".join(sorted(results))
word_actor = (
NodeBuilder()
.subscribe_only("document")
.do(count_words)
.write_to("results")
)
character_actor = (
NodeBuilder()
.subscribe_only("document")
.do(count_characters)
.write_to("results")
)
report_actor = (
NodeBuilder()
.subscribe_only("results")
.do(merge_results)
.write_to("report")
)
app = Pregel(
nodes={
"word_actor": word_actor,
"character_actor": character_actor,
"report_actor": report_actor,
},
channels={
"document": LastValue(str),
"results": Topic(str, accumulate=False),
"report": LastValue(str),
},
input_channels=["document"],
output_channels=["report"],
)
result = app.invoke(
{"document": "Agentic AI with LangGraph"},
config={"recursion_limit": 10},
)
print(result)
assert result == {
"report": "Characters: 25 | Words: 4"
}Expected output:
{'report': 'Characters: 25 | Words: 4'}Unlike the earlier examples, this application does not define a TypedDict state schema or explicitly declare graph edges.
The relationships emerge from channel subscriptions and writes.
Understanding NodeBuilder
The NodeBuilder interface provides methods for constructing actors.
| Method | Purpose |
|---|---|
subscribe_only() |
Subscribe to one channel and receive its value directly |
subscribe_to() |
Subscribe to channels and receive a mapping of channel values |
read_from() |
Read additional channels without subscribing to their updates |
do() |
Attach executable processing logic |
write_to() |
Specify channels that receive processing results |
When the document enters its input channel, both processing actors become eligible.
Their writes are collected by the Topic channel. The report actor subsequently receives those collected values and produces the final output.
The topic uses accumulate=False because it represents the current batch of results rather than a permanent history.
This example exposes the scheduling machinery that StateGraph ordinarily constructs on your behalf.
When direct Pregel is appropriate
Direct Pregel programming can be useful when you need specialized channel behavior, explicit publish-subscribe communication, or advanced runtime abstractions.
However, it transfers additional responsibilities to application developers.
You must reason explicitly about subscriptions, channel lifetimes, concurrent writes, scheduling behavior, and termination conditions.
For most agentic workflows, StateGraph provides a more readable representation of application intent.
The NodeBuilder API reference documents the lower-level construction interface.
Common mistakes and production best practices
Mutating state directly
Do not treat a node’s input dictionary or its nested mutable objects as shared variables that parallel workers can modify safely.
Return explicit state updates instead.
The Pregel execution model governs channel-mediated updates. It cannot prevent every race condition involving mutable Python objects, global variables, shared clients, or external services.
Assuming parallel execution order
Do not depend on which worker starts or finishes first.
Use explicit dependencies when execution order matters. Use stable identifiers when aggregating results.
Confusing a super-step with a resource budget
One super-step may schedule hundreds of expensive LLM or tool requests.
Configure concurrency limits, provider rate limits, request timeouts, retry policies, and application-level cost controls independently.
Storing excessive information in state
Accumulated documents, intermediate LLM outputs, and large message histories can increase serialization and checkpoint storage costs.
Prefer storing necessary references and compact results when full data does not need to travel through the graph.
Treating in-memory checkpoints as production persistence
InMemorySaver is useful for learning and testing but loses its data when the process terminates.
Use persistent checkpoint storage when workflows must survive process restarts, infrastructure failures, or long-running human approval processes.
Connecting this lesson to the course
The previous lesson introduced Command as a mechanism for returning state updates and selecting subsequent execution destinations.
Pregel explains how these instructions participate in the same scheduling and synchronization process as ordinary edges, conditional branches, and dynamic Send invocations.
For the chapter project, a parallel document-processing workflow, this knowledge helps you design independent workers, choose appropriate reducers, establish reliable fan-in dependencies, and inspect execution progress.
The next lesson, Creating custom tools, introduces another important component of agentic systems: executable capabilities that language models can request.
As you begin integrating tools, remember that a graph node may execute several tool calls internally. Those calls are not automatically separate graph super-steps.
Understanding where graph execution boundaries exist will help you design tool-enabled agents with predictable state transitions, reliable error recovery, controlled side effects, and observable production behavior.
Observe Super-steps in a Parallel Workflow
Build a document-processing graph that executes word counting and keyword extraction in parallel before combining their results into a final report. Use a reducer to collect results from both processing nodes. Stream state updates and inspect checkpoint history to verify that both processing nodes execute within the same super-step.
import operator
from typing import Annotated, TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver
class State(TypedDict):
document: str
results: Annotated[list[str], operator.add]
report: str
def count_words(state: State):
# TODO: Return the word count as a list containing one string.
pass
def extract_keywords(state: State):
# TODO: Extract words containing at least seven characters.
# Return the keywords as a list containing one result string.
pass
def generate_report(state: State):
# TODO: Combine the accumulated results into a report.
pass
builder = StateGraph(State)
# TODO: Register all three nodes.
# TODO: Connect START to both processing nodes.
# TODO: Create a fan-in edge to generate_report.
# TODO: Connect generate_report to END.
# TODO: Compile with InMemorySaver.
config = {
"configurable": {"thread_id": "pregel-exercise"},
"recursion_limit": 10,
}
inputs = {
"document": "LangGraph enables parallel document processing",
"results": [],
"report": "",
}
# TODO: Stream updates and values using version="v2".
# TODO: Inspect graph.get_state_history(config).
# TODO: Assert that both results appear in the final report.import operator
from typing import Annotated, TypedDict
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver
class State(TypedDict):
document: str
results: Annotated[list[str], operator.add]
report: str
def count_words(state: State):
count = len(state["document"].split())
return {"results": [f"Word count: {count}"]}
def extract_keywords(state: State):
keywords = sorted({
word.lower()
for word in state["document"].split()
if len(word) >= 7
})
return {"results": [f"Keywords: {', '.join(keywords)}"]}
def generate_report(state: State):
return {"report": "\n".join(sorted(state["results"]))}
builder = StateGraph(State)
builder.add_node("count_words", count_words)
builder.add_node("extract_keywords", extract_keywords)
builder.add_node("generate_report", generate_report)
builder.add_edge(START, "count_words")
builder.add_edge(START, "extract_keywords")
builder.add_edge(
["count_words", "extract_keywords"],
"generate_report",
)
builder.add_edge("generate_report", END)
graph = builder.compile(checkpointer=InMemorySaver())
config = {
"configurable": {"thread_id": "pregel-exercise"},
"recursion_limit": 10,
}
inputs = {
"document": "LangGraph enables parallel document processing",
"results": [],
"report": "",
}
for chunk in graph.stream(
inputs,
config=config,
stream_mode=["updates", "values"],
version="v2",
):
print(chunk["type"], chunk["data"])
print("\nCheckpoint history:")
history = list(graph.get_state_history(config))
for snapshot in reversed(history):
print(
"Step:", snapshot.metadata.get("step"),
"Next:", snapshot.next,
"Values:", snapshot.values,
)
final_state = graph.get_state(config)
assert len(final_state.values["results"]) == 2
assert "Word count: 5" in final_state.values["report"]
assert "Keywords:" in final_state.values["report"]
assert not final_state.next
assert any(
set(snapshot.next) == {
"count_words",
"extract_keywords",
}
for snapshot in history
)
print("\nFinal report:")
print(final_state.values["report"])Summary
- Pregel is the execution runtime underlying compiled LangGraph applications.
- A super-step groups scheduled node executions within a synchronized execution boundary.
- Every super-step progresses through planning, execution, and channel updates.
- Parallel nodes normally read state committed before their super-step and cannot observe sibling nodes' uncommitted writes.
- Channels determine how state values are stored, combined, and communicated between actors.
- Checkpoints and streaming provide complementary ways to inspect execution boundaries and graph progress.
- Direct Pregel programming exposes low-level channels and subscriptions, while StateGraph remains the preferred interface for most agentic applications.