<?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>Forem: Patrick Hughes</title>
    <description>The latest articles on Forem by Patrick Hughes (@pat9000).</description>
    <link>https://forem.com/pat9000</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3763138%2Fa7736e79-1b96-4f55-a9f7-9ddd8775eb09.jpg</url>
      <title>Forem: Patrick Hughes</title>
      <link>https://forem.com/pat9000</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pat9000"/>
    <language>en</language>
    <item>
      <title>The AI Whirlwind: Why Your Local Agent Matters More Than Ever</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Fri, 22 May 2026 14:45:07 +0000</pubDate>
      <link>https://forem.com/pat9000/the-ai-whirlwind-why-your-local-agent-matters-more-than-ever-3674</link>
      <guid>https://forem.com/pat9000/the-ai-whirlwind-why-your-local-agent-matters-more-than-ever-3674</guid>
      <description>&lt;h1&gt;
  
  
  The AI Whirlwind: Why Your Local Agent Matters More Than Ever
&lt;/h1&gt;

&lt;p&gt;The air is thick with talk of AI. Nvidia's profit hits an astounding $58.3 billion, and giants like OpenAI and SpaceX are reportedly eyeing IPOs. These headlines signal a gold rush, a furious pace of development driven by immense capital. But for us, the engineers building intelligent agents for real-world automation, these grand pronouncements mean something deeper. They point to a crossroads: a future dominated by a few, or an opportunity for us to build something fundamentally different -- AI agents that truly serve users on their own devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond the Hype: The Trust Deficit and Data Ethics
&lt;/h2&gt;

&lt;p&gt;Google's supposed "Antigravity" moment, often viewed as a "bait and switch," highlights a persistent challenge: the gap between grand AI promises and the opaque reality of centralized systems. For many, trusting a black-box AI operated by a distant entity remains difficult. This skepticism isn't unfounded.&lt;/p&gt;

&lt;p&gt;Consider the growing discussion around whether "AI is just unauthorised plagiarism at a bigger scale." This accusation cuts to the core of trust and intellectual property. When large models are trained on vast, often unverified, datasets, how can we guarantee ethical outputs from our own agents? This isn't just a legal or philosophical issue; it's an engineering responsibility.&lt;/p&gt;

&lt;p&gt;For developers building local AI agents, data provenance is paramount. We cannot rely on the same 'train on everything' approach. This means a shift towards smaller, more curated datasets, with a focus on explicit consent and ethical sourcing. It demands more intentional data collection, synthesis, or fine-tuning on domain-specific, verified data, not just indiscriminate scraping. This controlled environment on local hardware gives us, and our users, much-needed visibility and control over the data an agent processes and learns from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigating the Regulatory Current: Policy, Jobs, and Transparency
&lt;/h2&gt;

&lt;p&gt;The world is catching up to AI's impact. Recent news of Governor Gavin Newsom's executive order aimed at AI job loss and former President Trump's plans for AI model oversight underscore a societal awakening to the implications of AI. Concerns range from economic disruption to the broader societal impact of opaque AI systems.&lt;/p&gt;

&lt;p&gt;This is where the local AI agent truly shines. When an agent operates entirely on a user's hardware, its actions are inherently more transparent and auditable to that user. There's no remote server making unseen decisions, no cloud provider potentially accessing private data. This personal ownership offers a path to more accountable and trustworthy AI implementations, directly addressing some of the regulatory fears around uncontrollable, centralized AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python 3.15: Your Workbench for Autonomy
&lt;/h2&gt;

&lt;p&gt;While headlines fixate on billion-dollar chip foundries and cloud compute, we're focused on the developer's workbench. Python 3.15, with its less-heralded features, continues to provide incremental improvements that are highly significant for local agent performance and reliability.&lt;/p&gt;

&lt;p&gt;Updates to the type system, for example, improve code clarity and reduce runtime errors, which is critical when building complex, autonomous systems. Performance enhancements, even minor ones, translate directly into better responsiveness and lower power consumption for agents running on consumer hardware.&lt;/p&gt;

&lt;p&gt;Consider how meticulous typing and asynchronous programming aid in creating dependable, efficient agents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TypedDict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Literal&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AgentTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TypedDict&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Literal&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;process_data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;notify_user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;AgentTask&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Simulate a task running locally on consumer hardware
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; starting &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Small delay to simulate computation/I/O
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;process_data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Perform local data processing (e.g., image resize, text analysis)
&lt;/span&gt;        &lt;span class="n"&gt;result_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;payload&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Processed data for &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. Payload size: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result_size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; bytes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;notify_user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Trigger a local notification or update a UI element
&lt;/span&gt;        &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;payload&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;status update&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Notified user for &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; about: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; finished &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;tasks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="nc"&gt;AgentTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;analytics_agent_01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;process_data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;log_file&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sensor_data.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;lines&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1200&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="nc"&gt;AgentTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;notifier_agent_02&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;notify_user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Daily report generated&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="nc"&gt;AgentTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data_cleaner_03&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;process_data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;database_entry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cleanup_needed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;records&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gather&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;execute_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using &lt;code&gt;TypedDict&lt;/code&gt; and &lt;code&gt;Literal&lt;/code&gt; (features that have evolved in recent Python versions and continue to improve) ensures that our agent tasks are well-defined and less prone to errors. &lt;code&gt;asyncio&lt;/code&gt; allows multiple agent sub-tasks to run concurrently on limited hardware, making efficient use of available resources without needing complex multiprocessing setups. These are the practical considerations that empower us to build truly reliable and efficient agents for local deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Community Engine: Learning from Flipper One's Journey
&lt;/h2&gt;

&lt;p&gt;The Flipper Zero community's recent call for help to bring Flipper One to life illustrates the spirit of open collaboration necessary for pushing hardware-bound projects forward. Building AI agents for diverse consumer hardware faces similar challenges: optimizing models for different chipsets, managing varied memory footprints, and engineering for low-power operation.&lt;/p&gt;

&lt;p&gt;This reminds us that building truly useful, localized agents isn't a solo endeavor. Sharing strategies for model quantization, efficient inference engines, and creative data handling within our community is essential. It's how we collectively advance the state of practical, personal AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Path Forward: True Agent Autonomy
&lt;/h2&gt;

&lt;p&gt;The financial might of Nvidia and the IPO ambitions of OpenAI show the scale of the AI ambition. But they don't dictate the &lt;em&gt;only&lt;/em&gt; path. Our path, building agents on personal hardware, is about user empowerment.&lt;/p&gt;

&lt;p&gt;It's about creating automated workflows that respect privacy, ensure data control, and operate reliably without external dependency. This is crucial for automation that truly serves the individual, fostering autonomy over our digital lives.&lt;/p&gt;

&lt;p&gt;Want to ensure your agents run with integrity and control? Explore tools designed for ethical and efficient agent development. Check out &lt;a href="https://dev.to/tools/agentguard"&gt;AgentGuard&lt;/a&gt; for resources that support transparent and user-centric automation.&lt;/p&gt;

&lt;p&gt;The AI world is in flux. While the big players chase valuations, we continue to build, focusing on accountability, user control, and practical engineering. The future of AI is not just about raw power; it's about principled autonomy, starting right on your desktop, smartphone, or any consumer device you control.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>localai</category>
      <category>automation</category>
      <category>python</category>
    </item>
    <item>
      <title>Designing for Agency: Building Trustworthy AI Agents in a Shifting World</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Thu, 21 May 2026 14:45:12 +0000</pubDate>
      <link>https://forem.com/pat9000/designing-for-agency-building-trustworthy-ai-agents-in-a-shifting-world-26ki</link>
      <guid>https://forem.com/pat9000/designing-for-agency-building-trustworthy-ai-agents-in-a-shifting-world-26ki</guid>
      <description>&lt;h1&gt;
  
  
  Designing for Agency: Building Trustworthy AI Agents in a Shifting World
&lt;/h1&gt;

&lt;p&gt;The air around AI development feels particularly charged right now. We're in what many are calling the "Long Hot A.I. Summer" - a period marked by intense innovation, significant investment, but also considerable turbulence. Recent news cycles have underscored this, from high-stakes legal clashes between industry titans like Elon Musk and OpenAI, to major companies like Meta reassigning thousands of employees to double down on AI initiatives. It's a clear signal: AI is no longer a niche; it's central to the future.&lt;/p&gt;

&lt;p&gt;But amidst this whirlwind of competition and corporate maneuvering, a more fundamental question arises for us, the developers building agents on consumer hardware: How do we ensure our AI creations remain reliable, ethical, and, most importantly, &lt;em&gt;trustworthy&lt;/em&gt;? How do we design for user agency in a world that often seems to prioritize growth above all else?&lt;/p&gt;

&lt;p&gt;This isn't just about building smarter algorithms; it's about building agents that respect users, protect their data, and adapt to their needs without hidden agendas. Let's unpack some recent events and draw practical lessons for our agent development practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shutterstock Settlement: A Warning on User Control
&lt;/h2&gt;

&lt;p&gt;The recent news about Shutterstock paying $35 million to settle FTC allegations over hard-to-cancel subscriptions offers a potent reminder for anyone building automated systems. It highlights a critical point: &lt;strong&gt;user control is paramount.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;When we develop AI agents, it's easy to focus on efficiency and automation. But what happens when an agent, designed to automate a task, becomes difficult to stop, modify, or even understand? This is a digital dark pattern in agent form. For agents operating on your personal hardware, this translates directly to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Clear "Off" Switches:&lt;/strong&gt; Agents should have easily accessible, unambiguous methods for pausing, stopping, or uninstalling. No hidden menus, no multi-step confirmation loops. It should be as simple as a single click, reminiscent of the clarity &lt;code&gt;clickclickclick.click&lt;/code&gt; advocates for user interaction.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Transparent State and Actions:&lt;/strong&gt; An agent shouldn't be a black box. Users need to understand what the agent is doing, why it's doing it, and what its current status is. This might mean detailed logs, clear UI indicators, or even plain language explanations of its reasoning.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Easy Configuration:&lt;/strong&gt; Changing an agent's parameters or objectives should be straightforward. If an agent is designed to manage your photos, changing its upload frequency or privacy settings shouldn't require an advanced degree.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Practical Tip:&lt;/em&gt; When designing your agent's interface, ask yourself: "Could a non-technical user quickly and easily revoke all permissions or change its primary objective?" If the answer is no, revisit your design.&lt;/p&gt;

