- graph 실행: LangGraph SDK의 client.runs.wait 또는 client.runs.stream API를 사용하여 초기 입력으로 graph를 실행합니다.
- 기존 thread에서 checkpoint 식별: client.threads.get_history 메서드를 사용하여 특정
thread_id에 대한 실행 히스토리를 검색하고 원하는checkpoint_id를 찾습니다. 또는 실행을 일시 중지하려는 node 앞에 breakpoint를 설정할 수 있습니다. 그런 다음 해당 breakpoint까지 기록된 가장 최근 checkpoint를 찾을 수 있습니다. - (선택 사항) graph state 수정: client.threads.update_state 메서드를 사용하여 checkpoint에서 graph의 state를 수정하고 대체 state에서 실행을 재개합니다.
- checkpoint에서 실행 재개:
None입력과 적절한thread_id및checkpoint_id를 사용하여 client.runs.wait 또는 client.runs.stream API를 사용합니다.
워크플로우에서 시간 여행 사용하기
예제 graph
예제 graph
1. graph 실행
- Python
- JavaScript
- cURL
2. checkpoint 식별
- Python
- JavaScript
- cURL
3. state 업데이트
update_state는 새로운 checkpoint를 생성합니다. 새 checkpoint는 동일한 thread와 연결되지만 새로운 checkpoint ID를 갖습니다.
- Python
- JavaScript
- cURL
4. checkpoint에서 실행 재개
- Python
- JavaScript
- cURL
더 알아보기
- LangGraph 시간 여행 가이드: LangGraph에서 시간 여행 사용에 대해 자세히 알아보세요.
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.