<?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: Komari venkata ramana</title>
    <description>The latest articles on DEV Community by Komari venkata ramana (@venkat___).</description>
    <link>https://dev.to/venkat___</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%2F4081313%2Fc3dc524d-30f7-414c-accb-a2377cd81508.png</url>
      <title>DEV Community: Komari venkata ramana</title>
      <link>https://dev.to/venkat___</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/venkat___"/>
    <language>en</language>
    <item>
      <title>Kage: Private Payments for Autonomous AI Agents</title>
      <dc:creator>Komari venkata ramana</dc:creator>
      <pubDate>Mon, 17 Aug 2026 09:33:50 +0000</pubDate>
      <link>https://dev.to/venkat___/kage-private-payments-for-autonomous-ai-agents-43bj</link>
      <guid>https://dev.to/venkat___/kage-private-payments-for-autonomous-ai-agents-43bj</guid>
      <description>&lt;h1&gt;
  
  
  Private Payments for Autonomous AI Agents on Stellar
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;How a scoped session key + a Groth16 shielded pool let an agent spend without your key — and without publishing your counterparties.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An AI agent that can spend money on-chain is only as trustworthy as the key it holds. Hand it a raw private key and two things go wrong at once:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Custody&lt;/strong&gt; — the agent (or whoever compromises it) can drain the whole treasury. There is no "just a little" with an ed25519 key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparency&lt;/strong&gt; — every payment the agent makes is a public record of &lt;em&gt;who&lt;/em&gt; you paid, &lt;em&gt;how much&lt;/em&gt;, and a running map of everything your treasury touches.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Kage fixes both, on Stellar, with two primitives that compose cleanly:&lt;br&gt;
a &lt;strong&gt;scoped session account&lt;/strong&gt; (autonomy without custody) settling through a&lt;br&gt;
&lt;strong&gt;zero-knowledge shielded pool&lt;/strong&gt; (privacy without a trusted relayer).&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem, precisely
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A scoped key that just caps &lt;em&gt;spend&lt;/em&gt; still leaks &lt;em&gt;to whom&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;A private pool that hides recipients still needs a way to scope what an agent may pull.&lt;/li&gt;
&lt;li&gt;On a transparent ledger, the two are usually solved by opposite designs
(custodial scope vs. trustless privacy).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The two layers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Autonomy without custody — the SessionAccount
&lt;/h3&gt;

&lt;p&gt;A Soroban account contract delegates one ephemeral &lt;strong&gt;agent key&lt;/strong&gt;, and its&lt;br&gt;
&lt;code&gt;__check_auth&lt;/code&gt; permits exactly one thing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Veil.deposit&lt;/code&gt; on the configured pool,&lt;/li&gt;
&lt;li&gt;moving the configured token,&lt;/li&gt;
&lt;li&gt;within a &lt;strong&gt;cumulative cap&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;before an expiry&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent signs a Soroban auth entry with its &lt;em&gt;session&lt;/em&gt; key — never the owner's key. The owner can revoke or extend at any time. Worst case for a compromised agent: it spends the remaining cap. It cannot drain, cannot redirect, cannot change the policy.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Privacy by math — the ZK shielded pool
&lt;/h3&gt;

&lt;p&gt;Each payment is a deposit into a Tornado/Privacy-Pools-style pool, then a withdrawal to a &lt;strong&gt;fresh one-time stealth address&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hides the recipient&lt;/strong&gt; — Umbra-style stealth notes; each payee is paid at an address only the recipient can derive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hides the amount + link&lt;/strong&gt; — a zero-knowledge membership proof breaks the deposit↔withdrawal trail. The proof shows "I own &lt;em&gt;some&lt;/em&gt; unspent note" without revealing which.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stops double-spends&lt;/strong&gt; — a per-note nullifier reverts any replay on-chain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trustless tree&lt;/strong&gt; — every deposit carries a Groth16 &lt;em&gt;insert&lt;/em&gt; proof; the contract verifies the new Merkle root itself. No custodian.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Crucially, the contract verifies Groth16 on Soroban's &lt;strong&gt;native BN254 host functions&lt;/strong&gt; — no hand-rolled pairing math in the wasm, and the amount is bound into the proof so a depositor can't commit a large note while under-funding the pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Stellar
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Soroban native BN254&lt;/strong&gt; — the pairing check is a host function, so the ZK verifier is a few dozen lines of trust in the protocol, not a ported library.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native-asset settlement&lt;/strong&gt; — the pool runs on XLM via its Stellar Asset Contract, so there's no wrapped token, no bridge, no extra trust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;x402 / agent payments&lt;/strong&gt; — Kage slots into the x402 "agent pays for its own API calls" model, giving autonomous agents a &lt;em&gt;private, scoped&lt;/em&gt; payment rail.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's live
&lt;/h2&gt;

&lt;p&gt;A testnet deployment runs the full flow end to end — deposit (insert proof verified, USDC/XLM pulled), withdraw (membership proof verified, paid to a stealth address), and a rejected double-spend attempt. On mainnet, the same contracts settle in XLM.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest scope
&lt;/h2&gt;

&lt;p&gt;This is not the full two-key Umbra scheme, and Groth16 means a trusted setup (phase 1 reuses the Hermez powers-of-tau). The deposit amount is published in the event (needed for the amount-binding check), so fixed-size notes are the recommended practice. See the repo's security review for the full ledger of limits.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kage is open source (MIT). Repo: github.com/Venkat5599/kagezks&lt;/em&gt;&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>javascript</category>
      <category>web3</category>
      <category>risein</category>
    </item>
  </channel>
</rss>