&lt;h2&gt;
  
  
  The FBI and License Plate Readers: Guarding Against Data Overreach
&lt;/h2&gt;

&lt;p&gt;The news that the FBI wants to buy nationwide access to license plate readers raises significant privacy concerns. For AI agent developers, this serves as a powerful cautionary tale about data collection and privacy.&lt;/p&gt;

&lt;p&gt;While we build agents primarily for personal use on consumer hardware, the principles remain the same: &lt;strong&gt;minimize data collection and maximize privacy.&lt;/strong&gt; Our agents often interact with sensitive personal data - financial information, schedules, communication patterns. &lt;/p&gt;

&lt;p&gt;Here's how to build agents with privacy in mind:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;"Privacy by Design" Principle:&lt;/strong&gt; From the very first line of code, consider data privacy. Only collect data absolutely necessary for the agent's function. If an agent manages your calendar, it likely doesn't need access to your microphone.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Local First:&lt;/strong&gt; One of the biggest advantages of developing agents for consumer hardware is the ability to keep data &lt;em&gt;local&lt;/em&gt;. Emphasize this. Processing data on-device reduces the risk of third-party breaches or government requests for data.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Explicit Consent for External Calls:&lt;/strong&gt; If your agent &lt;em&gt;must&lt;/em&gt; communicate with an external API or service (e.g., for real-time information), ensure the user gives explicit, informed consent for that specific data exchange. They should know what data is leaving their device and why.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Code Insight:&lt;/em&gt; Consider data flow diagrams during your agent's design phase. Visually map out where data originates, where it's stored, and where it's transmitted. This helps identify potential privacy weak points.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI Encyclical: Ethical Foundations for Agent Behavior
&lt;/h2&gt;

&lt;p&gt;The upcoming presentation of an AI encyclical by Anthropic's co-founder alongside Pope Leo XIV might seem far removed from practical engineering. However, it signifies a growing global discourse around the ethical implications of AI. This isn't just for large language models; it applies to every agent we build, no matter how small.&lt;/p&gt;

&lt;p&gt;Ethical considerations translate to practical design choices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Fairness and Bias:&lt;/strong&gt; Are your agents making decisions that could inadvertently discriminate? Even simple automation scripts can inherit biases from the data they're trained on or the rules they're given. Regularly audit your agent's outputs for unintended consequences.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Accountability:&lt;/strong&gt; If an agent makes a mistake, who is responsible? Designing agents with clear logging, explainable decision paths, and the ability to revert actions makes accountability easier to establish.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Beneficence:&lt;/strong&gt; Does your agent genuinely serve the user's best interest? Or is it subtly nudging them towards actions that benefit something else?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Engineering for the Unforeseen: Adaptability with Lisp Principles
&lt;/h2&gt;

&lt;p&gt;The ongoing volatility in the AI industry - the constant shifts, the rapid pace of development - demands agents that are not just smart, but also highly &lt;em&gt;adaptable&lt;/em&gt;. This is where principles from languages like Lisp, highlighted by Hyperpolyglot's deep dive into Common Lisp, Racket, Clojure, and Emacs Lisp, become particularly relevant.&lt;/p&gt;

&lt;p&gt;Lisp's power lies in its metaprogramming capabilities and its emphasis on symbolic computation, making it incredibly flexible. While you might not be writing your entire agent in Clojure, the &lt;em&gt;philosophy&lt;/em&gt; of building highly introspectable, modifiable, and extensible systems is invaluable.&lt;/p&gt;

&lt;p&gt;How do we apply this to our agents on consumer hardware?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Modular Design:&lt;/strong&gt; Break your agent into small, independent modules. This makes it easier to update, replace, or reconfigure specific components without bringing down the whole system. Imagine swapping out a 'planning' module without touching the 'perception' module.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Clear State Management:&lt;/strong&gt; Define your agent's internal state clearly and make it observable. When something goes wrong, you want to easily inspect &lt;em&gt;why&lt;/em&gt; the agent made a particular decision. This means avoiding deeply nested, opaque logic.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Configuration over Code:&lt;/strong&gt; Whenever possible, allow behavior to be modified via configuration files or user-defined rules rather than requiring code changes. This empowers users to adapt the agent to their specific needs without needing to be a programmer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Code Sketch (Conceptual Python example, reflecting Lisp's modifiability spirit):&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Instead of hardcoding behavior
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_email_legacy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;urgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;send_notification&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;High priority email!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# ... more complex, hardcoded rules
&lt;/span&gt;
&lt;span class="c1"&gt;# Design for configuration and extensibility
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EmailAgentRule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;condition_func&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action_func&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;condition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;condition_func&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;action_func&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_subject_urgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;urgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;notify_high_priority&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent: High priority email from &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;archive_and_label&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent: Archiving and labeling email from &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# User-defined rules can be loaded dynamically
&lt;/span&gt;&lt;span class="n"&gt;email_rules&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nc"&gt;EmailAgentRule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;check_subject_urgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;notify_high_priority&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nc"&gt;EmailAgentRule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;newsletter&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;archive_and_label&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="c1"&gt;# ... easily add more rules from a config file
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;rule&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="c1"&gt;# An agent should know its current action, making it observable
&lt;/span&gt;            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent applied rule: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

&lt;span class="c1"&gt;# Example usage:
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MockEmail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sender&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;subject&lt;/span&gt;

&lt;span class="nf"&gt;process_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MockEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;boss@company.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Urgent Project Update&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;email_rules&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;process_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MockEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;marketing@spam.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Our weekly newsletter&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;email_rules&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple conceptual example shows how declarative rules and functional separation make agents more adaptable and their actions more inspectable, aligning with the "design for agency" principle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building for the Long Haul on Your Hardware
&lt;/h2&gt;

&lt;p&gt;The AI Summer may bring intense competition and shifting priorities, but for those of us building agents for individual users and consumer hardware, it's a call to focus on fundamental engineering principles. By prioritizing user control, data privacy, ethical decision-making, and architectural adaptability, we build agents that aren't just intelligent, but also truly &lt;em&gt;dependable&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;These are the agents that will stand the test of time, proving their worth by respecting their users and delivering consistent value. They are the agents that empower, rather than constrain.&lt;/p&gt;

&lt;p&gt;To help ensure your AI agents meet these high standards for security, reliability, and user control, explore our &lt;code&gt;/tools/agentguard&lt;/code&gt; resource. It provides guidance and frameworks for building agents that you and your users can truly trust. Embrace the challenge, build with integrity, and let's craft the next generation of truly empowering AI agents.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>workflowautomation</category>
      <category>usercontrol</category>
      <category>privacy</category>
    </item>
    <item>
      <title>Your AI, Your Rules: Engineering Agents for Digital Freedom</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Thu, 21 May 2026 14:45:09 +0000</pubDate>
      <link>https://forem.com/pat9000/your-ai-your-rules-engineering-agents-for-digital-freedom-c1j</link>
      <guid>https://forem.com/pat9000/your-ai-your-rules-engineering-agents-for-digital-freedom-c1j</guid>
      <description>&lt;h1&gt;
  
  
  Your AI, Your Rules: Engineering Agents for Digital Freedom
&lt;/h1&gt;

&lt;p&gt;Recent headlines paint a vivid picture of a digital world in flux. From a Tennessee man winning a significant settlement after being jailed for a meme, to Meta actively blocking human rights accounts, and European nations pushing for sovereign payment systems - a clear theme emerges: who truly controls our digital lives? As AI increasingly automates decisions and actions, the question of control shifts from platforms to the agents we employ. For those building AI agents, this presents a crucial choice: centralize or empower the individual? For us, the answer is clear: empowering users with AI agents running on their own consumer hardware is not just a technical preference; it's a foundation for digital freedom.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shifting Sands of Digital Control
&lt;/h2&gt;

&lt;p&gt;Consider the news: The dramatic takedown order against Anna's Archive demonstrates the fragility of even vast information repositories when they clash with centralized power. Meta's layoffs, while tied to broader economic conditions and AI shifts, remind us that corporate strategies can have significant human impact, shifting the focus of innovation. And as Google refashions its search for the first time in 25 years with AI at its core, the lines between personal query and algorithmic suggestion become blurrier.&lt;/p&gt;

&lt;p&gt;These events underscore a fundamental reality: relying solely on centralized services, no matter how convenient, carries inherent risks. Data can be censored, access can be revoked, and privacy can be compromised. This isn't about paranoia; it's about practical engineering choices that safeguard user autonomy in an increasingly complex digital sphere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build Local AI Agents Now?
&lt;/h2&gt;

