google / google/adk-web

Customizable User ID in Google ADK Web Chat Interface

Open
#49 6 comments 18 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
1k
Forks
267
Avg merge
1d 12h
Merged PRs (30d)
9

Description

** Please make sure you read the contribution guide and file the issues in the right place. **
[Contribution guide.](https://google.github.io/adk-docs/contributing-guide/)

**Is your feature request related to a problem? Please describe.**
Currently, the Google ADK web chat interface hardcodes the user ID to "user". This limitation prevents us from effectively leveraging the existing web chat interface for scenarios involving multiple distinct users, such as gathering feedback from different individuals or simulating various user interactions. To collect diverse feedback or conduct more comprehensive testing, we are forced to develop entirely separate chat interfaces, which is an unnecessary duplication of effort and increases development overhead.

**Describe the solution you'd like**
I would like the ability to customize the user ID in the Google ADK web chat interface. Ideally, this functionality could be implemented through one or more of the following methods:

Query String Parameter: Allow the user ID to be passed as a query string parameter in the URL (e.g., your-adk-web-chat-url?userId=john_doe).
Cookie: Enable setting the user ID via a browser cookie, which would persist across sessions.
JavaScript API: Provide a JavaScript API call that allows programmatic setting of the user ID before or during the chat session.
This would allow us to easily differentiate between user interactions and collect feedback specific to individual users, significantly enhancing the utility of the existing web chat interface.

**Describe alternatives you've considered**
The primary alternative considered is building entirely new custom chat interfaces for each scenario where differentiated user feedback is required. This involves:

Increased Development Time: Significant effort in setting up new UI, backend integrations, and managing separate deployments.
Maintenance Overhead: More codebases to maintain and update.
Redundant Functionality: Replicating the core chat interface functionality that already exists within the ADK web component.

Another less ideal alternative would be to manually modify the ADK web component's source code to change the hardcoded user ID, but this is not sustainable, easily maintainable, or recommended for production environments due to potential conflicts with future updates.

**Additional context**
Add any other context or screenshots about the feature request here.
This feature would be particularly beneficial for:

User Feedback Collection: Allowing multiple internal or external testers to provide feedback through the same interface, with their contributions clearly identifiable by their unique user IDs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.