feat: add AG2 multi-agent template with A2A protocol support#870
feat: add AG2 multi-agent template with A2A protocol support#870VasiliyRad wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
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. |
Summary of ChangesHello, 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 Starter Pack by integrating a new multi-agent template built on the popular AG2 framework. The core purpose is to streamline the process of deploying sophisticated AG2-powered agents to Google Cloud Platform. It establishes a robust collaborative system where distinct agents, such as an architect, coder, and reviewer, work in concert, intelligently passing tasks between them. This integration also ensures that these agents are accessible and interoperable through the A2A protocol, providing a standardized way for agents to communicate. Highlights
Changelog
Activity
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 a new ag2 agent template, which is a valuable addition supporting multi-agent collaboration with the A2A protocol, including agent definitions, A2A server setup, tests, and documentation. However, a critical Denial of Service (DoS) vulnerability has been identified in the /run endpoint of the FastAPI application templates for both cloud_run and gke deployment targets. The max_rounds parameter, which controls conversation depth, is not validated against an upper bound, potentially allowing an attacker to trigger long-running processes that consume excessive LLM tokens and server resources. It is strongly recommended to enforce a reasonable limit on this parameter. Additionally, there is a high-severity issue regarding an incorrect telemetry setup that will cause problems for the ag2 agent, and a medium-severity suggestion to improve the new /run API endpoint by defining a Pydantic response model to enhance API documentation and validation.
|
@elia-secchi here's the PR referenced in our email correspondence |
Why
Agent Starter Pack currently supports ADK and LangGraph. AG2 is one of the most commonly used AI Agent framework with a developer community of over 20k+ people and around 400k monthly downloads. Template makes it easier to deploy AG2 based agent to GCP.
Summary
ag2agent template with three specialized agents (architect, coder, reviewer) collaborating via AG2'sDefaultPatternwithStringLLMConditionhandoffsA2aAgentServerPOST /runendpoint triggers the full pipeline viainitiate_group_chat()cloud_run,gke, andnonedeployment targets