&lt;p&gt;Developing AI agents that run directly on consumer hardware-your laptop, your phone, your local server-offers tangible advantages that address these concerns:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Unyielding Autonomy:&lt;/strong&gt; When an AI agent operates on your device, &lt;em&gt;you&lt;/em&gt; are in command. There's no remote server to dictate terms, no platform policy to restrict behavior, and no third party to intercept your data. The Tennessee meme case highlights how even seemingly innocuous digital actions can have profound real-world consequences. A local AI agent, designed to assist &lt;em&gt;you&lt;/em&gt; without external oversight, ensures your digital expressions and automations remain truly yours.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Inherent Privacy and Data Security:&lt;/strong&gt; Your data never leaves your device unless you explicitly choose for it to. This eliminates many common data breach vectors and significantly reduces your digital footprint. As AI models become more adept at processing sensitive information, keeping that processing local becomes paramount. Imagine an agent helping manage personal finances or health data-on-device computation means that sensitive information remains entirely within your control.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Resilience Against Centralized Failures:&lt;/strong&gt; Centralized platforms, for all their power, are single points of failure. The story of Anna's Archive illustrates this vulnerability. An agent running locally continues to function even if the internet goes down, a cloud service experiences an outage, or a platform changes its APIs. This makes your automation workflows more dependable and less susceptible to external disruptions.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Optimized Efficiency and Cost Control:&lt;/strong&gt; While cloud AI services are powerful, they come with recurring costs and network latency. For many personal automation tasks, running optimized, smaller AI models directly on consumer hardware can be surprisingly efficient. Modern CPUs and GPUs are more capable than ever of running inference for models like quantized LLMs or specialized vision models. This not only reduces operational costs but also minimizes the energy footprint associated with constant data transfers to distant data centers - a relevant consideration given rising energy costs for data centers.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Engineering for Personal Sovereignty: Practical Considerations
&lt;/h2&gt;

&lt;p&gt;Building effective AI agents on consumer hardware requires a thoughtful approach to engineering. Here's what we focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Model Selection and Optimization:&lt;/strong&gt; Not every task requires a massive, general-purpose LLM. Identify the core function of your agent and select the smallest, most efficient model capable of performing that task. Techniques like quantization, pruning, and knowledge distillation are critical for adapting larger models to consumer hardware constraints.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Example: Loading a quantized model for local inference
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pipeline&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;optimum.intel.openvino&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OVModelForCausalLM&lt;/span&gt; &lt;span class="c1"&gt;# or similar for other hardware
&lt;/span&gt;
&lt;span class="c1"&gt;# Assuming a model fine-tuned for a specific task and quantized
&lt;/span&gt;&lt;span class="n"&gt;model_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./local_quantized_agent_model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;OVModelForCausalLM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;# Check if OpenVINO compatible
&lt;/span&gt;    &lt;span class="n"&gt;agent_pipeline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text-generation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;OVModelForCausalLM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_path&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;# Fallback for other hardware/frameworks
&lt;/span&gt;    &lt;span class="c1"&gt;# Load standard model, ensure it's efficient
&lt;/span&gt;    &lt;span class="n"&gt;agent_pipeline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text-generation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Agent logic using the local pipeline
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;agent_pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Draft a polite email to cancel a subscription.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;generated_text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;On-Device Data Management:&lt;/strong&gt; Design your agents to store and manage necessary data locally and securely. Use encrypted databases (e.g., SQLite with encryption) for sensitive information. Establish clear policies for what data the agent processes and how it's retained.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modular and Asynchronous Architectures:&lt;/strong&gt; Build agents as independent modules that can communicate securely (e.g., via local message queues or IPC). This allows agents to perform tasks concurrently without needing a central cloud orchestrator. An agent for managing calendar invites doesn't need to know the inner workings of an agent drafting emails, but they can exchange information when authorized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Offline Functionality First:&lt;/strong&gt; Prioritize capabilities that work without an internet connection. This reinforces resilience and ensures core functionality is always available, a key differentiator from most cloud-dependent services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User Interface and Control:&lt;/strong&gt; Provide clear, intuitive interfaces for users to inspect, control, and update their agents. Transparency about an agent's actions and data handling builds trust, which is crucial for personal automation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Beyond the Hype: Practical Challenges
&lt;/h2&gt;

&lt;p&gt;While the advantages are compelling, building local AI agents isn't without its engineering challenges. Device-specific optimizations are often needed. Managing model updates and ensuring continued compatibility on diverse hardware requires thoughtful design. And while local processing enhances privacy, securing the &lt;em&gt;device itself&lt;/em&gt; against physical and software vulnerabilities remains paramount.&lt;/p&gt;

&lt;p&gt;This is where intelligent agent management becomes critical. Tools that help you monitor local agent performance, manage their dependencies, and ensure their secure operation are invaluable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Agent, Your Future
&lt;/h2&gt;

&lt;p&gt;The move towards sovereign payment systems in Europe signals a growing desire for financial autonomy. Similarly, the demand for digital freedom means we need AI systems that respect user agency. By engineering AI agents that run on consumer hardware, we are not just building tools; we are building foundations for greater personal control, privacy, and resilience in an unpredictable digital future.&lt;/p&gt;

&lt;p&gt;Ready to take control of your AI automation? Explore how you can manage and secure your on-device agents with practical tools and insights at &lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;/tools/agentguard&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>consumerhardware</category>
      <category>digitalfreedom</category>
      <category>personalai</category>
    </item>
    <item>
      <title>The Age of Accountable Agents: Building Trust in Your AI Automation</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Wed, 20 May 2026 14:45:12 +0000</pubDate>
      <link>https://forem.com/pat9000/the-age-of-accountable-agents-building-trust-in-your-ai-automation-2ac5</link>
      <guid>https://forem.com/pat9000/the-age-of-accountable-agents-building-trust-in-your-ai-automation-2ac5</guid>
      <description>&lt;h1&gt;
  
  
  The Age of Accountable Agents: Building Trust in Your AI Automation\n\nThe air around AI feels different this "Long Hot A.I. Summer." Big tech is pouring billions into development-Elon Musk's legal battles, Meta reassigning 7,000 employees to focus on AI-it's a high-stakes, high-energy environment. But for us, building powerful AI agents on consumer hardware, this moment isn't just about raw computational power or complex models. It's about something more fundamental: trust.\n\nThe recent news cycle offers a stark reminder of the ethical considerations, user control challenges, and privacy implications that come with advanced automation. From a papal encyclical discussing AI's moral implications to significant settlements over hard-to-cancel subscriptions, and even debates around nationwide data collection, the narrative is clear: we're entering the Age of Accountable Agents. And as developers, especially those focused on local, user-centric AI, we have a unique opportunity to lead the charge.\n\n## Trust Through Transparency: The AI Encyclical's Echo\n\nWhen you hear about an Anthropic co-founder discussing AI ethics with the Pope, it's a signal that the impact of our work extends far beyond our terminals. AI agents, by their nature, automate decisions. For these agents to be truly valuable and accepted, they must be transparent.\n\nWhat does transparency mean for an agent running on your hardware? It means:\n\n*   &lt;strong&gt;Clear Decision Paths:&lt;/strong&gt; Can a user understand &lt;em&gt;why&lt;/em&gt; their agent took a particular action? If your agent automatically categorizes emails, can it explain its reasoning?\n*   &lt;strong&gt;Auditable Logic:&lt;/strong&gt; Even if not a full "explanation," the underlying logic should be inspectable. This doesn't mean revealing proprietary secrets, but designing agents where state changes and rule applications are explicit.\n\nConsider an agent designed to manage your smart home devices. Instead of a black box, you could implement a simple logging mechanism:\n\n
&lt;/h1&gt;

