Need understanding between Custom history vs Checkpointer #1273
Replies: 4 comments 1 reply
-
checkpointer saves the state after each step of the graph. it is useful for automatically storing all the state. the primary purpose is to have a built in persistence layer to power human-in-the-loop, durable execution, and serve as a form of "memory" we sometimes see people saving specific parts of the state (eg chat messages) externally as well (if you want to do analytics over it, or something). you can do either, you dont have to use a checkpointer if you dont want to |
Beta Was this translation helpful? Give feedback.
-
how did you use chat history to storre all messages from the state in the Mongodb ? can you help .. i am stuck on it. |
Beta Was this translation helpful? Give feedback.
-
It's not a good idea to use checkpointer as a chat history saver because checkpointer saves all previous messages in the latest message checkpointer, which means your last checkpointer data size can bigger than 1MB.. I'm also stuck on this part and trying to find out the best way to save chat history as well as using checkpointer. |
Beta Was this translation helpful? Give feedback.
-
I am documenting a large codebase with a langGraph agent and I am facing the same problem. It keeps on saving the chatMessages as the history in each step and at some point the checkpointer is storing exponentially huge amounts of data. Can anyone suggest better way? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently developing an application and exploring the integration of LangGraph as a module. I have implemented a MongoDB checkpointer in LangGraph and additionally, I have also successfully stored the chat history, including all messages from the state, directly in the database.
Could you please clarify the difference between storing data directly in the database versus using the checkpointer for storage? Additionally, what is the primary purpose of the checkpointer? If possible, could you provide any references or resources on this topic beyond the standard documentation?
Beta Was this translation helpful? Give feedback.
All reactions