-
Notifications
You must be signed in to change notification settings - Fork 359
-
As instances of Runner, Agent and Tool(set) are meant to be long-lived singletons, there seem to be only way how to push some variable into agent's lifecycle which is via Session object into runAsync() method. But Session also seem not to be ideal for this as it lives across many requests, so there goes my question, if is there a way how to propagate request-scoped variable into agent and better into agent's tools (ToolContext?) in order that tool used by agent will have this variable at its disposal for the given runAsync() run? Now i can only (as InvocationContext is constructed inside runAsync() method) push and then remove variable through Session with before/afterToolCallback but its more of a hack than a expected flow I suppose.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
It seems that users of adk-python are also seeking for some support to this functionality: google/adk-python#1746
Beta Was this translation helpful? Give feedback.