Replies: 1 comment 2 replies
-
The LangChain documentation does not provide specific details on whether the This approach allows you to maintain important runtime values, such as LLM instances, tool definitions, and other custom parameters, while also incorporating essential checkpointing details like If you encounter issues with resuming execution using only the checkpoint configuration, consider merging it with the original configuration as demonstrated in your example code. This should help maintain the integrity and continuity of your application's workflow. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
@dosu
I am implementing a human-in-the-loop workflow in LangGraph (JavaScript/TypeScript) using the interrupt() function within a graph node. The graph execution pauses as expected. I am retrieving the state snapshot (including snapshot.config which contains { configurable: { thread_id, checkpoint_id, ... } }) either via graph.getState(config) or from the interrupt event payload when using streamEvents.
Execution is then resumed later using graph.invoke(new Command({ resume: humanInput }), resumeConfig) or graph.streamEvents(new Command({ resume: humanInput }), resumeConfig).
Problem/Question:
There appears to be ambiguity or missing detail in the documentation regarding the exact requirements for the resumeConfig object passed during the resume call. Specifically:
Is it sufficient to pass only the checkpointing configuration obtained from the snapshot (i.e., resumeConfig = snapshot.config)?
Or, is it necessary to pass the full original RunnableConfig (including application-specific details like LLM instances, tool definitions, availableAgents, custom parameters passed during the initial run, etc.) merged with the essential checkpointing information (thread_id, checkpoint_id) from the snapshot?
System Info
mac
@langchain/openai: >=0.1.0 <0.5.0
js-yaml: ^4.1.0
openapi-types: ^12.1.3
yaml: ^2.2.1
@langchain/textsplitters: >=0.0.0 <0.2.0 jsonpointer: ^5.0.1
p-retry: 4
zod-to-json-schema: ^3.22.3
js-tiktoken: ^1.0.12
langsmith: >=0.2.8 <0.4.0
uuid: ^10.0.0
zod: ^3.22.4
Beta Was this translation helpful? Give feedback.
All reactions