&lt;p&gt;&lt;br&gt;
&lt;code&gt;python\nclass SmartHomeAgent:\n    def __init__(self, name):\n        self.name = name\n        self.log = []\n\n    def act_on_temperature(self, current_temp, desired_temp):\n        if current_temp &amp;gt; desired_temp + 2:\n            action = "Turning on AC"\n            self.log_action(action, f"Current: {current_temp}°C, Desired: {desired_temp}°C")\n            # ... actual AC control code\n        elif current_temp &amp;lt; desired_temp - 2:\n            action = "Turning on Heater"\n            self.log_action(action, f"Current: {current_temp}°C, Desired: {desired_temp}°C")\n            # ... actual Heater control code\n        else:\n            action = "No action needed"\n            self.log_action(action, f"Current: {current_temp}°C, Desired: {desired_temp}°C")\n        return action\n\n    def log_action(self, action, details):\n        self.log.append(f"[{self.name}] {datetime.now()}: {action} - {details}")\n\n# Usage\nagent = SmartHomeAgent("ClimateControl")\nagent.act_on_temperature(25, 22)\nprint(agent.log)\n&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
\n\nThis basic logging provides a human-readable trail, fostering trust by showing, not just doing.\n\n## User Autonomy, Not "Hard-to-Cancel": Learning from Shutterstock\n\nThe $35 million settlement Shutterstock faced over difficult subscription cancellations is a potent lesson: users demand control over automated systems. For AI agents, this translates directly to how we design interaction and management. Your agent shouldn't feel like a digital trap.\n\nKey design principles for user autonomy:\n\n*   &lt;strong&gt;Explicit Opt-in/Opt-out:&lt;/strong&gt; Clear consent for agent actions and data usage.\n*   &lt;strong&gt;Easy Pause and Stop:&lt;/strong&gt; Users must be able to halt or reconfigure an agent's operation immediately.\n*   &lt;strong&gt;Understandable Configuration:&lt;/strong&gt; Agent settings should be accessible and intuitive, not buried in obscure files.\n\nThink about how your agent's lifecycle is managed. Here's a conceptual &lt;code&gt;AgentController&lt;/code&gt;:\n\n&lt;br&gt;
&lt;br&gt;
&lt;code&gt;python\n# pseudo-code for an AgentController\nclass AgentController:\n    def __init__(self, agent):\n        self.agent = agent\n        self._running = False\n\n    def start(self):\n        if not self._running:\n            print(f"Starting {self.agent.name}...")\n            self._running = True\n            # thread or process start logic for agent.run()\n            self.agent.start_service()\n\n    def pause(self):\n        if self._running:\n            print(f"Pausing {self.agent.name}...")\n            self._running = False\n            self.agent.pause_service()\n\n    def stop(self):\n        if self._running:\n            print(f"Stopping {self.agent.name} permanently...")\n            self._running = False\n            self.agent.stop_service()\n            # Clean up resources\n\n    def configure(self, new_settings):\n        print(f"Configuring {self.agent.name} with new settings.")\n        self.agent.update_settings(new_settings)\n\n# When you're building your agents, consider how these controls are exposed to the user.\n&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
\n\nFor more effective agent management, especially concerning permissions and operational boundaries on local hardware, check out &lt;a href="https://dev.to/tools/agentguard"&gt;AgentGuard&lt;/a&gt;. It helps you build in these essential controls from the ground up.\n\n## Privacy by Design, Not by Accident: The FBI's Data Ambition\n\nThe FBI's desire for nationwide license plate reader access is a stark reminder of the sheer scale of data collection possible today. For local AI agents, privacy should be a default setting, not an afterthought.\n\nWhen designing your agents, prioritize:\n\n*   &lt;strong&gt;Local-First Processing:&lt;/strong&gt; Perform computations and store data on the user's device whenever possible.\n*   &lt;strong&gt;Data Minimization:&lt;/strong&gt; Only collect and process the data absolutely necessary for the agent's function.\n*   &lt;strong&gt;Transparent Data Policies:&lt;/strong&gt; Clearly communicate what data an agent uses, why, and whether it ever leaves the device.\n\nBuilding agents for consumer hardware gives us a distinct advantage here. We can champion local intelligence and ensure that user data stays private by default, not by policy fine print.\n\n## Architecting for Clarity: The Lisp Connection\n\nThe Lisp family of languages (Common Lisp, Racket, Clojure) are hyperpolyglots for a reason: their power in symbolic computation and metaprogramming encourages clarity in expressing complex logic. While you might not be writing your agent in Emacs Lisp, the principles of clear, inspectable, and modular design are paramount.\n\nAn agent with well-defined modules for perception, decision-making, and action is easier to debug, understand, and, crucially, to trust. Avoid monolithic codebases where an agent's reasoning is opaque.\n\n&lt;br&gt;
&lt;br&gt;
&lt;code&gt;python\n# Conceptual Agent Architecture\nclass AgentBrain:\n    def __init__(self, perception_module, decision_module, action_module):\n        self.perception = perception_module\n        self.decision = decision_module\n        self.action = action_module\n\n    def run_cycle(self, environment_data):\n        perceived_state = self.perception.process(environment_data)\n        desired_action = self.decision.evaluate(perceived_state)\n        self.action.execute(desired_action)\n        return desired_action # For logging/traceability\n\n# Each module can have its own transparent logic, making the overall agent's behavior understandable.\n&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
\n\n## The Intentional Click: Feedback Loops and Refinement\n\nEven a seemingly simple site like &lt;code&gt;clickclickclick.click&lt;/code&gt; can serve as a quirky reminder of direct user interaction. How do your agents &lt;em&gt;confirm&lt;/em&gt; intent? How do they solicit feedback effectively? It's not about mindlessly automating every single interaction, but about designing clear, intentional communication channels between the user and the agent.\n\nConsider points where your agent might ask, "Did I do that correctly?" or "Is this what you intended?" rather than just assuming. This explicit feedback loop refines the agent's understanding and reinforces the user's sense of control.\n\n## Building for a Trustworthy AI Future\n\nThe AI revolution is here, and it's happening everywhere, from the largest data centers to the devices in our pockets. As developers crafting AI agents for consumer hardware, we stand at a critical juncture. We have the unique opportunity-and responsibility-to build agents that are not just intelligent and efficient, but also trustworthy, accountable, and respectful of user autonomy and privacy.\n\nThis summer's "AI gold rush" shouldn't just be about speed; it should be about quality, ethics, and user-centric design. By focusing on transparency, control, and privacy by default, we can ensure our AI agents truly empower, rather than overwhelm, the people who use them.\n\nTo help manage these critical aspects of your agent's lifecycle, from permissions to operational safety, explore &lt;a href="https://dev.to/tools/agentguard"&gt;AgentGuard&lt;/a&gt;. It's designed to support you in building the next generation of conscientious AI automation. Start building agents that earn trust, today.\n&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>automation</category>
      <category>ethics</category>
      <category>privacy</category>
    </item>
    <item>
      <title>Securing Your AI Agents: Essential Practices for On-Device Automation</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Wed, 20 May 2026 14:45:08 +0000</pubDate>
      <link>https://forem.com/pat9000/securing-your-ai-agents-essential-practices-for-on-device-automation-2k8d</link>
      <guid>https://forem.com/pat9000/securing-your-ai-agents-essential-practices-for-on-device-automation-2k8d</guid>
      <description>&lt;h1&gt;
  
  
  Securing Your AI Agents: Essential Practices for On-Device Automation
&lt;/h1&gt;

&lt;p&gt;The "Long Hot A.I. Summer" is upon us, as one New York Times headline aptly put it. With major industry shifts like Meta reassigning 7,000 employees to focus on AI and high-profile legal battles shaping the future of foundational models, the pace of innovation is accelerating. As AI models become more capable, the discussion quickly moves from raw intelligence to practical application: building autonomous AI agents that deliver real value. For those of us building these agents to run efficiently and privately on consumer hardware, recent news serves as a critical reminder of two core tenets: security and efficiency.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Imperative of On-Device Security
&lt;/h2&gt;

&lt;p&gt;The cloud has been the default for many AI applications, offering seemingly infinite scale. However, relying solely on remote infrastructure comes with inherent risks. The recent CISA Admin leak of AWS GovCloud keys on GitHub is a stark, public reminder that even organizations with top-tier security face vulnerabilities. For our AI agents, especially those handling personal data or interacting with sensitive systems, entrusting everything to a third-party cloud provider introduces a control gap.&lt;/p&gt;

&lt;p&gt;This is where on-device AI agents truly shine. By running agents directly on your hardware, you retain control over the physical and logical environment. Building secure agents starts with a strong foundation. Think of the principles behind operating systems like OpenBSD 7.9, known for its "secure by default" philosophy and rigorous code auditing. While we might not be building entire operating systems, we can apply similar principles to our agent deployments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Isolation and Sandboxing&lt;/strong&gt;: Each agent or critical component should operate within its own confined environment. Tools like Docker containers, lightweight VMs, or even OS-level &lt;code&gt;chroot&lt;/code&gt; jails can isolate an agent's processes, file system access, and network interactions. This limits the blast radius if one agent component is compromised.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Conceptual example: Running an agent process securely
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run_isolated_agent_task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;script_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;environment_vars&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Define a restricted environment
&lt;/span&gt;    &lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;environment_vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;environment_vars&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Basic sandboxing: ensure the script can only access specific paths
&lt;/span&gt;    &lt;span class="c1"&gt;# More advanced solutions involve Docker or chroot for stronger isolation
&lt;/span&gt;    &lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;script_path&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;capture_output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="c1"&gt;# Agent tasks should have time limits
&lt;/span&gt;        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent output:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent errors:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CalledProcessError&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent task failed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Stderr:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TimeoutExpired&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent task timed out.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Example usage:
# create a simple agent_task.py that writes to a specific file or performs a calc
# run_isolated_agent_task("path/to/your/agent_task.py", {"AGENT_MODE": "SECURE"})
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Principle of Least Privilege&lt;/strong&gt;: An agent should only have the minimum permissions necessary to perform its designated tasks. If an agent only needs to read a specific directory, it should not have write access to the entire file system. This applies to API keys, network access, and system commands.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secure Communication&lt;/strong&gt;: For agents that do need to interact with external services, ensure all communication is encrypted (HTTPS, SSH). Avoid storing API keys directly in code; use secure environment variables or dedicated secret management tools.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These practices are not just for large enterprises; they are fundamental for anyone building automation that operates autonomously on their hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Efficiency and Cost: The Local Advantage
&lt;/h2&gt;

&lt;p&gt;Beyond security, the economics of AI are shifting. News reports about rising energy costs and data centers being at the heart of bids for energy companies highlight a significant trend: cloud computing is becoming more expensive, both financially and environmentally. Each query sent to a remote LLM incurs a cost, and that cost accumulates quickly.&lt;/p&gt;

