<?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: Jahnavi Puppala</title>
    <description>The latest articles on DEV Community by Jahnavi Puppala (@jahnavipuppala).</description>
    <link>https://dev.to/jahnavipuppala</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%2F4088026%2F1589fd10-e900-4dfd-ba74-cf7952731801.jpg</url>
      <title>DEV Community: Jahnavi Puppala</title>
      <link>https://dev.to/jahnavipuppala</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jahnavipuppala"/>
    <language>en</language>
    <item>
      <title>How I Built a Personal AI Assistant for Cloud Run (Coffee Shop Edition)</title>
      <dc:creator>Jahnavi Puppala</dc:creator>
      <pubDate>Fri, 21 Aug 2026 10:08:11 +0000</pubDate>
      <link>https://dev.to/jahnavipuppala/how-i-built-a-personal-ai-assistant-for-cloud-run-coffee-shop-edition-46gn</link>
      <guid>https://dev.to/jahnavipuppala/how-i-built-a-personal-ai-assistant-for-cloud-run-coffee-shop-edition-46gn</guid>
      <description>&lt;p&gt;If you have ever tried to run an AI agent that executes real code, you know the biggest headache: security. Letting an LLM write and run custom scripts on the fly is powerful, but running untrusted code on your system can be risky.&lt;/p&gt;

&lt;p&gt;As part of a recent hands-on project, I built a personal AI assistant hosted on Google Cloud Run that solves this problem using Cloud Run sandboxes. Here is how it works, what I built, and what I learned along the way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Scenario: Managing the Graduation Rush&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To make things practical, the project centers on a real-world problem: a coffee shop manager in a college town preparing for a massive graduation weekend.&lt;/p&gt;

&lt;p&gt;The assistant's job is to analyze raw Point-of-Sale (POS) data stored in Google Sheets—looking at metrics like drink complexity, pastry sales, and cashier wait times—and cross-reference it with the ceremony schedule to find operational bottlenecks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How the Tech Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The assistant isn't just generating text; it dynamically writes Python scripts to process data and update operational tasks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud Run Sandboxes:&lt;/strong&gt; Instead of running generated code directly on the host server, the app uses Cloud Run’s isolated sandbox environment (/usr/local/gcp/bin/sandbox). This gives the agent a secure, lightning-fast playground to run Python scripts safely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Local vs. Cloud Execution:&lt;/strong&gt; To keep development seamless, the application automatically detects its environment. It runs scripts directly on the terminal during local testing, and switches to the containerized sandbox binary once deployed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Agent Development Kit (ADK) &amp;amp; Gemini:&lt;/strong&gt; Built using FastAPI and google-adk, the agent interfaces with Gemini on Vertex AI to generate insights and ask for approval before writing TODOs back to Google Sheets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live Chat UI:&lt;/strong&gt; Built with WebSockets, allowing real-time interaction directly with the background agent.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Setting Up Access &amp;amp; Permissions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Security was a major focus. Rather than giving open access, I set up a dedicated service account (coffee-shop-agent-sa).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IAM Roles:&lt;/strong&gt; Granted roles/aiplatform.user so the agent could interact with Gemini APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Impersonation:&lt;/strong&gt; Used roles/iam.serviceAccountTokenCreator to allow local testing through service account impersonation without leaking static credentials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sheet Integration:&lt;/strong&gt; Shared the target Google Sheet directly with the service account email as an Editor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxing is Essential for Code Execution:&lt;/strong&gt; Letting an AI agent run code in production sounds scary, but isolated sandboxes make it practical and secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-Loop Design:&lt;/strong&gt; Having the agent ping the user for permission before modifying live spreadsheet data keeps things under control.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>cloud</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
