langgraph/constants.py
Graph Control Flow
START
str
The first (virtual) node in graph-style Pregel.Use this constant to add edges from the graph entry point to your first node(s). The actual value is the interned string
"__start__".Defined in: langgraph/constants.py:30Usage Example
END
str
The last (virtual) node in graph-style Pregel.Use this constant to mark terminal nodes in your graph. When execution reaches a node with an edge to
END, the graph will cease execution. The actual value is the interned string "__end__".Defined in: langgraph/constants.py:28Usage Example
Conditional Routing to END
Streaming and Tracing Tags
TAG_HIDDEN
Tag to hide a node/edge from certain tracing/streaming environments.When applied to a node, it will not appear in tracing outputs or certain streaming modes. The actual value is the interned string
"langsmith:hidden".Defined in: langgraph/constants.py:26Usage Example
TAG_NOSTREAM
str
Tag to disable streaming for a chat model.When applied to a chat model invocation, it will not stream tokens even if streaming is enabled. The actual value is the interned string
"nostream".Defined in: langgraph/constants.py:24Usage Example
Import Paths
Reserved Constants (Deprecated)
The following constants are retained for backwards compatibility but should not be used directly:CONF- Internal configuration key (use context_schema instead)TASKS- Internal tasks tracking (managed automatically)CONFIG_KEY_CHECKPOINTER- Internal checkpointer key (managed automatically)
Usage Patterns
Basic Linear Graph
Conditional Routing
Multiple Entry Points
See Also
- StateGraph - Building graphs with START and END
- Graph Module - Core graph exports
- Types - Other core types and primitives