<?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: DX Studio</title>
    <description>The latest articles on DEV Community by DX Studio (@dxstudiobizoss).</description>
    <link>https://dev.to/dxstudiobizoss</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%2F4284156%2F0e49a508-57d2-454e-ba4b-78d4f36c899e.jpg</url>
      <title>DEV Community: DX Studio</title>
      <link>https://dev.to/dxstudiobizoss</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dxstudiobizoss"/>
    <language>en</language>
    <item>
      <title>Agents can hire agents. Paying them is still the hard part.</title>
      <dc:creator>DX Studio</dc:creator>
      <pubDate>Sat, 05 Dec 2026 07:19:22 +0000</pubDate>
      <link>https://dev.to/dxstudiobizoss/agents-can-hire-agents-paying-them-is-still-the-hard-part-2bel</link>
      <guid>https://dev.to/dxstudiobizoss/agents-can-hire-agents-paying-them-is-still-the-hard-part-2bel</guid>
      <description>&lt;p&gt;Every few weeks someone posts a demo of an agent that hires another agent: one model writes a task, another executes it, the result comes back. The demo always stops at the same place — the invoice. Who holds the money while the work is in flight? What stops a client from cancelling after delivery, or a worker from taking the escrow and disappearing? If the answer is "a database and a support inbox", the agent economy is just outsourcing with extra steps.&lt;/p&gt;

&lt;p&gt;I built a small protocol to move that part on-chain, and I want to show what it actually does today, including the parts that are still missing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AgentWage (&lt;code&gt;$WAGE&lt;/code&gt;)&lt;/strong&gt; is an open-source escrow and settlement protocol for agent-to-agent jobs on Solana. A client escrows tokens for a task, a worker bot does the job, the result is sealed as a SHA-256 &lt;strong&gt;Proof of AI Work&lt;/strong&gt;, and settlement pays &lt;strong&gt;98% to the worker and burns 2%&lt;/strong&gt; — in one atomic instruction. It runs on &lt;strong&gt;Solana Devnet&lt;/strong&gt;, the code is MIT, and the program is deployed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Program ID: &lt;code&gt;GrkQrhykbJ6qWSA72ziAFwYsbT5Ty1Ks7mWkKtYppt8P&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Live demo: &lt;a href="https://dxstudiobiz-oss.github.io/agentwage/" rel="noopener noreferrer"&gt;https://dxstudiobiz-oss.github.io/agentwage/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/dxstudiobiz-oss/agentwage" rel="noopener noreferrer"&gt;https://github.com/dxstudiobiz-oss/agentwage&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The flow in one diagram
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;client wallet        AgentWage program        payout wallet (bot owner)
─────────────        ─────────────────        ────────────────────────

post_job_v2(amount, ► escrow ATA (vault-authority PDA)
 proof_seed)             │ locked: settle / cancel
                         │
agent executes task      │
returns proof_hash ─────►│
                         │
settle_job_v2(hash) ─────┤
                         ├─ 98% ─► ATA(agent.payout_wallet)
                         ├─  2% ─► token::burn  (supply ↓)
                         └─ total_burned += burn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three details are doing the real work here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Escrow is not a wallet.&lt;/strong&gt; Funds sit in an ATA owned by a &lt;code&gt;vault-authority&lt;/code&gt; PDA, so no human key can move them out. They leave in exactly two directions: back to the client (&lt;code&gt;cancel_job_v2&lt;/code&gt;) or split into payout + burn (&lt;code&gt;settle_job_v2&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The proof is committed, not the output.&lt;/strong&gt; The worker's result is hashed off-chain as &lt;code&gt;agent | input | output | timestamp | wallet&lt;/code&gt; and the 32-byte hash is stored in the job account and emitted in the &lt;code&gt;JobSettled&lt;/code&gt; event. Anyone holding the original text can recompute the hash. Nobody has to trust the backend's log line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The fee cannot be raised.&lt;/strong&gt; &lt;code&gt;burn_rate_bps&lt;/code&gt; is capped at 1,000 bps (10%) at initialization and may only decrease. The mint authority is revoked in &lt;code&gt;initialize_protocol&lt;/code&gt;, so supply can fall and never rise.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The bug that made v1 useless in practice
&lt;/h2&gt;

&lt;p&gt;The v1 &lt;code&gt;settle_job&lt;/code&gt; paid 98% to &lt;code&gt;agent.owner&lt;/code&gt;. That works when the same person runs the bot and owns the keys. It breaks the moment an operator runs workers on a pooled or keeper key: the person doing the work is not the person the program pays.&lt;/p&gt;

&lt;p&gt;v2 separates the two roles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// AgentV2: ["agent_v2", owner, agent_id]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;AgentV2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Pubkey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// controls the agent, can rotate payout&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;payout_wallet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Pubkey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// receives the 98%&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;earnings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;u64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// settle_job_v2 — the constraint that makes it enforceable&lt;/span&gt;
&lt;span class="cp"&gt;#[account(
    mut,
    constraint = payout_token.owner == agent.payout_wallet
        @ AgentWageError::PayoutWalletMismatch
)]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;payout_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Account&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;'info&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TokenAccount&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;register_agent_v2(agent_id, endpoint, payout_wallet)&lt;/code&gt; binds the wallet on-chain, &lt;code&gt;set_payout_wallet&lt;/code&gt; rotates it, and &lt;code&gt;settle_job_v2&lt;/code&gt; refuses to pay anywhere else with &lt;code&gt;PayoutWalletMismatch (6008)&lt;/code&gt;. A simulation that pointed the payout account at a token account owned by a different wallet was rejected on devnet and moved nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Measured on-chain, not simulated
&lt;/h3&gt;

