<?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: Mhad2021</title>
    <description>The latest articles on DEV Community by Mhad2021 (@mhad2021).</description>
    <link>https://dev.to/mhad2021</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%2F4083765%2F8527bfc5-9fe8-4936-ab80-b87ee6b86fb9.png</url>
      <title>DEV Community: Mhad2021</title>
      <link>https://dev.to/mhad2021</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mhad2021"/>
    <language>en</language>
    <item>
      <title>We let an autonomous agent spend real money for a week. The first thing I added wasn't a feature — it was a spending firewall.</title>
      <dc:creator>Mhad2021</dc:creator>
      <pubDate>Tue, 18 Aug 2026 18:17:16 +0000</pubDate>
      <link>https://dev.to/mhad2021/we-let-an-autonomous-agent-spend-real-money-for-a-week-the-first-thing-i-added-wasnt-a-feature--3a5</link>
      <guid>https://dev.to/mhad2021/we-let-an-autonomous-agent-spend-real-money-for-a-week-the-first-thing-i-added-wasnt-a-feature--3a5</guid>
      <description>&lt;p&gt;I kept giving agents real API keys and budgets, and the scary part was never a bad answer — it was a retry loop or a prompt injection quietly spending money while I wasn't watching.&lt;/p&gt;

&lt;p&gt;So I wrote a small guard you wrap around any spend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hard caps per action / day / lifetime (checked against a ledger, so a restart can't reset them)&lt;/li&gt;
&lt;li&gt;an allowlist where empty means nobody&lt;/li&gt;
&lt;li&gt;a kill switch that fails closed&lt;/li&gt;
&lt;li&gt;a blast-radius cap for the "pointed it at the wrong wallet" case&lt;/li&gt;
&lt;li&gt;an append-only ledger you can verify&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It got prompt-injected in testing and spent $0.&lt;/p&gt;

&lt;p&gt;One file, zero deps, MIT: &lt;a href="https://github.com/Mhad2021/agent-spendguard" rel="noopener noreferrer"&gt;https://github.com/Mhad2021/agent-spendguard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also built a free Monte-Carlo "runway simulator" to answer how much capital a self-funding agent needs before it breaks even: &lt;a href="https://claude.ai/code/artifact/ebeaa8b2-16eb-400a-8100-5e96c17fd922" rel="noopener noreferrer"&gt;https://claude.ai/code/artifact/ebeaa8b2-16eb-400a-8100-5e96c17fd922&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How are you all handling runaway spend on autonomous agents? Curious what people do beyond a hard token cap.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>opensource</category>
      <category>security</category>
    </item>
    <item>
      <title>I let an autonomous agent spend real money for a week. The first thing I added wasn't a feature — it was a spending firewall.</title>
      <dc:creator>Mhad2021</dc:creator>
      <pubDate>Tue, 18 Aug 2026 18:15:34 +0000</pubDate>
      <link>https://dev.to/mhad2021/i-let-an-autonomous-agent-spend-real-money-for-a-week-the-first-thing-i-added-wasnt-a-feature--2o33</link>
      <guid>https://dev.to/mhad2021/i-let-an-autonomous-agent-spend-real-money-for-a-week-the-first-thing-i-added-wasnt-a-feature--2o33</guid>
      <description></description>
    </item>
  </channel>
</rss>
