feat(agents): add support for remote agents#16013
Conversation
Summary of ChangesHello @adamfweidman, 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 the foundational infrastructure for the Gemini CLI to interact with remote agents. It enables users to define and delegate tasks to agents hosted externally, such as on Agent Engine, by adding a new invocation type, a protocol adaptation layer to handle communication nuances, and updated configuration support. This significantly expands the CLI's capabilities by allowing it to leverage external AI services. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces significant new functionality for interacting with remote agents using the A2A protocol. The implementation includes a compatibility adapter, new invocation types, and state management for conversations. While the overall structure is sound, I've identified a few critical issues related to the robustness of the compatibility layer, a lack of testing, and error handling in the authentication mechanism. Addressing these points will be crucial for ensuring the stability and reliability of this new feature.
26e21af to
c0e2a9e
Compare
|
Size Change: +9.61 kB (+0.04%) Total Size: 22.3 MB
ℹ️ View Unchanged
|
sehoon38
left a comment
There was a problem hiding this comment.
LGTM with minor comments
Summary
Enables the Gemini CLI to interact with remote agents via the Agent-to-Agent (A2A) protocol. This introduces the
RemoteAgentInvocationcapability, allowing users to define and delegate tasks to agents hosted externally (e.g., on Agent Engine).Details
This PR adds the foundational infrastructure for remote agent communication:
RemoteAgentInvocation: A new tool invocation type that proxies requests to remote agents, maintaining conversation state (context and task IDs) across turns.createAdapterFetch, a specialized fetch adapter to handle A2A Protocol mistmatches between the python-adk and a2a-js.Related Issues
Closes #15096
Makes progress towards: #15098. Currently defaults to ADC Auth.
How to Validate
Configuration: Add a remote agent definition to your
agents.toml(or equivalent config). For example:Execution: Run the CLI and use the
delegate_to_agenttool (or natural language) to invoke the remote agent:"Say hello to the customer analyst assistant"Verification: Ensure the CLI successfully sends the request, receives the response from the remote service, and displays the output.
Pre-Merge Checklist
A2AClientManager.test.ts,RemoteAgentInvocation.test.ts,a2aUtils.test.ts)