Skip to content

Conversation

@yeesian
Copy link

@yeesian yeesian commented Jan 9, 2026

Description

This PR is not ready to be reviewed or merged yet. I'm just trying out an example/sample for #13734

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@yeesian yeesian requested review from a team as code owners January 9, 2026 20:51
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 9, 2026
@snippet-bot
Copy link

snippet-bot bot commented Jan 9, 2026

Here is the summary of possible violations 😱

Details

There are 5 possible violations for not having product prefix.

The end of the violation section. All the stuff below is FYI purposes only.


Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yeesian, 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 introduces a comprehensive new Python code sample designed to guide users through the process of building and deploying agents using the Vertex AI Agent Engine and Agent Development Kit (ADK). The sample provides an end-to-end demonstration, covering the definition of a custom tool for an agent, agent initialization, local and remote testing, and deployment to Vertex AI, ultimately addressing issue #13734. It aims to simplify the understanding and implementation of custom agent functionalities within the Google Cloud ecosystem.

Highlights

  • New Code Sample Added: A new Python file, generative_ai/reasoning_engine/quickstart_adk_example.py, has been added to demonstrate the use of Vertex AI Agent Engine with the Agent Development Kit (ADK).
  • Custom Tool Definition: The sample includes a get_exchange_rate function, showcasing how to define a custom tool that an Agent Engine can utilize to fetch real-world data, specifically currency exchange rates from an external API.
  • Agent Initialization and Configuration: It illustrates the process of initializing an Agent using the gemini-2.0-flash model and integrating the custom get_exchange_rate tool.
  • Local and Remote Agent Testing: The code provides examples for both local testing of the agent using app.async_stream_query and remote testing after deployment to Vertex AI Agent Engines.
  • Agent Deployment to Vertex AI: The sample demonstrates how to deploy the configured agent to Vertex AI Agent Engines, including specifying necessary requirements and a staging_bucket.
  • Resource Cleanup: The example concludes with the deletion of the remotely deployed agent, ensuring proper resource management.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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.

Copy link
Contributor

@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 adds a new quickstart example for the Agent Engine using the ADK. The new code contains several critical issues that will prevent it from running, including a SyntaxError due to using async for in a synchronous function, an IndentationError, and a NameError from an incorrect type hint. I've also pointed out some areas for improvement regarding error handling, type hints, and code style consistency. Addressing these issues will make the sample code correct and robust.

f"https://api.frankfurter.app/{currency_date}",
params={"from": currency_from, "to": currency_to},
)
return response.json()
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The HTTP request to the Frankfurter API does not handle potential errors, such as network issues or non-200 status codes. This could lead to unexpected behavior or crashes if the API is unavailable or returns an error. It's good practice to check for a successful response by adding response.raise_for_status() before this line.

@yeesian yeesian marked this pull request as draft January 12, 2026 15:15
yeesian and others added 3 commits January 12, 2026 10:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant