langgraph/how-tos/human_in_the_loop/breakpoints/ #1095
Replies: 2 comments 1 reply
-
from langgraph_state import GraphState from nodes import build_strategy, human_feedback, decision_node, rag_node, database_search, web_search_node, sql_search_node, state_printer workflow = StateGraph(GraphState) workflow.add_node("build_strategy", build_strategy) workflow.add_node("rag_node", rag_node) workflow.set_entry_point("build_strategy") workflow.add_edge("build_strategy", "human_feedback") workflow.add_conditional_edges( workflow.add_conditional_edges( workflow.add_conditional_edges( workflow.add_conditional_edges( workflow.add_conditional_edges( workflow.add_conditional_edges( workflow.add_edge("state_printer", END) memory = MemorySaver() app = workflow.compile(checkpointer=memory, interrupt_before=["human_feedback"]) I have created a langgraph with human feedback. After strategy node is executed. It should interrupt before human_feedback node and ask from the user that if the strategy made by the agent is correct or wrong in case if it is correct it will proceed to the next nodes and if not then it will go to strategy node again. For my first condition in case it is correct it is working fine. But when it is wrong the strategy node executes but donot go to the next nodes and the program terminates. This is the issue if anyone can help. Thanks |
Beta Was this translation helpful? Give feedback.
-
Does the process have to remain active? Or can I also persist the state, terminate the agent and then, once human approval is given, restart it and continue where it left off? |
Beta Was this translation helpful? Give feedback.
-
langgraph/how-tos/human_in_the_loop/breakpoints/
Build language agents as graphs
https://langchain-ai.github.io/langgraph/how-tos/human_in_the_loop/breakpoints/
Beta Was this translation helpful? Give feedback.
All reactions