Proposal: Expose public `INTERRUPT` constant

Hi everyone,

When building human-in-the-loop flows we need to check for the "__interrupt__" key as a magic string in streaming output.

LangGraph already provides START and END as public constants so users don’t have to hard-code
"__start__" and "__end__". But there’s no equivalent for the interrupt key, even though
checking for it is a required part of every human-in-the-loop streaming implementation.

Why not adding a public INTERRUPT constant to langgraph.constants:

from langgraph.constants import INTERRUPT

async for metadata, mode, chunk in graph.astream(
    initial_input,
    stream_mode=["messages", "updates"],
    subgraphs=True,
    config=config,
):
    if mode == "updates":
        if INTERRUPT in chunk:
            interrupt_info = chunk[INTERRUPT][0].value
            ...

The implementation would be literally a two-line addition to langgraph/constants.py, following the
exact same sys.intern() pattern.

I think this makes sense because:

  1. The constant already exists internally as INTERRUPT = sys.intern("__interrupt__")
    in langgraph._internal._constants and is used across the pregel engine. This would
    just promote it to the public module.

  2. Users already reference it by name. The interrupt docs show
    if "__interrupt__" in chunk as the standard pattern. LangGraph’s own tests do the
    same (test_pregel.py, test_pregel_async.py).

  3. Complements the existing Interrupt type. Users import Interrupt and interrupt
    from langgraph.types for the values — a companion INTERRUPT constant for the dict
    key completes the public surface.

Context on PR #5529

I’m aware that PR #5529 moved all
constants (including INTERRUPT) to _internal/_constants.py in a bulk refactor before
v1. I believe making INTERRUPT public could be very useful now.

Would love to hear if others have run into this, or if the team has thoughts on whether
this should be public or not. Happy to open a PR if needed.

Thanks!

hi @imtdb

here you go feat(langgraph): expose public INTERRUPT and add is_interrupted helper by pawel-twardziak · Pull Request #7007 · langchain-ai/langgraph · GitHub
Hopefully the maintainers will approve it :slight_smile: