langchain-ai/langgraph · error · InvalidNamespaceError
Root label for namespace cannot be "langgraph". Got
Error message
Root label for namespace cannot be "langgraph". Got: {namespace} What it means
Reserved-name check at the end of _validate_namespace: the first (root) label of the namespace equals 'langgraph'. That root is reserved for LangGraph's own internal storage namespaces, so user data cannot be placed under it; the full offending namespace is echoed in the message.
Solutions
- Choose a different root label, e.g. ('memories', user_id) or ('chat', thread_id)
- Keep application-specific roots like 'docs', 'users', 'agent' instead of 'langgraph'
- If you need cross-thread agent memory, use a dedicated root such as ('agent', agent_id)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at libs/checkpoint/langgraph/checkpoint/store/base/__init__.py:1281 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/bafd60b05109dffe.
Report an issue: GitHub.
Appendix: source
Thrown at libs/checkpoint/langgraph/checkpoint/store/base/__init__.py:1281
if namespace[0] == "langgraph":
raise InvalidNamespaceError(
f'Root label for namespace cannot be "langgraph". Got: {namespace}'
)View on GitHub (pinned to 38031739e5)