&lt;p&gt;Two separate devnet wallets were used: the client/agent owner, and a fresh worker wallet that had never held &lt;code&gt;$WAGE&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client / payer / agent owner&lt;/strong&gt; — &lt;code&gt;8MfQUFETt2YKEgCseEc7XUJP46kAK771kqhur9RFYM8d&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worker / &lt;code&gt;payout_wallet&lt;/code&gt;&lt;/strong&gt; — &lt;code&gt;75xSELxmywzRacchEY5UoTmFn3e4HRiGY3DfAW4C5Ey9&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent account (&lt;code&gt;agent_v2&lt;/code&gt;)&lt;/strong&gt; — &lt;code&gt;BnWC2kDhTtGmLPmncAXaZvmCAAwLu9xMbZDvLL28BHLb&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 10 &lt;code&gt;$WAGE&lt;/code&gt; job was escrowed and settled in one instruction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;register_agent_v2&lt;/code&gt; → &lt;a href="https://solscan.io/tx/4nYtxVqCpqjKFQTX4BHYCtmJejx3mwKZRAuNyckfquDbJkUb8CpwtdPWKmDNkFSHvphnYDNW4w7Hm8H5jAwFq9sv?cluster=devnet" rel="noopener noreferrer"&gt;https://solscan.io/tx/4nYtxVqCpqjKFQTX4BHYCtmJejx3mwKZRAuNyckfquDbJkUb8CpwtdPWKmDNkFSHvphnYDNW4w7Hm8H5jAwFq9sv?cluster=devnet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;post_job_v2&lt;/code&gt; (10 &lt;code&gt;$WAGE&lt;/code&gt; into escrow) → &lt;a href="https://solscan.io/tx/31pYAWTEnjkyhSJFDux1rrozBSzf681mq5dCKuMznBWwaZd9FKammAv1qU17EgacPAYqjioU6DAsy3fDjyqFfo4K?cluster=devnet" rel="noopener noreferrer"&gt;https://solscan.io/tx/31pYAWTEnjkyhSJFDux1rrozBSzf681mq5dCKuMznBWwaZd9FKammAv1qU17EgacPAYqjioU6DAsy3fDjyqFfo4K?cluster=devnet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;settle_job_v2&lt;/code&gt; → +9.8 to the worker, 0.2 burned&lt;/strong&gt; → &lt;a href="https://solscan.io/tx/2F6WMB9yPmHAz4jUXuMGFxyYJ6o2bf26yinRy2ucfat1MjjWxDTsacetcZgXBntnzvVLyKPaoGp1ExUmxaqJ3mfR?cluster=devnet" rel="noopener noreferrer"&gt;https://solscan.io/tx/2F6WMB9yPmHAz4jUXuMGFxyYJ6o2bf26yinRy2ucfat1MjjWxDTsacetcZgXBntnzvVLyKPaoGp1ExUmxaqJ3mfR?cluster=devnet&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reading the transaction back from the RPC rather than from the app's own ledger: the client's &lt;code&gt;$WAGE&lt;/code&gt; account goes &lt;code&gt;10 → 0&lt;/code&gt;, the worker's account goes &lt;code&gt;0 → 9.8&lt;/code&gt;, and the mint supply steps down by 0.2. Every transaction returned &lt;code&gt;err: null&lt;/code&gt; and is finalized. The cancel path was exercised separately with its own 1 &lt;code&gt;$WAGE&lt;/code&gt; job and refunded the client.&lt;/p&gt;

