Skip to content

Conversation

rtejada-g
Copy link

@rtejada-g rtejada-g commented Sep 4, 2025

Several dev experience improvements and customization options for the ADK.

Features

  • displayName for FunctionTool: Improves graph readability in the web UI by allowing a custom display name for tools.
  • Artifact Handling: Now uses the displayName for artifact filenames, providing the frontend with context-aware names for rendering.
  • ADK_WEB_DIR: Allows serving a local adk-web build via an environment variable for easier development and testing.
  • Graph Node Gradient: Adds a gradient background to graph nodes for better visualization.

Dependency

This PR is a prerequisite for the frontend changes in adk-web. Please see the corresponding PR: google/adk-web#111

Resolves #2859

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @rtejada-g, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the developer experience and providing more customization options within the ADK. The changes aim to improve the clarity and utility of the web UI, facilitate local development of the web interface, and offer greater control over how tools and artifacts are presented and managed within the system.

Highlights

  • Custom Display Names for Tools and Artifacts: Introduced the ability to specify a displayName for FunctionTool instances, improving readability in the web UI. This displayName is also now used for artifact filenames, providing more context-aware names for frontend rendering.
  • Local Web UI Development Support: Added support for serving a local adk-web build via the ADK_WEB_DIR environment variable, streamlining development and testing workflows.
  • Enhanced Graph Visualization: Updated the agent graph visualization with a new gradient background for nodes and improved color schemes for borders, fonts, and edges, enhancing visual clarity and contrast.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@adk-bot
Copy link
Collaborator

adk-bot commented Sep 4, 2025

Response from ADK Triaging Agent

Hello @rtejada-g, thank you for creating this PR!

To help us review your contribution more effectively, could you please address the following points from our contribution guidelines?

  • Associated Issue: All PRs, other than small documentation or typo fixes, should have an Issue associated with them. If one doesn't exist, please create one and link it to this PR.
  • Testing Plan: Please include a testing plan section in your PR description to detail how you've tested these changes. This is especially important for the visual and developer experience improvements you've introduced.

You can find more details in our contribution guidelines.

Thanks!

@adk-bot adk-bot added bot triaged [Bot] This issue is triaged by ADK bot web [Component] This issue will be transferred to adk-web labels Sep 4, 2025
@adk-bot adk-bot requested a review from wyf7107 September 4, 2025 23:31
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several valuable visual and customization improvements, enhancing the developer experience. The changes for graph visualization and allowing displayName for tools are well-implemented. I've identified a significant breaking change in FunctionTool where require_confirmation functionality was removed, which will likely impact existing users and tests. Additionally, I've suggested a refactoring in agent_graph.py to improve code clarity and reduce duplication. Addressing these points will further strengthen the quality of this contribution.

*,
name: Optional[str] = None,
description: Optional[str] = None,
displayName: Optional[str] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to change the core interface just for display purposes. We want the adk web to show the exact name so it's easier for developers to map what they see in the UI with the code.

BASE_DIR = Path(__file__).parent.resolve()
ANGULAR_DIST_PATH = BASE_DIR / "browser"
# Default to the pre-packaged UI, but allow overriding for local development.
if adk_web_dir_override := os.environ.get("ADK_WEB_DIR"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to stick to the command-line flag. When the CLI flag is not set adk web should use current folder.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A CLI flag is interesting but couldn't find one that's used to specify the web directory, can you tell me which one? the ADK_WEB_DIR env var is another option to support where developers want to build a customized version of the adk-web UI and need to serve it with the adk-web command for testing and demos.

dark_green = '#0F5223'
light_green = '#69CB87'
light_gray = '#cccccc'
# Gradient with more contrast: Very Dark Blue/Slate to a Lighter Blue. Google Blue for edges.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you attach a screenshot?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attaching before and after

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot triaged [Bot] This issue is triaged by ADK bot web [Component] This issue will be transferred to adk-web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comprehensive Visual and Customization Improvements
3 participants