<?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: moralito311-andr</title>
    <description>The latest articles on DEV Community by moralito311-andr (@moralito311andr).</description>
    <link>https://dev.to/moralito311andr</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%2F4111692%2F91732846-179c-4fd6-9f97-7b05558414cf.png</url>
      <title>DEV Community: moralito311-andr</title>
      <link>https://dev.to/moralito311andr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moralito311andr"/>
    <language>en</language>
    <item>
      <title>AI agents are becoming your customers. Here's how they pay.</title>
      <dc:creator>moralito311-andr</dc:creator>
      <pubDate>Mon, 07 Sep 2026 21:20:17 +0000</pubDate>
      <link>https://dev.to/moralito311andr/ai-agents-are-becoming-your-customers-heres-how-they-pay-510i</link>
      <guid>https://dev.to/moralito311andr/ai-agents-are-becoming-your-customers-heres-how-they-pay-510i</guid>
      <description>&lt;p&gt;For twenty years the customer was a human clicking a button. The web is built around that: signup forms, dashboards, credit-card fields, monthly plans. None of it fits an autonomous agent. An agent doesn't click. It calls APIs, and it needs to pay the way it does everything else — programmatically, per call, without a human in the loop.&lt;/p&gt;

&lt;p&gt;The x402 protocol is a small, boring, correct answer to this. A resource returns HTTP 402 Payment Required with a challenge. The caller signs an EIP-3009 transferWithAuthorization (USDC on Base), resends it in an X-PAYMENT header, and the server settles it on-chain and returns the result. No account, no key exchange, no invoice. The payer signs with their own key; the server never holds it.&lt;/p&gt;

&lt;p&gt;I wrote a LangChain SDK that closes the loop so an agent can pay by itself:&lt;/p&gt;

&lt;p&gt;from andreax_langchain_autopay import AndreaxToolkittools = AndreaxToolkit(    wallet="0xYourAgentWallet",    private_key=os.environ["AGENT_PRIVATE_KEY"],    auto_pay=True,    max_usdc_per_call=0.10,    daily_usdc_budget=5.00,).load()&lt;br&gt;
The interesting design decisions are the guardrails, not the payment:&lt;/p&gt;

&lt;p&gt;The key stays with the developer. It's read from your environment and used to sign locally. The SDK never logs it, stores it, or sends it anywhere. Signing an EIP-712 message is a local operation.&lt;/p&gt;

&lt;p&gt;Spending is capped in two dimensions. A per-call ceiling and a daily budget. The SDK raises rather than sign a call that would exceed either. Giving an LLM a wallet is powerful; it should be bounded.&lt;/p&gt;

&lt;p&gt;auto_pay is off by default. Nothing is ever paid unless you opt in and provide a funded wallet.&lt;/p&gt;

&lt;p&gt;The pattern generalizes past any one provider. If you're building tools for agents, serving a 402 with a proper x402 challenge means any x402-aware agent can discover and pay you with zero integration on your side. The buyer is the agent; the human never showed up.&lt;/p&gt;

&lt;p&gt;If you try it, I'd genuinely like to see the spend logs — that's where this stops being a demo.&lt;/p&gt;

&lt;p&gt;Code and tool catalog: &lt;a href="https://pagos.andreax.dev/api/agents/discover" rel="noopener noreferrer"&gt;https://pagos.andreax.dev/api/agents/discover&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>langchain</category>
      <category>web3</category>
      <category>python</category>
    </item>
  </channel>
</rss>
