langchain-ai/langgraph · error · LangGraphDeprecatedSinceV10

Importing from langgraph.constants is deprecated. This…

Error message

Importing {name} from langgraph.constants is deprecated. This constant is now private and should not be used directly. Please let the LangGraph team know if you need this value.

What it means

Error "Importing {name} from langgraph.constants is deprecated. This constant is now private and should not be used directly. Please let the LangGraph team know if you need this value." thrown in langchain-ai/langgraph.

Solutions

  1. Avoid importing private constants from langgraph.constants; they are internal implementation details
  2. Refactor your code to use the public API instead of the private value
  3. If you genuinely need the constant, open an issue with the LangGraph team requesting it be made public
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at libs/langgraph/langgraph/constants.py:53 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26). Data as JSON: /api/errors/81bf930e84bc9372. Report an issue: GitHub.

Appendix: source

Thrown at libs/langgraph/langgraph/constants.py:53

    if name in ["Send", "Interrupt"]:
        warn(
            f"Importing {name} from langgraph.constants is deprecated. "
            f"Please use 'from langgraph.types import {name}' instead.",
            LangGraphDeprecatedSinceV10,
            stacklevel=2,
        )

        from importlib import import_module

        module = import_module("langgraph.types")
        return getattr(module, name)

    try:
        from importlib import import_module

        private_constants = import_module("langgraph._internal._constants")
        attr = getattr(private_constants, name)
        warn(
            f"Importing {name} from langgraph.constants is deprecated. "
            f"This constant is now private and should not be used directly. "
            "Please let the LangGraph team know if you need this value.",
            LangGraphDeprecatedSinceV10,
            stacklevel=2,
        )
        return attr
    except AttributeError:
        pass

    raise AttributeError(f"module has no attribute '{name}'")

View on GitHub (pinned to 38031739e5)