[PR #5257] docs: updated examples for SummarizationNode to account for serde with persistence layers #4328

Closed
opened 2026-02-20 17:50:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/5257

State: closed
Merged: Yes


This snagged me for a little bit, not sure if there is a reason to not have this in there.

What's happening

When using persistence layers with JSON serde, the running_summary is a plain dict instead of a dataclass. If you're using a Pydantic state then adding this in will automatically handle proper deserialization.

Concern

This leaves a bit of hole in the docs, because the examples are using TypedDict classes, maybe there is an additional improvement we can add for that (but maybe it's out of scope). At the very least this provides a type hint of what's missing.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5257 **State:** closed **Merged:** Yes --- This snagged me for a little bit, not sure if there is a reason to not have this in there. ### What's happening When using persistence layers with JSON serde, the running_summary is a plain dict instead of a dataclass. If you're using a Pydantic state then adding this in will automatically handle proper deserialization. ### Concern This leaves a bit of hole in the docs, because the examples are using TypedDict classes, maybe there is an additional improvement we can add for that (but maybe it's out of scope). At the very least this provides a type hint of what's missing.
yindo added the pull-request label 2026-02-20 17:50:01 -05:00
yindo closed this issue 2026-02-20 17:50:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4328