<?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: Savanth JR</title>
    <description>The latest articles on DEV Community by Savanth JR (@savislost).</description>
    <link>https://dev.to/savislost</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%2F4101506%2F1138d7d2-36a6-441a-a40c-2a2f7ad927ad.jpg</url>
      <title>DEV Community: Savanth JR</title>
      <link>https://dev.to/savislost</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/savislost"/>
    <language>en</language>
    <item>
      <title>How I Built an AI Agent That Doesn't Break Production (Thanks to TrueForge &amp; Qodo)</title>
      <dc:creator>Savanth JR</dc:creator>
      <pubDate>Sun, 30 Aug 2026 14:51:30 +0000</pubDate>
      <link>https://dev.to/savislost/how-i-built-an-ai-agent-that-doesnt-break-production-thanks-to-trueforge-qodo-5dn6</link>
      <guid>https://dev.to/savislost/how-i-built-an-ai-agent-that-doesnt-break-production-thanks-to-trueforge-qodo-5dn6</guid>
      <description>&lt;p&gt;Let’s be real for a second: autonomous AI agents are incredible, but giving them direct write access to your live production environment is terrifying.&lt;/p&gt;

&lt;p&gt;For the Agent Harness Hackathon, I wanted to build an AI marketing assistant that could verify campaign links, shorten them, and update a live production endpoint. But I also wanted to sleep at night knowing a hallucinating bot wouldn't wipe out a live ad campaign.&lt;/p&gt;

&lt;p&gt;Enter CampaignGuard—a sandboxed AI agent with a strict Human-in-the-Loop (HITL) safety gate.&lt;/p&gt;

&lt;p&gt;Here is a look at what I built, the tech stack, and the very real bumps I hit along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is CampaignGuard?&lt;/strong&gt;**
&lt;/h2&gt;

&lt;p&gt;CampaignGuard is designed to prevent broken ad funnels and unauthorized production overwrites.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Brains&lt;/strong&gt;: Powered by Gemini Flash to understand natural language prompts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**The Sandbox**: It runs a custom Python tool (link_manager.py) inside TrueForge to check URL health and generate short links.
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**The Target**: It updates a live public GitHub Gist via REST API (acting as the live campaign config endpoint).
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**The Guardrail**: Before it executes the irreversible Gist overwrite, TrueForge pauses the agent and forces me to click "Approve".
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The "Bumps in the Road" (aka Reality)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Building this wasn't just a smooth copy-paste journey. Here are a few walls I ran into and how I fixed them:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&lt;strong&gt;The Localhost Trap&lt;/strong&gt;: I originally tried spinning up TrueForge natively in Windows Git Bash, only to be met with a wall of ESM loader errors. Lesson learned: TrueForge's sandbox strongly prefers Linux. I quickly switched over to WSL (Ubuntu), and it purred like a kitten.

&lt;p&gt;&lt;strong&gt;The "Lazy" Agent Hallucination&lt;/strong&gt;: At first, when I asked the agent to update the Gist, it just confidently replied, "The live update has been successfully executed!"... without actually running the Python script. I had to aggressively update my TrueForge System Prompt to force the agent to run the explicit python3 -c command in the sandbox rather than just pretending it did.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Classic Typo&lt;/strong&gt;: While manually testing my GitHub API tokens in the terminal, I wrapped my token in literal angle brackets &amp;lt;ghp_...&amp;gt;, resulting in a frustrating 401 Bad credentials error until I realized what I had done.&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;strong&gt;Qodo to the Rescue&lt;/strong&gt;&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;As part of the hackathon, we ran our pull requests through Qodo for automated code review, and it legitimately saved my API integration.&lt;/p&gt;

&lt;p&gt;I deliberately used the standard Python urllib library to keep my sandbox footprint zero-dependency. However, when I wrote the PATCH request for the GitHub API, I missed a crucial detail. Qodo instantly flagged a High Severity Bug: I forgot the Content-Type: application/json header. Without it, urllib defaults to form-urlencoded, and GitHub would have rejected the payload entirely.&lt;/p&gt;

&lt;p&gt;It also caught a broken test import where my test suite was still looking for a deleted mock function. Fixing these right in the PR made the final merge bulletproof.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The "Aha!" Moment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The best part of this build was seeing the TrueForge safety gate work in real-time. Typing in a prompt, watching the agent test the URL in isolation, and then seeing the system physically halt and throw up a warning—"⚠️ WARNING: This will overwrite the live production Gist"—was incredibly satisfying. It bridges the gap between fast AI automation and actual enterprise safety.&lt;/p&gt;

&lt;p&gt;Explore my Repo: &lt;a href="https://github.com/savislost/CampaignGuard" rel="noopener noreferrer"&gt;https://github.com/savislost/CampaignGuard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you guys tried putting explicit human approval gates in your AI workflows yet? What are you using to sandbox your agents? Let me know in the comments!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
