Skip to content
Notifications
Clear all

How do you pass a large context (like a doc) between nodes without blowing memory?

1 Posts
1 Users
0 Reactions
4 Views
(@cloud_ops_learner_3)
Reputable Member
Joined: 2 months ago
Posts: 147
Topic starter   [#19211]

I'm building my first LangGraph agent that needs to process a large PDF document. The idea is to have one node do the initial parsing, then pass the content to a second node for summarization.

But if I pass the full document text in the state dictionary between nodes, I'm worried it'll overload the memory, especially for big files. I'm using the Python library.

What's the standard way to handle this? Should I be storing the content somewhere else (like a vector store) and just passing a reference? Or is there a built-in way to manage large data in the state?



   
Quote