Inspiration
As frontend developers, we lose hours every week constantly context-switching to fix minor UI bugs. But there is a second, hidden problem that is much worse. When we rush interactive web application fixes, we often introduce bloated React components, heavy DOM manipulations, and unnecessary state re-renders.
This technical debt leads to excessive mobile battery drain, poor client-side performance, and lower Core Web Vitals scores. This negatively impacts user retention and makes monetization and AdSense approvals incredibly difficult. We wanted to build a tool that solves both problems simultaneously: eliminating the context switch for developers while acting as a strict gatekeeper for Green Software Engineering standards.
What it does
The Green Cloud Auto-Resolver is an autonomous GitLab Duo AI Agent that acts as a Senior Green Software Engineer.
When a UI bug is reported, a developer simply tags the agent in the issue comments. The agent autonomously reads the bug, generates a highly optimized React and CSS code fix, and then evaluates that exact code for energy efficiency. It audits the solution for CPU bottlenecks, GPU acceleration, memory footprint, and mobile battery drain. Finally, it posts the optimized code alongside a comprehensive "Green Performance Report" directly into the issue comments, ready for review.
How we built it
We orchestrated the core reasoning and issue reading using the GitLab Duo Agent Platform via custom YAML flows.
To hit the Google Cloud prize track, we needed the agent to audit code using enterprise AI models. However, committing a Google Cloud JSON key to a public hackathon repository is a critical security risk. To solve this, we built a secure middleware proxy using Node.js and Express, hosted on a Vercel Serverless API. We stored our Google Cloud credentials securely within Vercel's environment variables.
Our GitLab agent sends the generated code to the Vercel proxy, which securely queries Google Cloud Vertex AI to generate the Green Report, completely isolating our secure infrastructure from the public codebase.
Challenges we ran into
Building on a beta platform meant hitting strict enterprise security constraints.
First, we discovered that GitLab's automated security scanner actively masks email addresses. When we tried to pass the issue email to give the AI context, the scanner corrupted the string, breaking our flow. We engineered a data-parsing workaround by feeding the agent a partial "routing string" instead. The AI was instructed to parse the exact Project ID from this string and dynamically grab the Issue ID from the native runtime context, bypassing the security filter entirely.
Second, we ran into an air-gapped sandbox limitation where the GitLab runner blocked external network calls for package installations. We had to dynamically rewrite our agent's flow configuration to bypass external dependencies and rely purely on native capabilities and our secure proxy endpoint.
Accomplishments that we're proud of
We are incredibly proud of successfully engineering around strict beta-environment limitations. We managed to bridge the GitLab Duo Agent Platform directly to Google Cloud Vertex AI without compromising repository security. Seeing the agent consistently output an A+ Green Performance score and accurately explain its DOM optimizations proved that our architecture works exactly as intended.
What we learned
We gained a deep understanding of the Model Context Protocol and how to orchestrate AI agents using YAML configurations. We also learned how to build secure serverless middleware to proxy LLM requests, and we vastly improved our prompt engineering skills by forcing the agent to dynamically extract context variables when native environment variables were locked down.
What's next for Green Cloud Auto-Resolver
The next step is upgrading this into a true multi-agent orchestration pipeline. We plan to split the workflow into three distinct agents: an Implementer that writes the code, a Green Auditor that runs the Vertex AI performance check, and a Security Sentinel that checks for XSS vulnerabilities.
We also plan to expand the agent's capabilities beyond UI fixes to full-stack bottlenecks, training it to analyze JavaScript logic for algorithmic time complexity and optimize database querying strategies to further reduce cloud compute energy consumption.
Built With
- express.js
- gitlab-duo
- google-cloud
- node.js
- vercel
- vertex-ai
Log in or sign up for Devpost to join the conversation.