Per-step tool allowlists in LangGraph #6059
-
I am building multi-tenant agent, and each tenant turn on different tools/scopes. I need allowlist tools per step and sometimes give more access after user consent, but I don’t want break cache. Any recommended approaches in LangGraph? |
Beta Was this translation helpful? Give feedback.
Answered by
augustocesarperin
Sep 1, 2025
Replies: 1 comment 2 replies
-
Don’t rebuild the graph. Add a policy node that writes allowed_tools to state each step |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Mathharo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don’t rebuild the graph. Add a policy node that writes allowed_tools to state each step
& bind the agent only to those tools (llm.bind_tools(enabled)). After consent, update state.
For cache, just include the current tool list in your cache key
(This is what’s worked for me so far)