Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ability to propagate (http)request-scoped attributes into InvocationContext #548

Unanswered
voborl00 asked this question in Q&A
Discussion options

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.

You must be logged in to vote

Replies: 1 comment

Comment options

It seems that users of adk-python are also seeking for some support to this functionality: google/adk-python#1746

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /