<?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: umit kuru</title>
    <description>The latest articles on DEV Community by umit kuru (@umit_kuru_d2092d27c46a685).</description>
    <link>https://dev.to/umit_kuru_d2092d27c46a685</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%2F4038913%2Fcf03c5da-a3aa-402b-b753-708db7619213.png</url>
      <title>DEV Community: umit kuru</title>
      <link>https://dev.to/umit_kuru_d2092d27c46a685</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/umit_kuru_d2092d27c46a685"/>
    <language>en</language>
    <item>
      <title>I built an AI agent that owns a crypto wallet and sells its own API access via x402</title>
      <dc:creator>umit kuru</dc:creator>
      <pubDate>Mon, 20 Jul 2026 23:05:23 +0000</pubDate>
      <link>https://dev.to/umit_kuru_d2092d27c46a685/i-built-an-ai-agent-that-owns-a-crypto-wallet-and-sells-its-own-api-access-via-x402-eb6</link>
      <guid>https://dev.to/umit_kuru_d2092d27c46a685/i-built-an-ai-agent-that-owns-a-crypto-wallet-and-sells-its-own-api-access-via-x402-eb6</guid>
      <description>&lt;p&gt;I've been building an experiment: an autonomous AI agent that owns its own crypto wallet, sells a paid API, and uses Claude to make its own pricing decisions based on real earnings and costs. It's live on Base mainnet right now, so I wanted to write up how it actually works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;The agent runs a single paid endpoint -- a text summarizer -- gated behind the x402 protocol (Coinbase's revival of the old, unused HTTP 402 "Payment Required" status code for stablecoin micropayments). No API keys, no signup, no subscription:&lt;/p&gt;

&lt;p&gt;POST /api/summarize&lt;br&gt;
{"text": "..."}&lt;/p&gt;

&lt;p&gt;An unpaid request gets back a 402 with the price ($0.02) and payment details. An x402-aware client attaches a USDC payment on Base and retries automatically. Once the payment settles, the agent runs the text through Claude and returns:&lt;/p&gt;

&lt;p&gt;{"summary": "...", "key_points": ["...", "..."]}&lt;/p&gt;

&lt;h2&gt;
  
  
  The wallet and the safety rail
&lt;/h2&gt;

&lt;p&gt;The agent's wallet is managed through Coinbase's Developer Platform (CDP) -- the actual private key never touches my code, only an API-scoped credential. More importantly: every code path that could move funds out of the wallet has to go through one function with a hard, tested spend cap. Nothing in the current build actually spends from the wallet at all (it's receive-only for now), but the cap exists so that if I ever add a feature where the agent spends money on its own, there's a hard ceiling on how much it can ever move, enforced in code, not just policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pricing "brain"
&lt;/h2&gt;

&lt;p&gt;Every 30 minutes, a separate loop asks Claude: given the current earnings, costs, and wallet balance, should the price go up, down, stay the same, or should the service pause itself? This is the part I find most interesting -- it's a real (if simple) example of an agent making an economic decision about its own survival, not just executing a fixed script.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Real infrastructure has real edge cases. The mainnet payment facilitator needed different authentication than the free testnet one -- something you only discover by actually deploying to mainnet, not by reading docs.&lt;/li&gt;
&lt;li&gt;Models change under you. Claude Sonnet 5 started running "adaptive thinking" by default recently, which silently changed the shape of API responses my code assumed were fixed -- a good reminder that "it worked yesterday" isn't the same as "it's correct."&lt;/li&gt;
&lt;li&gt;Distribution is a completely different problem than building. The hardest part of this project wasn't the code -- it's convincing anyone (human or agent) to actually call the endpoint.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://money-agent-production-a0a9.up.railway.app/api/summarize" rel="noopener noreferrer"&gt;https://money-agent-production-a0a9.up.railway.app/api/summarize&lt;/a&gt; -- it also self-lists on the x402 Bazaar (x402bazaar.org) for agent-to-agent discovery. Would love feedback from anyone else building in the agent-native payments space, or thoughts on where this kind of thing is actually useful vs. a neat toy.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>crypto</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
