Skip to content

Conversation

Whynot63
Copy link

Added flag for explicit agent transfer

Copy link

google-cla bot commented Sep 25, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

Summary of Changes

Hello @Whynot63, 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 enhances the control mechanism for LLM agent transfers by introducing a new configuration flag. This flag allows for an explicit confirmation step from the user before an agent transfer is executed, providing greater oversight and preventing unintended transfers. The change involves adding the flag to the agent's definition and then wiring it into the agent transfer logic.

Highlights

  • New Configuration Flag: Introduced a new boolean flag, require_confirmation_for_transfer, within the LlmAgent class. This flag, defaulting to False, controls whether the LLM should explicitly ask for user confirmation before initiating an agent transfer.
  • Agent Transfer Integration: Integrated the new require_confirmation_for_transfer flag into the agent_transfer.py flow. The FunctionTool responsible for agent transfers now utilizes this flag to determine if user confirmation is needed before proceeding with a transfer.
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.

@adk-bot
Copy link
Collaborator

adk-bot commented Sep 25, 2025

Response from ADK Triaging Agent

Hello @Whynot63, thank you for creating this PR!

Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). You can do so at https://cla.developers.google.com/.

In addition, this PR is a new feature, could you please associate a Github issue with this PR? If there is no existing issue, could you please create one?

Finally, could you please include a testing plan section in your PR to talk about how you will test this new feature?

This information will help reviewers to review your PR more efficiently. Thanks!

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 a require_confirmation_for_transfer flag to enable explicit user confirmation for agent transfers. The implementation is straightforward and correctly wires the new flag from the LlmAgent configuration to the FunctionTool that handles the transfer. My review focuses on improving code clarity and adhering to Python's style guidelines. I've suggested a more descriptive docstring for the new flag and a correction to indentation to align with PEP 8 standards.

Whynot63 and others added 3 commits September 26, 2025 01:19
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ryanaiagent ryanaiagent self-assigned this Oct 2, 2025
@ryanaiagent ryanaiagent added the agent config [Component] This issue is related to the Agent Config interface and implementation label Oct 2, 2025
@ryanaiagent
Copy link
Collaborator

Hi @Whynot63, thanks for the PR! Could you please take two quick actions before we proceed?

  1. Link the Issue: Please link this pull request to its existing GitHub issue, or create a new issue if necessary.
  2. Add Testing Plan: Please include a dedicated Testing Plan section in the PR description. This should explain the steps taken (or to be taken) to fully test and validate this new feature."

@ryanaiagent ryanaiagent added the request clarification [Status] The maintainer need clarification or more information from the author label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent config [Component] This issue is related to the Agent Config interface and implementation request clarification [Status] The maintainer need clarification or more information from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants