Enable Node level caching in create_react_agent
#4768
MrCsabaToth
started this conversation in
Ideas
Replies: 1 comment
-
Note, that this is not prompt caching #2900 even though that could be nice as well |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Node level caching is a relatively new feature (announced 05/16/2025 https://langchain-ai.github.io/langgraph/concepts/low_level/#node-caching), however currently only the graph
compile
and theadd_node
takes it as an optional parameter.Since all of this is under the hood of the ReAct agent, we simply just have to add it as an optional parameter (like the
checkpointer
and thestore
) to thecreate_react_agent
langgraph/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py
Line 241 in 0a8f54c
compile
. The API could be more sophisticated in a next step (ttl and bells and whistles).Beta Was this translation helpful? Give feedback.
All reactions