Skip to content

GraphLoadError when running "langgraph dev" #1

@jackliusr

Description

@jackliusr

2026-04-20T14:45:02.234007Z [error ] Traceback (most recent call last):
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 627, in collect_graphs_from_env
graph = await run_in_executor(None, _graph_from_spec, spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/utils/config.py", line 145, in run_in_executor
return await asyncio.get_running_loop().run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/home/jackl/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/utils/config.py", line 136, in wrapper
return func(*args, **kwargs)
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/timing/timer.py", line 101, in wrapper
return func(*args, **kwargs)
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 800, in _graph_from_spec
raise ValueError(
...<7 lines>...
)
ValueError: Heads up! Your graph 'agent' from './main.py' includes a custom checkpointer (type <class 'langgraph.checkpoint.memory.InMemorySaver'>). With LangGraph API, persistence is handled automatically by the platform, so providing a custom checkpointer (type <class 'langgraph.checkpoint.memory.InMemorySaver'>) here isn't necessary and will be ignored when deployed.

To simplify your setup and use the built-in persistence, please remove the custom checkpointer (type <class 'langgraph.checkpoint.memory.InMemorySaver'>) from your graph definition. If you are looking to customize which postgres database to connect to, please set the POSTGRES_URI environment variable. See https://langchain-ai.github.io/langgraph/cloud/reference/env_var/#postgres_uri_custom for more details.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/starlette/routing.py", line 638, in lifespan
async with self.lifespan_context(app) as maybe_state:
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/home/jackl/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/contextlib.py", line 214, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/timing/timer.py", line 227, in combined_lifespan
await stack.enter_async_context(ls(app))
File "/home/jackl/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/contextlib.py", line 668, in enter_async_context
result = await _enter(cm)
^^^^^^^^^^^^^^^^
File "/home/jackl/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/contextlib.py", line 214, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_runtime_inmem/lifespan.py", line 114, in lifespan
await graph.collect_graphs_from_env(True)
File "/home/jackl/prjs/agents/sql-agent/.venv/lib/python3.13/site-packages/langgraph_api/graph.py", line 629, in collect_graphs_from_env
raise GraphLoadError(spec, exc) from exc
langgraph_api.utils.errors.GraphLoadError: Failed to load graph 'agent' from ./main.py: Heads up! Your graph 'agent' from './main.py' includes a custom checkpointer (type <class 'langgraph.checkpoint.memory.InMemorySaver'>). With LangGraph API, persistence is handled automatically by the platform, so providing a custom checkpointer (type <class 'langgraph.checkpoint.memory.InMemorySaver'>) here isn't necessary and will be ignored when deployed.

To simplify your setup and use the built-in persistence, please remove the custom checkpointer (type <class 'langgraph.checkpoint.memory.InMemorySaver'>) from your graph definition. If you are looking to customize which postgres database to connect to, please set the POSTGRES_URI environment variable. See https://langchain-ai.github.io/langgraph/cloud/reference/env_var/#postgres_uri_custom for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions