Custom serde not used for agent state (metadata column) #26555
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Created a new discussion thread in langgraph repo: langchain-ai/langgraph#1755 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using langgraph with a custom serde for checkpointer. The custom serde knows how to serialize and deserialize a proto object.
I am invoking the graph like this:
(see logs below)
I see that the metadata column (in checkpoints table), the first entry contains a serialised version of the agent state. Subsequent rows (for the graph invocation) only contain the delta of the agent state. Meaning, they only contain fields which which are returned by the node.
This is all good for the first message, however on subsequent messages when agent_state is not empty (and contains proto objects), the serializer for metadata column won't be any good.
I created a custom build of with the following changes and it worked file.
file:
langgraph/checkpoint/postgres/base.py
But with a custom serde, the filtering function
_search_where
may not work as expected.Logs:
Beta Was this translation helpful? Give feedback.
All reactions