Replies: 1 comment
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: To get the user's email, you should protect your tool with an OpenID Connect (OIDC) authentication scheme and request the "email" scope. The user's identity information will then be available in the Hello! That's a great question. Accessing user-specific information like an email address for data filtering is a common requirement for creating personalized and secure agents. In ADK, accessing user PII such as an email is rightly handled through a secure authentication flow rather than being automatically available in the session state. While the ADK context provides a The recommended way to achieve this is by using ADK's authentication capabilities:
This approach ensures that your agent securely and transparently requests access to user data, aligning with standard security and privacy best practices. [18] References: [1] Tool Context: https://github.com/google/adk-python/blob/main/docs/tools-custom/index.md#tool-context [4] [2] Authentication Docs: https://github.com/google/adk-python/blob/main/docs/tools/authentication.md [17] [3] Auth Example Snippet: https://github.com/google/adk-python/blob/main/examples/snippets/tools/auth/tools_and_agent.py [14] |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have developed a multi agent system using adk, which internally uses a couple of tools. One of the tool is using mcptoolset to connect with the bigquery data (the mcp is deployed as a separate cloud run service).
We have also deployed this in agent engine (did the testing on playground working fine) and then exposed to Gemini Enterprise UI.
Problem: I want to use the email id using which the user has logged inside the AgentSpace/Gemini Enterprise, as one of the input in the tool -which will help in filtering the data. So that by default the user is only able to see data related to the email id.
Beta Was this translation helpful? Give feedback.
All reactions