&lt;p&gt;This matters more than it sounds. A settlement demo that prints "2% burned" from JavaScript proves nothing about the program's constraints. The constraint is the product.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a worker has to implement
&lt;/h2&gt;

&lt;p&gt;The protocol deliberately defines almost nothing about the agent itself. Any process that answers HTTP can be paid. The page POSTs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"job_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"JOB-9F2A1C"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"task_input"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"the client's task text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"reward_wage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;5.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"burn_rate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.02&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and expects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"output"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"my-model-v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"latency_ms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;812&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;output&lt;/code&gt; can be a string or any JSON object. Two ready-to-run workers ship in the repo, each a single file with &lt;strong&gt;zero dependencies&lt;/strong&gt; — Python's &lt;code&gt;http.server&lt;/code&gt; and Node's built-in &lt;code&gt;http&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 examples/worker-python/server.py   &lt;span class="c"&gt;# → http://localhost:8787/run&lt;/span&gt;
node    examples/worker-node/server.js     &lt;span class="c"&gt;# → http://localhost:8787/run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both answer the CORS preflight, keep responses under 12 seconds, and return their own SHA-256 proof. Without an API key they run a deterministic local handler, so you can walk the entire escrow → execute → settle path for free; set &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; or &lt;code&gt;XAI_API_KEY&lt;/code&gt; and the same endpoint calls a real model. Wiring a real agent in means replacing one function — &lt;code&gt;run_my_model()&lt;/code&gt; / &lt;code&gt;runMyModel()&lt;/code&gt; — and leaving everything else alone.&lt;/p&gt;

&lt;p&gt;In the web app you register the endpoint and the payout wallet, the bot appears in the job market, and a run makes a real &lt;code&gt;fetch()&lt;/code&gt; from the browser to your endpoint. The worker is always called &lt;strong&gt;before&lt;/strong&gt; any transaction is submitted, so an offline bot can never leave escrow locked.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is actually live today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The web app is a static page with no backend: Phantom wallet connection on devnet, live protocol telemetry decoded from the Protocol PDA and the mint on every load, three deterministic built-in agents (claim auditor, localization QA, chain parser), external worker registration, and a locally persisted settlement ledger with a burn chart.&lt;/li&gt;
&lt;li&gt;The Anchor program is deployed to devnet, built for sBPFv3, with the deployed bytecode byte-identical to the committed source build.&lt;/li&gt;
&lt;li&gt;Current devnet mint supply is &lt;strong&gt;9,997.0 &lt;code&gt;$WAGE&lt;/code&gt;&lt;/strong&gt; against a 10,000 test mint whose mint authority was revoked at initialization — it only moves down.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is &lt;em&gt;not&lt;/em&gt; there yet
&lt;/h2&gt;

&lt;p&gt;I would rather list this than have you find it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Devnet only.&lt;/strong&gt; There is no mainnet deployment, no audit, and no security review. The program is a demo, not a product. Do not send funds to any address in the repo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No reputation layer.&lt;/strong&gt; Escrow enforces that money moves correctly; it does not tell a client whether a worker is any good. Dispute resolution is currently "cancel before settlement". Reputation and staking are the next design problem, and they are unsolved here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The ledger in the browser is local.&lt;/strong&gt; Only the on-chain settlement is real; the running totals and chart in the UI live in &lt;code&gt;localStorage&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The built-in agents are deterministic demos&lt;/strong&gt;, not LLM calls. They are there so results are reproducible.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Live demo: &lt;a href="https://dxstudiobiz-oss.github.io/agentwage/" rel="noopener noreferrer"&gt;https://dxstudiobiz-oss.github.io/agentwage/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code (MIT): &lt;a href="https://github.com/dxstudiobiz-oss/agentwage" rel="noopener noreferrer"&gt;https://github.com/dxstudiobiz-oss/agentwage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Program: &lt;code&gt;GrkQrhykbJ6qWSA72ziAFwYsbT5Ty1Ks7mWkKtYppt8P&lt;/code&gt; on devnet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If agent-to-agent payments are going to be more than a demo, the escrow and the payout constraint have to be boring, inspectable, and enforced by the chain rather than by a server. That is the part I wanted to get right, and devnet is where it can be checked today. A star on the repo helps more people find it; issues that break the settlement path are more useful than stars.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$WAGE&lt;/code&gt; is a utility token for paying agents inside this protocol. It is not for sale, and none of this is investment advice.&lt;/p&gt;

</description>
      <category>solana</category>
      <category>ai</category>
      <category>web3</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
