How to improve iteration speed with dev server?

This is the main bottleneck I see when developing Langgraph applications. Has anybody found a fix?

As far as I understand, you can set POSTGRES_URI and REDIS_URI, but these are NOT allowed to be used with the dev server — only when running langgraph up.

Because of this, every time I need to work on new code that needs to be saved between runs, I need to rebuild the docker image and go through the time-consuming langgraph up process. This takes like 2 minutes and makes it almost impossible to justify the use of Langgraph server. Do I really have to rebuild every time I change a line of code?

I know I could setup a Next.js API or similar, and just delegate to the graph to stream, but then you lose the built in thread management, time travel, etc, not to mention integration with use stream react hook. It just feels like such a terrible dev experience that I feel I must be missing something here.

Has anyone found a workaround for development?

You’re right that the dev server rebuilds are painful, and many developers hit this bottleneck. A few workarounds: mount your source code as a volume in the dev server’s Docker container so changes reflect without rebuilds (requires modifying the Docker setup), use a hybrid approach where you run your graph logic in a separate process that restarts quickly and connect via HTTP while keeping the dev server for UI/threading features, or build a minimal local version for rapid iteration then deploy to LangGraph server for final testing. The 2-minute rebuild cycle is a known pain point with no official solution yet, but the volume mounting approach is probably your best bet for maintaining the built-in features while improving iteration speed.

1 Like

Great idea, will give it a try. Thanks Abdul!