<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Raghu Putta</title>
    <description>The latest articles on DEV Community by Raghu Putta (@raghu_putta_1e4490f2e9648).</description>
    <link>https://dev.to/raghu_putta_1e4490f2e9648</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4013950%2F87b2534e-8bd4-430f-bb02-9eec4ab58cd2.jpeg</url>
      <title>DEV Community: Raghu Putta</title>
      <link>https://dev.to/raghu_putta_1e4490f2e9648</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raghu_putta_1e4490f2e9648"/>
    <language>en</language>
    <item>
      <title>I Built an AI Tool That Finds Wasted Cloud Spending — And Its Carbon Footprint. Published: True</title>
      <dc:creator>Raghu Putta</dc:creator>
      <pubDate>Fri, 03 Jul 2026 18:40:03 +0000</pubDate>
      <link>https://dev.to/raghu_putta_1e4490f2e9648/i-built-an-ai-tool-that-finds-wasted-cloud-spending-and-its-carbon-footprintpublished-true-3p95</link>
      <guid>https://dev.to/raghu_putta_1e4490f2e9648/i-built-an-ai-tool-that-finds-wasted-cloud-spending-and-its-carbon-footprintpublished-true-3p95</guid>
      <description>&lt;p&gt;The difficulty&lt;/p&gt;

&lt;p&gt;If you’re using Google Cloud, you’re probably paying for stuff you don’t need anymore—a server someone forgot to turn off, a storage disk someone forgot to delete, &lt;/p&gt;

&lt;p&gt;or an IP address someone forgot to release. "That waste is costing us money." It consumes electricity. It generates carbon emissions. Almost nobody tracks those alongside the cost.&lt;/p&gt;

&lt;p&gt;I wanted a tool that could find both problems simultaneously, without me having to think. So I made one.&lt;/p&gt;

&lt;p&gt;Live demo: &lt;a href="https://greenops-dashboard-845589445410.us-central1.run.app/" rel="noopener noreferrer"&gt;https://greenops-dashboard-845589445410.us-central1.run.app/&lt;/a&gt;&lt;br&gt;
Code: &lt;a href="https://github.com/raghu-putta/greenops-agent" rel="noopener noreferrer"&gt;https://github.com/raghu-putta/greenops-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How it works: 4 AI agents in a row&lt;/p&gt;

&lt;p&gt;Imagine an assembly line in which each worker has only one job:&lt;/p&gt;

&lt;p&gt;Carbon Scout scans your Google Cloud project and reports on everything that looks like it might be unused or forgotten—idle servers, unattached storage disks, and unused reserved IP addresses.&lt;br&gt;
GreenOps Analyzer takes that list and adds two numbers to each item: how much it’s costing you in dollars, and how much it’s costing the planet in carbon emissions.&lt;/p&gt;

&lt;p&gt;Optimization Executor takes each finding and makes it an action: stop this server, delete this disk, release this address. It shows you the plan first; it only changes if you say go.&lt;br&gt;
Report Generator rolls up the entire run into a downloadable report so you (or your boss or your sustainability team) have something nice to look at.&lt;/p&gt;

&lt;p&gt;Powered by: FastAPI (the web framework), Google’s Agent Development Kit (a library for building AI agents), Gemini 2.5 Pro (the AI model doing the reasoning), and Google Cloud Run (where it’s all running).&lt;/p&gt;

&lt;p&gt;The “bug” that was not a bug:&lt;br&gt;
The dashboard has a terminal-style live window that shows you what each agent is doing in real time, using a technique called Server-Sent Events (basically, the server streams updates to your browser one at a time instead of making you refresh).&lt;/p&gt;

&lt;p&gt;And then at some point that window just stopped showing anything. Nothing. My backend logs told me that the updates were still being sent, so the data was leaving the server just fine. I spent time looking at the frontend code, adding debug logs, and looking at the network tab in the browser, thinking I wrote something wrong.&lt;/p&gt;

&lt;p&gt;The actual issue: Google Cloud Run has a default timeout on how long it will keep a connection open, and my agent runs were exceeding that timeout. The connection was getting dropped midstream—not for a code bug, but for a platform setting. The workaround was a single line in my deployment command, telling Cloud Run to allow longer-running connections and to keep at least one instance warm so there isn’t a cold-start delay:&lt;/p&gt;

&lt;p&gt;bashgcloud run deploy greenops-dashboard \&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;timeout 3600 \
--min-instances 1 \
--allow-unauthenticated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Moral of the story: If you have a real-time feature that just breaks and your server logs tell you everything is fine, check the connection time limits of your hosting platform before you assume it's your code.&lt;/p&gt;

&lt;p&gt;How you can use your Google Cloud credentials&lt;/p&gt;

&lt;p&gt;This tool needs access to scan your Google Cloud project and requires your credentials. I didn’t really want to build something that’s just “trust us with your login” as the security model. Here’s the real flow:&lt;/p&gt;

&lt;p&gt;Credentials are typed into the browser and are only stored in temporary browser memory, never permanently saved on your device&lt;br&gt;
They are sent over a secure (HTTPS) connection for one scan&lt;br&gt;
The server keeps them in memory only—never written to file, never stored in a database&lt;br&gt;
They vanish instantly after the scan is finished. No leftovers and the system will not allow a credential to be used for a second run&lt;/p&gt;

&lt;p&gt;I looked at three ways to handle this and chose the simplest one that's still easy to audit for now with a plan to eventually replace it with a proper "Sign in with Google" flow so nobody has to type in raw credentials at all.&lt;/p&gt;

&lt;p&gt;What's next?&lt;/p&gt;

&lt;p&gt;Giving the AI more background context to refer to before it answers (I'm still weighing up whether the increased accuracy is worth the extra monthly cost)&lt;br&gt;
Add “Sign in with Google” so you never have to worry about handling credentials.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fenjzpbdiywtj90qbyq40.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fenjzpbdiywtj90qbyq40.png" alt=" " width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give it a try yourself&lt;/p&gt;

&lt;p&gt;Dashboard: &lt;a href="https://greenops-dashboard-845589445410.us-central1.run.app/" rel="noopener noreferrer"&gt;https://greenops-dashboard-845589445410.us-central1.run.app/&lt;/a&gt;&lt;br&gt;
Code: &lt;a href="https://github.com/raghu-putta/greenops-agent" rel="noopener noreferrer"&gt;https://github.com/raghu-putta/greenops-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re building similar tools around cloud cost or sustainability, I’d love to compare notes in the comments. &lt;/p&gt;

</description>
      <category>python</category>
      <category>gcp</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
