-
Notifications
You must be signed in to change notification settings - Fork 10.2k
feat(agents): add support for remote agents and multi-agent TOML files #15437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 significantly enhances the agent management system by introducing support for remote agents and allowing the definition of multiple agents within a single TOML configuration file. These changes provide greater flexibility in how agents are discovered, registered, and configured, paving the way for more dynamic and scalable agent-based applications. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
9d832ef to
8b4d027
Compare
There was a problem hiding this 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 support for remote agents and defining multiple agents within a single TOML file. The changes are well-structured, introducing new Zod schemas for validation and updating the TOML loading logic to handle both single and multiple agent definitions. The addition of tests for the new functionality is also good. I've found one potential issue regarding the Zod schema validation that could lead to user confusion, which I've detailed in a specific comment. Otherwise, the implementation looks solid.
|
Size Change: +2.41 kB (+0.01%) Total Size: 22 MB
ℹ️ View Unchanged
|
|
/gemini review |
There was a problem hiding this 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 support for remote agents and defining multiple agents within a single TOML file. A high-severity Server-Side Request Forgery (SSRF) vulnerability has been identified due to insufficient validation of the agent_card_url in remote agent definitions, which could allow an attacker to scan internal networks or access sensitive cloud metadata. Stricter URL validation is recommended to mitigate this risk. Additionally, while the changes are well-structured and use Zod for validation, consider improving the accuracy of the TypeScript type definitions to better match post-validation data structures for enhanced type safety.
1c19613 to
3c8e39a
Compare
|
/gemini review |
3c8e39a to
ad0eaf0
Compare
There was a problem hiding this 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 support for remote agents and multi-agent TOML files, which is a great enhancement. The implementation is well-structured with clear separation of concerns using new types and Zod schemas for validation. The accompanying tests are thorough and cover the new functionality well. I have one suggestion to improve the robustness of the TOML parsing logic for single-agent files to make it more user-friendly. Additionally, there's a minor discrepancy in the pull request description regarding the TOML key for multi-agent files ([[agents]] vs. [[remote_agents]] in code), which might be worth clarifying.
ad0eaf0 to
e34a0b4
Compare
|
/gemini review |
There was a problem hiding this 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 excellent new functionality for defining remote agents and multiple agents within a single TOML file. The implementation is robust, leveraging Zod for schema validation and providing clear error messages. The accompanying tests are thorough and cover the new features and edge cases well. I have one suggestion to improve the maintainability of the error formatting logic to make it more resilient to future refactoring.
e34a0b4 to
b4c6a61
Compare
Summary
This PR enables the discovery and registration of remote agents (via A2A) defined in TOML files. It also introduces support for defining multiple remote agents within a single TOML file using the
[[remote_agents]]array syntax.Details
one file.
Related Issues
Fixes: #15094
How to Validate
"experimental": { "enableAgents": true }in your settings.jsonto .gemini/agents/remote-agent-example.toml
AgentRegistry] Registered remote agent 'remote-tester'...appears in debug consolePre-Merge Checklist