I am currently in the process of writing a package that uses AWS's Dynamno DB as the persistence store for checkpoint saving. I am keeping the implementation as close to the existing Sqlite and MongoDB checkpoint savers as possible.
In my use case for the library I am creating, I would like the serde to be able to encrypt and decrypt the data. My intention is to use an encryption library that performs asynchronously. There is no reason within my package I cannot support both serdes that work synchronously and asynchronously, but it does deviate from the existing classes.
Proposed Change
My idea is that the SerializationProtocol is updated to allow async methods, e.g.
Then changes are made to MemorySaver, MongoDBSaver, SqliteSaver, and tests to await the calls of dumpsTyped and loadsTyped. This should allow existing users to continue to use synchronous methods without an issue and will allow future use of asynchronous methods.
Possible Issue
The only possible issue that occurs to me is how Langgraph JS behaves if someone provides slow async methods for serialization for some reason?
Doing the work
I am happy to take a stab at the work if it seems like a reasonable idea.
I am currently in the process of writing a package that uses AWS's Dynamno DB as the persistence store for checkpoint saving. I am keeping the implementation as close to the existing Sqlite and MongoDB checkpoint savers as possible.
In my use case for the library I am creating, I would like the serde to be able to encrypt and decrypt the data. My intention is to use an encryption library that performs asynchronously. There is no reason within my package I cannot support both serdes that work synchronously and asynchronously, but it does deviate from the existing classes.
Proposed Change
My idea is that the SerializationProtocol is updated to allow async methods, e.g.
Then changes are made to MemorySaver, MongoDBSaver, SqliteSaver, and tests to
await
the calls ofdumpsTyped
andloadsTyped
. This should allow existing users to continue to use synchronous methods without an issue and will allow future use of asynchronous methods.Possible Issue
The only possible issue that occurs to me is how Langgraph JS behaves if someone provides slow async methods for serialization for some reason?
Doing the work
I am happy to take a stab at the work if it seems like a reasonable idea.