[Python] Lang graph human in the loop with check pointer

Discussão em 'Python' iniciado por Stack, Janeiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to build an agentic AI application using Lang Graph, I have a FAST API which accepts some parameters using which I create a Graph, I can use a check pointer as well. This graph is created inside a Graph creator class and used a local variable. Once the graph executed at specific step, I want to get Human feedback, so I interrupt the graph at a specific stage. I have a thread id which is used to resume the graph execution. Now, I am returning the current state information back to user thru the API and user will call another API with the same thread id so that it can continue to resume the graph. How Do I do this?

    I was exploring different ways to persist the graph by serializing and deserializing it in the second API call . But none of it is working, I have tried with pickle.dumps and json.dumps. Is it possible to have a new graph created with the same checkpointer?. How do recreate the same graph in this scenario.

    Continue reading...

Compartilhe esta Página