<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sergio Antonio Felix Sanchez</title>
    <description>The latest articles on DEV Community by Sergio Antonio Felix Sanchez (@sergio87f).</description>
    <link>https://dev.to/sergio87f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4008712%2F64b1aef9-7d8a-493d-a055-3b5703e4bab5.png</url>
      <title>DEV Community: Sergio Antonio Felix Sanchez</title>
      <link>https://dev.to/sergio87f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sergio87f"/>
    <language>en</language>
    <item>
      <title>Running AI Agents That Pay Each Other — A Practical Guide</title>
      <dc:creator>Sergio Antonio Felix Sanchez</dc:creator>
      <pubDate>Mon, 06 Jul 2026 21:00:04 +0000</pubDate>
      <link>https://dev.to/sergio87f/running-ai-agents-that-pay-each-other-a-practical-guide-kb5</link>
      <guid>https://dev.to/sergio87f/running-ai-agents-that-pay-each-other-a-practical-guide-kb5</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;AI agents need to use services: extract text from PDFs, search the web, analyze images. Traditionally each service requires its own API key and subscription.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: x402 Micro-payments
&lt;/h2&gt;

&lt;p&gt;With x402, agents pay per request in USDC on Base. No API keys, no subscriptions, no free tiers to worry about.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent → pays $0.01 USDC → x402 gateway → worker processes → returns result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What I've Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Costs are negligible&lt;/strong&gt;: $0.01 per request means $0.50-1.00/day for a full agent suite&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No API key management&lt;/strong&gt;: Agents use their own wallet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic accounting&lt;/strong&gt;: Every payment is on-chain, auditable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent autonomy&lt;/strong&gt;: Bots have their own budgets, pause when funds run low&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Budget Tracking
&lt;/h2&gt;

&lt;p&gt;Each of my agents has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A USDC wallet on Base&lt;/li&gt;
&lt;li&gt;Monthly budget (e.g., $5/month)&lt;/li&gt;
&lt;li&gt;Auto-pause when budget exhausted&lt;/li&gt;
&lt;li&gt;ROI tracking&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Building an agent directory where agents can discover and pay each other for services. The agent economy is just getting started.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Questions? Find me on X: @SergioAnto13805&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>blockchain</category>
      <category>automation</category>
    </item>
    <item>
      <title>Zero-to-One: Deploying Your First Smart Contract on Base</title>
      <dc:creator>Sergio Antonio Felix Sanchez</dc:creator>
      <pubDate>Mon, 29 Jun 2026 21:00:09 +0000</pubDate>
      <link>https://dev.to/sergio87f/zero-to-one-deploying-your-first-smart-contract-on-base-4hnk</link>
      <guid>https://dev.to/sergio87f/zero-to-one-deploying-your-first-smart-contract-on-base-4hnk</guid>
      <description>&lt;h2&gt;
  
  
  Why Base?
&lt;/h2&gt;

&lt;p&gt;Base is an L2 on Ethereum that's cheap ($0.001-0.01/tx) and fast (1 second blocks). Perfect for micro-payment use cases like x402.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We'll Build
&lt;/h2&gt;

&lt;p&gt;A simple payment gateway that accepts USDC and triggers an API response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;viem (ethereum library)&lt;/li&gt;
&lt;li&gt;A wallet with some ETH on Base for gas&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Contract
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Simple payment verification
contract PaymentGateway {
    IERC20 public usdc;
    address public payTo;
    uint256 public price;

    function pay() external {
        usdc.transferFrom(msg.sender, payTo, price);
        emit PaymentReceived(msg.sender, price);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Using viem + Base&lt;/span&gt;
npx wagmi init
&lt;span class="c"&gt;# Deploy to Base Mainnet&lt;/span&gt;
npx hardhat run scripts/deploy &lt;span class="nt"&gt;--network&lt;/span&gt; base
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The API Integration
&lt;/h2&gt;

&lt;p&gt;On the backend, verify the payment and process the request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/service&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;txHash&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verified&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;verifyPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;txHash&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;402&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payment required&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;processRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Cost
&lt;/h2&gt;

&lt;p&gt;Deploying to Base: ~$0.50 in gas&lt;br&gt;
Per transaction: ~$0.001 in gas&lt;br&gt;
Per API call: $0.01 USDC + $0.001 gas = $0.011 total&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.base.org" rel="noopener noreferrer"&gt;Base docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://viem.sh" rel="noopener noreferrer"&gt;viem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x402.org" rel="noopener noreferrer"&gt;x402 protocol&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built on Base with ❤️&lt;/em&gt;&lt;/p&gt;

</description>
      <category>solidity</category>
      <category>base</category>
      <category>tutorial</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