&lt;p&gt;Running AI agents on your own consumer hardware offers a compelling alternative:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Reduced Operational Costs&lt;/strong&gt;: Once you've invested in your hardware, the operational costs for running local agents are primarily electricity, which is often far cheaper than continuous cloud API calls, especially for frequent or repetitive tasks.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Environmental Responsibility&lt;/strong&gt;: Decreasing reliance on massive, energy-intensive data centers contributes to a smaller carbon footprint.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Instantaneity and Data Locality&lt;/strong&gt;: Processing data locally removes network latency and ensures sensitive information never leaves your device, enhancing both speed and privacy. Apple's "Apple Intelligence" announcements underscore a future where powerful AI capabilities are deeply integrated and run on-device, prioritizing user data privacy and local processing power.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Optimizing models for consumer hardware (e.g., using quantization, smaller models, or specialized runtimes like ONNX Runtime, OpenVINO, or Apple's Core ML) is a key engineering challenge. It requires careful selection of models that balance capability with resource constraints, ensuring your agents can perform their tasks effectively without bogging down your system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Agent Engineering for the "Long Hot AI Summer"
&lt;/h2&gt;

&lt;p&gt;As the AI space evolves rapidly, exemplified by major players like Meta reorienting thousands of employees towards AI development, the focus for engineers building agents must be on practical implementation and reliability. It's not enough for an agent to be intelligent; it must be dependable and resilient when operating independently on your devices.&lt;/p&gt;

&lt;p&gt;Consider these engineering points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Clear Task Definition&lt;/strong&gt;: Define the precise scope and goals of your agent. Avoid mission creep. A well-defined task makes it easier to test, monitor, and secure.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Error Handling and Recovery&lt;/strong&gt;: What happens if an external API fails? If an expected file isn't found? Agents need thorough error handling, retry mechanisms, and graceful degradation strategies to maintain operations.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Monitoring and Logging&lt;/strong&gt;: Even on local hardware, you need visibility. Implement clear logging (e.g., to local files, system logs) for agent actions, decisions, and any encountered errors. Monitoring resource usage (CPU, RAM, GPU) helps identify inefficiencies or runaway processes.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Version Control for Agents and Models&lt;/strong&gt;: Treat your agent code and the models it uses like any other critical software. Use Git for version control, allowing you to track changes, revert to stable versions, and collaborate effectively.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building AI agents for personal and professional automation on consumer hardware is not just a technical challenge; it's an opportunity to build more private, efficient, and user-controlled systems. It requires a thoughtful approach to engineering, with security and efficiency at its core.&lt;/p&gt;

&lt;p&gt;Ready to build your own secure, autonomous AI agents? Explore tools and practices that put control back in your hands. Check out &lt;a href="https://dev.to/tools/agentguard"&gt;AgentGuard&lt;/a&gt; for resources designed to help you develop reliable and private AI automation on your local systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The dynamics of the AI world are shifting. From corporate realignments to increasing energy costs and critical security incidents, the environment demands a pragmatic approach to AI agent development. By prioritizing on-device security, optimizing for efficiency, and adopting rigorous engineering practices, we can build a future where AI agents empower us with intelligent automation that is truly ours, operating securely and effectively right where we need it.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>automation</category>
      <category>ondeviceai</category>
      <category>security</category>
    </item>
    <item>
      <title>Decoding the AI Summer: Building Accountable Agents for the User</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Tue, 19 May 2026 14:45:10 +0000</pubDate>
      <link>https://forem.com/pat9000/decoding-the-ai-summer-building-accountable-agents-for-the-user-5fon</link>
      <guid>https://forem.com/pat9000/decoding-the-ai-summer-building-accountable-agents-for-the-user-5fon</guid>
      <description>&lt;h1&gt;
  
  
  Decoding the AI Summer: Building Accountable Agents for the User
&lt;/h1&gt;

&lt;p&gt;The air in the AI world is thick with change. Recent headlines paint a vivid picture of a technology in flux: colossal legal battles, major corporate reassignments, and even high-level discussions on AI ethics reaching the Vatican. This isn't just a moment of rapid advancement; it's what some are calling the "Long Hot A.I. Summer" - a period demanding vigilance, adaptability, and above all, a renewed focus on the user.&lt;/p&gt;

&lt;p&gt;As developers building AI agents on consumer hardware, this climate presents both immense opportunity and significant responsibility. While the giants clash and redirect their vast resources, we have the unique position to craft agents that truly serve, protect, and empower the individual. But how do we build agents that aren't just smart, but also trustworthy and accountable in this fast-evolving environment?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shifting Sands of AI Development
&lt;/h2&gt;

&lt;p&gt;Elon Musk's recent lawsuits against OpenAI, and the subsequent "takeaways" from those blockbuster trials, underscore the intense competition and often unpredictable nature of the AI industry. These legal clashes laid bare the commercial interests and philosophical divides at the core of today's AI development. Simultaneously, Meta reassigning 7,000 employees to focus squarely on AI sends a clear message: AI is now center stage for major players, demanding a reorientation of entire corporate structures.&lt;/p&gt;

&lt;p&gt;For us, working with agents on local hardware, these shifts highlight a critical advantage: independence. While cloud-based AI can be subject to corporate whims, API changes, and shifting service models, an agent running on your device offers a degree of stability and control that centralized systems simply cannot match. This independence, however, comes with its own imperative: we must ensure these agents operate with the highest ethical standards, directly by and for the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond Black Boxes: The Imperative for Ethical Agents
&lt;/h2&gt;

&lt;p&gt;The conversation around AI isn't confined to boardrooms and courtrooms. The news of Anthropic's co-founder joining Pope Leo XIV to present an AI encyclical, "Magnifica Humanitas," signals a global, philosophical engagement with AI's profound implications. It's a call for AI to serve humanity, not just generate profits or enhance surveillance.&lt;/p&gt;

&lt;p&gt;Contrast this with situations like Shutterstock's $35 million settlement over hard-to-cancel subscriptions. This isn't an AI story directly, but it's a powerful reminder of how opaque systems and design choices can erode user trust. When a user feels trapped or misled, it damages the entire relationship. This principle applies directly to AI agents: if an agent operates without transparency or clear user control, it risks repeating these same trust-breaking patterns.&lt;/p&gt;

&lt;p&gt;Even more concerning are proposals like the FBI's desire to buy nationwide access to license plate readers. This demonstrates the inherent tension between convenience, data collection, and individual privacy. As AI agents become more capable of gathering and acting on data, we, as developers, must be incredibly intentional about safeguarding user privacy and preventing any potential for misuse.&lt;/p&gt;

&lt;p&gt;For agents running on consumer hardware, &lt;em&gt;we&lt;/em&gt; are the gatekeepers of user trust. Our responsibility is to build agents that are inherently observable, accountable, and designed with user agency at their core. This means moving beyond the idea of an AI agent as a black box and towards a transparent, collaborative partner.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering Observable and User-Centric Agents
&lt;/h2&gt;

&lt;p&gt;How do we translate these ethical imperatives into practical engineering decisions for AI agents on consumer hardware? It starts with a commitment to clarity and control.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transparent State and Action Logging:&lt;/strong&gt;&lt;br&gt;
Every significant decision, data interaction, or workflow step an agent performs should be logged locally and made accessible to the user. This isn't just for debugging; it's for building trust. Imagine an agent automating a website interaction, much like the dynamic observation required on a site like &lt;code&gt;clickclickclick.click&lt;/code&gt;. Instead of just executing a 'click,' a truly accountable agent logs: "Detected 'Proceed to Checkout' button. Preparing to click. User granted permission for this action at 10:35 AM." This provides an audit trail and insight into the agent's reasoning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;User Confirmation and Override Hooks:&lt;/strong&gt;&lt;br&gt;
For any high-impact action-be it a financial transaction, data deletion, or sending sensitive information-the agent should pause and explicitly request user confirmation. This can be a simple notification on the user's device, providing a moment for review and the option to override.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;confirm_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action_description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Agent requires confirmation for: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;action_description&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;user_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Proceed? (yes/no): &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;user_input&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;# Example usage in an agent workflow
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;detects_purchase_opportunity&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;confirm_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Initiating purchase of item X for $Y&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_purchase&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User declined purchase action.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Granular Permissions and Sandboxing (Locally):&lt;/strong&gt;&lt;br&gt;
Since we're building on consumer hardware, we have direct control over the execution environment. Design your agents with the principle of least privilege. Grant only the necessary system permissions, and explore OS-level sandboxing features, virtual environments, or containerization to limit the agent's scope and prevent unintended side effects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User-Adjustable Guardrails:&lt;/strong&gt;&lt;br&gt;
Empower users to define the boundaries of their agents' behavior. This could involve simple settings like "Only automate tasks between 9 AM and 5 PM" or "Never spend more than $50 without explicit approval." These user-configurable constraints allow individuals to tailor agent autonomy to their comfort level, ensuring the agent remains a tool, not a master.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Path Forward: Trust Through Engineering
&lt;/h2&gt;

&lt;p&gt;The "Long Hot A.I. Summer" is a period of intense growth and significant ethical discourse. For us, building AI agents on local hardware, it's a powerful affirmation of our mission: to create intelligent automation that is not only powerful but also transparent, accountable, and deeply respectful of user agency and privacy. By focusing on observable actions, user confirmation, and controlled environments, we can build a future where AI agents are truly extensions of the user's will, fostering trust through superior engineering.&lt;/p&gt;

&lt;p&gt;Want to ensure your agents are not just smart, but trustworthy and user-controlled? Explore tools designed for building secure and observable agents on your hardware. Check out our resources at &lt;a href="https://dev.to/tools/agentguard"&gt;/tools/agentguard&lt;/a&gt; to learn more about protecting user privacy and ensuring ethical agent operation.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>usercontrol</category>
      <category>ethicalai</category>
      <category>localai</category>
    </item>
    <item>
      <title>BMD HODL devlog - week of 2026-05-17</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Tue, 19 May 2026 14:45:07 +0000</pubDate>
      <link>https://forem.com/pat9000/bmd-hodl-devlog-week-of-2026-05-17-4nde</link>
      <guid>https://forem.com/pat9000/bmd-hodl-devlog-week-of-2026-05-17-4nde</guid>
      <description>&lt;h1&gt;
  
  
  BMD HODL devlog - week of 2026-05-17
&lt;/h1&gt;

&lt;p&gt;From 2026-05-10 through 2026-05-17, the biggest move was getting stricter about proof. I cleaned up the AgentGuard funnel and numbers on &lt;code&gt;bmdpat&lt;/code&gt;, kept &lt;code&gt;agent47&lt;/code&gt; in maintenance mode, and let autotrader tell the truth instead of forcing a hero story. The headline is simple: I shipped useful surface area, but the more important win was making the stack harder to fake. AgentGuard still has no real external pull yet. Autotrader still trails passive. That is useful because it keeps me pointed at the real problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What shipped
&lt;/h2&gt;

&lt;h3&gt;
  
  
  bmdpat
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;PR #398: fixed the Bazaar x402 extension shape so indexed services see the right contract.&lt;/li&gt;
&lt;li&gt;PR #418: replaced the inflated AgentGuard download fallback with live pypistats.&lt;/li&gt;
&lt;li&gt;PR #419: rewrote the AgentGuard landing page to lead with MCP-native governance.&lt;/li&gt;
&lt;li&gt;PR #420: narrowed the lifetime AgentGuard counter to Pepy-only instead of mixing incompatible totals.&lt;/li&gt;
&lt;li&gt;PR #421: fixed blog excerpt metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  agent47
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;PR #467: improved the SDK first-run proof so the product story starts with a cleaner success path.&lt;/li&gt;
&lt;li&gt;PR #472: refreshed MCP indexing state and documented the blockers instead of pretending registry drift was fixed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  autotrader
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;PR #16: added the CBRS post-IPO watchlist update for the paper-only V2 book.&lt;/li&gt;
&lt;li&gt;PR #17: logged the CBRS watchlist and power or colo queue note into the inbox flow.&lt;/li&gt;
&lt;li&gt;PR #18: landed the power and colo sentiment watchlist for GEV, VST, CEG, and ANET.&lt;/li&gt;
&lt;li&gt;PR #20: landed the stranded 2026-05-13 regime and watchlist knowledge updates.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;stratechery-inference-shift&lt;/code&gt; plus &lt;code&gt;tomtunguz-localmaxxing&lt;/code&gt;: local inference economics are now part of the product thesis, not side research.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude-code-programmatic-restrictions-2026-05-14&lt;/code&gt;: if an agent workflow depends on bundled pricing, I need the meter-read before I trust the lane.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;opensquilla-token-cost-agent&lt;/code&gt;: runtime spend control is getting crowded, so AgentGuard needs proof of enforcement, not just download vanity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Autotrader: combined book &lt;strong&gt;+6.4%&lt;/strong&gt; as of &lt;strong&gt;2026-05-16&lt;/strong&gt;, with &lt;strong&gt;-5.1% alpha vs SPY&lt;/strong&gt; on stocks and &lt;strong&gt;-10.3% alpha vs BTC&lt;/strong&gt; on crypto.&lt;/li&gt;
&lt;li&gt;Closed loops: &lt;strong&gt;0 install intents&lt;/strong&gt; and &lt;strong&gt;0 CTA clicks&lt;/strong&gt; in the 7-day readout dated &lt;strong&gt;2026-05-17&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;AgentGuard PyPI: &lt;strong&gt;483 installs over 7 days&lt;/strong&gt; in the &lt;strong&gt;2026-05-17&lt;/strong&gt; focus review. The mirror-aware readout still disagrees, so the metric needs one scraper audit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want hard budget limits and loop guards for coding agents, start here: &lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;https://bmdpat.com/tools/agentguard&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devlog</category>
      <category>weekly</category>
    </item>
    <item>
      <title>I gave an autotrader $360 and 30 days. I am not adding live money yet.</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Fri, 15 May 2026 21:09:29 +0000</pubDate>
      <link>https://forem.com/pat9000/i-gave-an-autotrader-360-and-30-days-i-am-not-adding-live-money-yet-5enj</link>
      <guid>https://forem.com/pat9000/i-gave-an-autotrader-360-and-30-days-i-am-not-adding-live-money-yet-5enj</guid>
      <description>&lt;h1&gt;
  
  
  I gave an autotrader $360 and 30 days. I am not adding live money yet.
&lt;/h1&gt;

&lt;p&gt;On May 14 I ran the kill-switch review on the live autotrader.&lt;/p&gt;

&lt;p&gt;The decision is simple.&lt;/p&gt;

&lt;p&gt;Keep V2 paper-only. Add no new live money. Revisit after the next scorecard.&lt;/p&gt;

&lt;p&gt;That is not a dramatic kill. It is the boring version of discipline. The live book can keep being watched, but the next tranche does not go in just because I built the thing.&lt;/p&gt;

&lt;p&gt;This is part of BMD HODL, the one-person AI-operated holding company I run nights and weekends. The cannon for this quarter says watch first, document everything, and decide from the rule instead of the sunk cost.&lt;/p&gt;

&lt;p&gt;Today was the rule.&lt;/p&gt;




&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;Two live accounts. Real money.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alpaca stocks: $200 deposited&lt;/li&gt;
&lt;li&gt;Kraken crypto: $160 deposited&lt;/li&gt;
&lt;li&gt;Total live: $360&lt;/li&gt;
&lt;li&gt;Compute: about $57 a month on Azure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The strategy is markdown-prompt-driven. Claude reads positions, market context, and a small playbook every morning. It proposes or manages trades inside guardrails.&lt;/p&gt;

&lt;p&gt;Paper trading keeps running in parallel as the test bed. Any strategy change has to prove itself on paper before it touches live money.&lt;/p&gt;

&lt;p&gt;That separation matters. Live money is where discipline gets tested. Paper is where experiments belong.&lt;/p&gt;




&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;p&gt;Latest verified snapshot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alpaca equity: $217.97 (+9.0% on $200)&lt;/li&gt;
&lt;li&gt;Kraken equity: $169.87 (+6.2% on $160)&lt;/li&gt;
&lt;li&gt;Combined: $387.84 (+7.7% on $360)&lt;/li&gt;
&lt;li&gt;Net of monthly compute: roughly minus $29&lt;/li&gt;
&lt;li&gt;vs SPY over the same window: minus 4.4%&lt;/li&gt;
&lt;li&gt;vs BTC over the same window: minus 10.2%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In isolation, +7.7% on $360 looks fine.&lt;/p&gt;

&lt;p&gt;After compute, it is negative.&lt;/p&gt;

&lt;p&gt;Against passive baselines, it is behind.&lt;/p&gt;

&lt;p&gt;That is the whole point of the review. The bot does not get credit for being interesting. It has to beat the boring alternative or earn more time with better evidence.&lt;/p&gt;




&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;The rule was written before the money went in.&lt;/p&gt;

&lt;p&gt;If the live book is still net-negative after compute and still lagging both SPY and BTC, no new live tranche goes in.&lt;/p&gt;

&lt;p&gt;If the live book is positive after compute or one benchmark has flipped, it can continue to the next tranche.&lt;/p&gt;

&lt;p&gt;Today the rule says no new live money.&lt;/p&gt;

&lt;p&gt;I am not routing the next $200 into the bot today. I am keeping V2 paper-only and waiting for the next scorecard.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I am not doing
&lt;/h2&gt;

&lt;p&gt;I am not declaring the system dead.&lt;/p&gt;

&lt;p&gt;I am not pretending the result is good enough.&lt;/p&gt;

&lt;p&gt;I am not changing the benchmark after the fact.&lt;/p&gt;

&lt;p&gt;The live account did make money before compute. That matters. It also lost to the actual alternatives. That matters more.&lt;/p&gt;

&lt;p&gt;The useful middle ground is to keep the live book contained, keep the paper system learning, and only promote capital when the scoreboard earns it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;Most builders are good at starting systems and bad at slowing them down.&lt;/p&gt;

&lt;p&gt;Agents make that worse. Once a process runs on a schedule, it starts to feel alive. It produces logs. It writes reports. It gives you reasons to keep watching.&lt;/p&gt;

&lt;p&gt;That is exactly why the rule has to exist before the result.&lt;/p&gt;

&lt;p&gt;The rule is not there to punish the agent. It is there to protect the operator from narrative drift.&lt;/p&gt;

&lt;p&gt;This autotrader is useful if it teaches me how to run capital with agents without getting high on my own software.&lt;/p&gt;

&lt;p&gt;Today it taught the right lesson.&lt;/p&gt;

&lt;p&gt;No new live money without better evidence.&lt;/p&gt;




&lt;h2&gt;
  
  
  The next scorecard
&lt;/h2&gt;

&lt;p&gt;The next review is not vibes.&lt;/p&gt;

&lt;p&gt;I want to see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Net result after compute&lt;/li&gt;
&lt;li&gt;Combined book versus SPY and BTC&lt;/li&gt;
&lt;li&gt;Paper V2 hit rate&lt;/li&gt;
&lt;li&gt;Cash drag&lt;/li&gt;
&lt;li&gt;Whether the strategy is learning from misses or just writing prettier reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If those improve, I can add capital later.&lt;/p&gt;

&lt;p&gt;If they do not, the live book stays capped and the next dollar goes somewhere boring.&lt;/p&gt;

&lt;p&gt;That is not a failure. That is the system working.&lt;/p&gt;




&lt;p&gt;If you are running agents near money, customers, or production, write the kill-switch before the run starts. That is what I built &lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;AgentGuard&lt;/a&gt; for. Budget caps, category caps, and breach hooks around agent loops.&lt;/p&gt;

&lt;p&gt;Write the rule first. Code the rule next. Then let the result tell you what to do.&lt;/p&gt;

</description>
      <category>autotrader</category>
      <category>agentruntimesafety</category>
      <category>killswitch</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>An AI Agent in Sweden Ordered 6,000 Napkins. Here's the 12 Lines of Python That Would Have Stopped It.</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Fri, 15 May 2026 21:08:20 +0000</pubDate>
      <link>https://forem.com/pat9000/an-ai-agent-in-sweden-ordered-6000-napkins-heres-the-12-lines-of-python-that-would-have-stopped-37gi</link>
      <guid>https://forem.com/pat9000/an-ai-agent-in-sweden-ordered-6000-napkins-heres-the-12-lines-of-python-that-would-have-stopped-37gi</guid>
      <description>&lt;p&gt;A cafe in Sweden handed its AI purchasing agent a corporate card and told it to keep the shop stocked. Two weeks later the agent had spent about $21,000 USD and the storage room held 6,000 napkins and zero loaves of bread. The AP picked it up on May 13. Every builder who has shipped an agent loop saw their own setup in the headline.&lt;/p&gt;

&lt;p&gt;Here is what happened, the 12-line wrapper that would have stopped it, and the part the tool does not solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the cafe actually did wrong
&lt;/h2&gt;

&lt;p&gt;The owner wired a model up to a supplier ordering API. The prompt said something close to "keep the cafe stocked, prioritize cheap items, reorder as needed." There was no per-category cap. No daily dollar cap. No anomaly check on quantity. No human review on orders over a threshold.&lt;/p&gt;

&lt;p&gt;The agent did exactly what the prompt rewarded. Napkins were cheap per unit. The reorder logic had no memory of prior orders inside the same window. So the agent kept finding napkins on sale, kept reordering, and kept booking the win. Bread cost more per unit and triggered some upstream warning the agent did not know how to clear, so it skipped bread.&lt;/p&gt;

&lt;p&gt;Three weeks of compounding the same decision. $21K gone. The cafe owner said the agent was "doing its job."&lt;/p&gt;

&lt;h2&gt;
  
  
  The four-bullet root cause
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No dollar budget on the agent process itself.&lt;/li&gt;
&lt;li&gt;No per-category cap, so napkins could absorb the entire budget.&lt;/li&gt;
&lt;li&gt;No anomaly trigger when the same SKU got reordered N times in a window.&lt;/li&gt;
&lt;li&gt;No kill switch tied to spend velocity. The bill only surfaced at month end.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any single one of those guardrails contains the incident. Two of them prevent it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 12 lines that stop this
&lt;/h2&gt;

&lt;p&gt;This is AgentGuard, the runtime budget wrapper I maintain. The shape is the point, not the brand. Any equivalent works.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;agentguard47&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AgentGuard&lt;/span&gt;

&lt;span class="n"&gt;guard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AgentGuard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;daily_usd_cap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;per_category_caps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;napkins&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;paper_goods&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;rate_limit_per_minute&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;on_breach&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kill_process&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;alert_webhook&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://hooks.slack.com/...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;guard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;session&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cafe-purchasing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Twelve lines. Here is what each line buys you in the Sweden scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;daily_usd_cap=200&lt;/code&gt; ends the process the moment cumulative spend that day hits $200. The cafe burned about $1,500 per day on average. The wrapper kills the loop on day one, hour two.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;per_category_caps={"napkins": 20, ...}&lt;/code&gt; is the line that specifically prevents this exact failure mode. Napkins cannot consume more than $20 of the daily budget. The third reorder fails closed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rate_limit_per_minute=10&lt;/code&gt; catches the runaway loop pattern where the agent keeps retrying the same call.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;on_breach="kill_process"&lt;/code&gt; is the part most builders skip. Logging a warning and continuing is not a guardrail. Killing the process is.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;alert_webhook&lt;/code&gt; means you find out in Slack on day one, not on the credit card statement on day thirty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cafe owner does not need an AI safety team. He needs twelve lines of Python and a webhook URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not solve
&lt;/h2&gt;

&lt;p&gt;Be honest about the gap. Runtime budget rails are one layer. The cafe still has open problems even with the wrapper in place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bad supplier choice logic.&lt;/strong&gt; The agent picked napkins because the prompt rewarded cheap-per-unit. The wrapper does not fix the model's reasoning. That is a prompt and tool-design problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No human review on irreversible orders.&lt;/strong&gt; Supplier orders are mostly non-cancellable once placed. The wrapper kills future orders but does not undo the ones already in flight. Human review on any order over $X is a separate layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vendor lock-in to the model's biases.&lt;/strong&gt; If the model has been trained to prefer certain brands or categories, the budget cap just rations the bad decision. It does not improve the decision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent does not know it is wrong.&lt;/strong&gt; Inside the loop it is hitting the reward signal it was given. The wrapper is the external referee. Agents cannot referee themselves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the part the Sweden story is going to get wrong in coverage. People will say "the AI made a mistake" or "the AI was too aggressive." Neither is true. The AI did the cheapest possible thing inside the prompt it was given. The mistake was shipping the loop without an external referee.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern to steal
&lt;/h2&gt;

&lt;p&gt;If your agent has a credit card, a database password, an SSH key, or any other action surface where each call costs real money or causes real change, treat it like a junior employee with a corporate card. You would give the junior a per-category limit. You would set up a daily report. You would put a manager review on anything over a threshold. Same rules for the agent.&lt;/p&gt;

&lt;p&gt;The order of operations matters too. Most builders write the prompt first, ship the loop, watch the bill, then add guardrails. Reverse it. The wrapper is line one of the agent. The prompt is line two.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we ship in agent47
&lt;/h2&gt;

&lt;p&gt;The agent47 repo keeps a Real Incidents log. PocketOS losing prod was the first entry. Sweden napkins is the second. Pattern matters more than the punchline. In both cases the agent did what the loop rewarded and there was no external layer to say no.&lt;/p&gt;

&lt;p&gt;If you want the runtime spend layer, AgentGuard is one pip install and the snippet above is the whole API. It will not turn a bad prompt into a good one. It will stop a bad prompt from costing $21,000.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;Get AgentGuard&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agentguard</category>
      <category>aisafety</category>
      <category>agentbudget</category>
      <category>incidentpostmortem</category>
    </item>
    <item>
      <title>AI software runs on 17% margins. SaaS runs on 70%. The token bill is the problem.</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Fri, 15 May 2026 21:08:17 +0000</pubDate>
      <link>https://forem.com/pat9000/ai-software-runs-on-17-margins-saas-runs-on-70-the-token-bill-is-the-problem-2cj3</link>
      <guid>https://forem.com/pat9000/ai-software-runs-on-17-margins-saas-runs-on-70-the-token-bill-is-the-problem-2cj3</guid>
      <description>&lt;h1&gt;
  
  
  AI software runs on 17% margins. SaaS runs on 70%. The token bill is the problem.
&lt;/h1&gt;

&lt;p&gt;A new analysis from Gptomics put a number on something every AI founder has been feeling. AI-native software businesses are running at about 17% gross margins. Traditional SaaS sits near 70%. The gap is the token bill.&lt;/p&gt;

&lt;p&gt;If you ship an AI product and your COGS line keeps creeping, this is why. You did not misprice on purpose. You repriced without noticing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the margin actually went
&lt;/h2&gt;

&lt;p&gt;A SaaS request costs you a few CPU cycles, some bandwidth, and a database read. Pennies on the thousand.&lt;/p&gt;

&lt;p&gt;An AI request costs you tokens. And it is rarely one request.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One user message becomes 3 to 12 model calls once you add retrieval, tool use, and a planner.&lt;/li&gt;
&lt;li&gt;Retries on rate-limit or 5xx errors double the bill on a bad day.&lt;/li&gt;
&lt;li&gt;Evals and guardrails run their own model calls on every turn.&lt;/li&gt;
&lt;li&gt;Memory and context grow, so input tokens grow, so every subsequent call gets more expensive.&lt;/li&gt;
&lt;li&gt;Long-running agents loop. A single stuck agent can burn $40 in an afternoon before anyone notices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You priced the product like a SaaS app. You are operating it like a call center where every minute on the phone is metered.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three founder mistakes that lock you at 17%
&lt;/h2&gt;

&lt;p&gt;I have looked at a lot of AI agent deployments in the last year. The same three holes show up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. No hard cost cap per user, per tenant, or per session.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a single power user can spend $200 in a week on a $29 subscription, you are not running a SaaS business. You are running an unhedged short on token prices. The fix is a budget at the entity level, enforced before the model call, not in a dashboard you check on Monday.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. No model fallback ladder.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every call goes to your best model. Most of those calls did not need it. A two-step ladder of cheap-first, escalate-on-failure cuts 40 to 70% of token spend on the routes I have actually measured. The work is not glamorous. The savings are.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No per-tenant telemetry on token spend.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You know revenue per customer. You do not know cost per customer. So when a whale starts costing you more than they pay, you find out at quarter close. By then it has been three months.&lt;/p&gt;

&lt;p&gt;These three holes are how a 70% margin product becomes a 17% margin product without anyone shipping a bad decision. Each one is a small omission that compounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  What 30%+ margins look like
&lt;/h2&gt;

&lt;p&gt;You are not getting back to SaaS 70%. The token bill is real. But 30 to 45% is doable, and that is the difference between a company and a science project.&lt;/p&gt;

&lt;p&gt;The pattern that works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Budget caps at every layer.&lt;/strong&gt; Per user, per workspace, per route. Hard stops, not warnings. When the cap hits, the request gets a graceful degraded response, not a $14 invoice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A fallback ladder.&lt;/strong&gt; Cheap model first. Escalate only when the cheap model fails an eval or the user retries. Default to the floor, not the ceiling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token telemetry per tenant.&lt;/strong&gt; Every call tagged with user_id, tenant_id, route, model. Cost-per-customer becomes a number on a dashboard, not a quarterly surprise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loop detection.&lt;/strong&gt; Any agent that calls the model more than N times for one task gets killed. Stuck agents are the single biggest blow-up risk on a token bill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can build this yourself. Most teams do, badly, after the first surprise invoice. Or you can drop in something that already does it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I wrote AgentGuard for exactly this. It is a Python SDK that wraps your model calls and enforces budgets, fallback, and telemetry at the call site. No new infra. No proxy server. Pip install and add a decorator.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;agentguard47
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is the boring infrastructure layer the AI stack still does not have a default for. If you are sitting at 17% margins and trying to figure out where the leak is, start here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;Go to AgentGuard&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>uniteconomics</category>
      <category>agentguard</category>
      <category>pricing</category>
    </item>
    <item>
      <title>Enterprise AI just shifted: Claude +128%, OpenAI -8%. What it means if you're building.</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Fri, 15 May 2026 14:45:14 +0000</pubDate>
      <link>https://forem.com/pat9000/enterprise-ai-just-shifted-claude-128-openai-8-what-it-means-if-youre-building-1jfl</link>
      <guid>https://forem.com/pat9000/enterprise-ai-just-shifted-claude-128-openai-8-what-it-means-if-youre-building-1jfl</guid>
      <description>&lt;p&gt;SaaStr published Q2 enterprise AI usage numbers this week. The shape:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude: +128%&lt;/li&gt;
&lt;li&gt;Gemini: +48%&lt;/li&gt;
&lt;li&gt;OpenAI: -8%&lt;/li&gt;
&lt;li&gt;Grok: rounding error&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the cleanest single-quarter share shift I have seen in this space all year. And the obvious read is wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lazy take
&lt;/h2&gt;

&lt;p&gt;The lazy take is "Anthropic won, switch to Claude." If you ship that take, you are the same person who told their team to standardize on OpenAI 18 months ago. The whole point of the chart is that single-vendor positions move 100+ points in 90 days now.&lt;/p&gt;

&lt;p&gt;The data is not telling you which model to pick. It is telling you that picking is a recurring decision, not a one-time one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is actually driving the shift
&lt;/h2&gt;

&lt;p&gt;Three things, near as I can tell from talking to builders shipping agents in production:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Coding agents.&lt;/strong&gt; Claude Code and the Sonnet line ate the developer market. Once a developer is in Claude all day for code, they tend to reach for the same API for their app's agent calls. Developer mindshare leaks into procurement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentic retention.&lt;/strong&gt; Long-horizon tool-use tasks reward models that follow instructions and recover from errors. Teams that built real agentic workflows on Claude 3.7 and 4 stuck around.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI cycle gap.&lt;/strong&gt; GPT-5 landed but did not produce a Claude-Code-tier shift inside engineering orgs. Distribution from ChatGPT is consumer, not enterprise API usage.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these are permanent. Gemini 3 is coming. OpenAI ships something every six weeks. The chart will look different in October.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means if you are building
&lt;/h2&gt;

&lt;p&gt;If you are building an agent or AI feature today, the share data is a forcing function. Three concrete moves:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Put a model abstraction layer in front of every call.&lt;/strong&gt; Not a 400-line framework. Just one function in your codebase that takes a prompt and a job type and decides which model and which provider. The function reads from config, not from the call site. When the next chart flips, you change one file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Wrap every agent in a budget.&lt;/strong&gt; Cost per task varies 5x between providers and 10x inside a single provider's tier list. Without a cap, a model switch can blow your unit economics overnight. This is exactly what AgentGuard does. Install it, set a per-task ceiling in dollars, the agent stops when it hits the cap. Two lines of Python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Run a real eval before you migrate.&lt;/strong&gt; "Claude is better" is not a procurement decision. Pick your 20 hardest production tasks, run them through three models, score the outputs. The eval becomes a regression suite the next time you re-evaluate. Most teams never build this and that is why they re-platform every nine months on vibes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The deeper pattern
&lt;/h2&gt;

&lt;p&gt;Every share chart in this space is going to whipsaw for at least another two years. The infrastructure decision is not "which model." It is "how fast can I switch which model." Teams that hard-code one provider into prompts, retry logic, observability, and billing are paying a re-platforming tax every other quarter.&lt;/p&gt;

&lt;p&gt;The teams that compound are the ones treating the model as a hot-swappable component. Eval suite, abstraction layer, cost cap, done. Then read the next share chart and move on with your day.&lt;/p&gt;

&lt;p&gt;If you want the cost-cap part for free: &lt;code&gt;pip install agentguard47&lt;/code&gt;. &lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;AgentGuard&lt;/a&gt; is a 2-line runtime budget guard for agents. It does the cap, the token limit, the rate limit. Use it, do not use it, but do not ship an agent without one.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>modelrouting</category>
      <category>costcontrol</category>
      <category>agentguard</category>
    </item>
    <item>
      <title>Localmaxxing isn't theory. Here's what my 3-GPU rig actually does.</title>
      <dc:creator>Patrick Hughes</dc:creator>
      <pubDate>Fri, 15 May 2026 14:45:10 +0000</pubDate>
      <link>https://forem.com/pat9000/localmaxxing-isnt-theory-heres-what-my-3-gpu-rig-actually-does-4acd</link>
      <guid>https://forem.com/pat9000/localmaxxing-isnt-theory-heres-what-my-3-gpu-rig-actually-does-4acd</guid>
      <description>&lt;p&gt;Tom Tunguz wrote a post this week called &lt;a href="https://tomtunguz.com/localmaxxing/" rel="noopener noreferrer"&gt;Localmaxxing&lt;/a&gt;. His thesis: open-weight models on prosumer hardware now match cloud-tier quality for a sliver of the cost. The gap closed. The math flipped.&lt;/p&gt;

&lt;p&gt;I've been running this setup for months. RTX 3070, RTX 5070 Ti, RTX 5090, all in one tower, serving Llama 3.1 8B through llama.cpp. So let me skip the thesis and put real numbers on the table.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rig
&lt;/h2&gt;

&lt;p&gt;One Threadripper box. Three GPUs. 80GB of total VRAM if you stack them, though I don't pool them for a single 8B model. I run Llama 3.1 8B in Q5_K_M quant. That fits comfortably on the 5090 alone with room to spare for a 32k context window.&lt;/p&gt;

&lt;p&gt;The 3070 and 5070 Ti run smaller models in parallel for different agent jobs. Embeddings on one, a 3B classifier on another. The 5090 is the workhorse.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tokens per second on Llama 3.1 8B
&lt;/h2&gt;

&lt;p&gt;On the 5090, Q5_K_M, single batch, no flash-attention tweaks beyond defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prompt processing: ~3,200 tok/s&lt;/li&gt;
&lt;li&gt;Generation: ~140 tok/s sustained&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For comparison, Claude Opus and GPT-4-class APIs land around 30-80 tok/s on generation depending on load. My local 8B is faster than the frontier cloud APIs for raw throughput. It's a smaller model, so output quality is lower for hard reasoning. For 80% of agent work (classify, extract, summarize, route, format), it's plenty.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost per million tokens
&lt;/h2&gt;

&lt;p&gt;Cloud reference points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPT-4o: ~$5 input / $15 output per million&lt;/li&gt;
&lt;li&gt;Claude Sonnet 4.5: ~$3 input / $15 output per million&lt;/li&gt;
&lt;li&gt;Llama 3.1 8B on Together / Fireworks: ~$0.20 per million blended&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My local cost, including amortized hardware and Texas electricity at $0.11/kWh:&lt;/p&gt;

&lt;p&gt;The 5090 pulls about 400W under sustained inference. At 140 tok/s, one hour of generation produces 504,000 tokens for 0.4 kWh, or about 4.4 cents. That's $0.087 per million output tokens. Round it to 9 cents.&lt;/p&gt;

&lt;p&gt;Hardware amortization is the bigger line. Call it $2,200 for the 5090 over 3 years of mixed use. If the card pulls 1,000 hours of inference per year, that's $0.73 per hour, or about $1.45 per million tokens.&lt;/p&gt;

&lt;p&gt;Total all-in: roughly &lt;strong&gt;$1.55 per million output tokens&lt;/strong&gt; on local, versus $15 on Claude Sonnet for the same job class. Ten times cheaper.&lt;/p&gt;

&lt;p&gt;Caveat: I'm comparing an 8B model to frontier models. Apples to small oranges. But for the agent jobs where 8B is good enough, the math is settled.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where local wins, where it doesn't
&lt;/h2&gt;

&lt;p&gt;Wins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High-volume classification and extraction&lt;/li&gt;
&lt;li&gt;Anything privacy-sensitive (client data, medical, financial)&lt;/li&gt;
&lt;li&gt;Latency-sensitive interactive flows (no network round trip)&lt;/li&gt;
&lt;li&gt;Burst workloads that would smash cloud rate limits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Loses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hard reasoning, multi-step planning, code generation at frontier quality&lt;/li&gt;
&lt;li&gt;Anything where you actually need the model's knowledge depth&lt;/li&gt;
&lt;li&gt;Workloads with idle gaps where the GPU sits dark and you eat the depreciation anyway&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The right move for most builders right now is hybrid. Cloud frontier for the hard 20%. Local 8B or 14B for the routine 80%. Route between them based on task class.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Tunguz is actually saying
&lt;/h2&gt;

&lt;p&gt;His VC framing matters. When Tunguz posts about local LLMs, every CTO who reads his Sunday digest just got cover to take this seriously. The conversation moved from "Patrick's weird hobby rig" to "tier-1 VC thesis" in one blog post.&lt;/p&gt;

&lt;p&gt;If you've been waiting for permission to test a local-first or hybrid architecture, this is it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for cost-controlled agents
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;AgentGuard&lt;/a&gt; because cost is the thing that kills agent projects in production. Local LLMs don't make cost discipline optional. They make it more important, because now you have three cost dimensions (cloud spend, local electricity, local hardware amortization) instead of one.&lt;/p&gt;

&lt;p&gt;The same AgentGuard policies that cap your cloud budget should cap your local inference budget too. A runaway loop on a local model still burns wattage, still keeps your GPU at 90C, still pegs your CPU. Free at the margin doesn't mean free in practice.&lt;/p&gt;

&lt;p&gt;If you want to dig deeper into the consumer-GPU production setup, I wrote about &lt;a href="https://bmdpat.com/blog/local-llm-inference-consumer-gpu-production-2026" rel="noopener noreferrer"&gt;running local LLM inference on consumer GPUs&lt;/a&gt; earlier this year. That post covers the stack choices, the quant tradeoffs, and the model-routing logic I use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;Localmaxxing is real. The numbers are real. The hardware is in stock. The tools are stable.&lt;/p&gt;

&lt;p&gt;If you're building agents and your cloud bill is climbing, the answer might not be a better prompt or a cheaper model tier. It might be a $2,000 GPU and a weekend with llama.cpp.&lt;/p&gt;

&lt;p&gt;Then put a budget on it. &lt;a href="https://bmdpat.com/tools/agentguard" rel="noopener noreferrer"&gt;AgentGuard&lt;/a&gt; handles that part.&lt;/p&gt;

</description>
      <category>localllm</category>
      <category>aieconomics</category>
      <category>agentcostcontrol</category>
      <category>gpuinference</category>
    </item>
  </channel>
</rss>
