Modifying a graph post compilation; cancelled or allowed? #65

Closed
opened 2026-02-15 17:15:20 -05:00 by yindo · 2 comments
Owner

Originally created by @lomasnz on GitHub (Aug 16, 2024).

Hi,

I’ve been exploring LangGraphJS and encountered a discrepancy between the documentation and observed behavior regarding graph modifications post-compilation.

According to the documentation on Graph Migrations, it seems possible to "modify the topology of a graph (e.g., adding or removing nodes) even after the graph is compiled, under certain conditions". However, when attempting to add nodes dynamically after compilation, I receive the warning:

"Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."

I may have misunderstood the scope of the documentation, but could you clarify whether post-compilation modifications are supported, and under what conditions they are allowed?

Thank you for your help!
Paul

Originally created by @lomasnz on GitHub (Aug 16, 2024). Hi, I’ve been exploring LangGraphJS and encountered a discrepancy between the documentation and observed behavior regarding graph modifications post-compilation. According to the [documentation on Graph Migrations](https://langchain-ai.github.io/langgraphjs/concepts/low_level/?h=reduce#graph-migrations), it seems possible to "modify the topology of a graph (e.g., adding or removing nodes) even after the graph is compiled, under certain conditions". However, when attempting to add nodes dynamically after compilation, I receive the warning: "Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph." I may have misunderstood the scope of the documentation, but could you clarify whether post-compilation modifications are supported, and under what conditions they are allowed? Thank you for your help! Paul
yindo closed this issue 2026-02-15 17:15:20 -05:00
Author
Owner

@jacoblee93 commented on GitHub (Aug 25, 2024):

Hey @lomasnz, sorry for missing this!

This is not currently supported in JS - I believe it was a bad docs port from Python. Will remove these lines for now.

@jacoblee93 commented on GitHub (Aug 25, 2024): Hey @lomasnz, sorry for missing this! This is not currently supported in JS - I believe it was a bad docs port from Python. Will remove these lines for now.
Author
Owner

@lomasnz commented on GitHub (Aug 26, 2024):

Thanks for clarifying that. I appreciate the response.

@lomasnz commented on GitHub (Aug 26, 2024): Thanks for clarifying that. I appreciate the response.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#65