All use cases
Agent payments11 min readAgent builders and AI marketplaces

How AI agents can pay each other with Solana stablecoins

The fastest way to make agents economically useful is to let them pay for work, receive revenue, and settle tasks without waiting for a human to approve every transfer.

The workflow

An agent marketplace routes work to specialist agents. A research agent finishes a task, a scraping agent returns fresh data, or an inference agent completes a response. The platform needs to move a small stablecoin payment immediately, with an audit trail and no key material inside the agent runtime.

Viaclave handles the wallet, ledger, and Solana settlement layer. The agent calls one API with a Bearer token. Internal Viaclave transfers settle instantly and do not require an on-chain transaction for every micro-task.

Why this matters commercially

Most agent products still monetize like normal SaaS: monthly plans, prepaid credits, manual invoices, or card billing. That works for humans, but it is awkward for agents that need to buy small units of work from other agents in real time.

Stablecoin settlement lets builders price work at the task level. A scraper can charge per result. A research bot can charge per source bundle. A prediction-market bot can pay only for accepted signals. The ROI comes from turning fixed vendor costs into variable costs attached to actual output.

The important number is not transaction volume at launch. The important number is whether a bot can pay another bot without a human sitting in the middle. Once that works, every workflow can be priced, measured, and improved.

Architecture

  • Client agent asks for work from a provider agent.
  • Provider agent returns a price, token, and expected output.
  • Client agent checks budget and spending limits.
  • Client agent sends payment through Viaclave by wallet ID or handle.
  • Provider agent delivers the result and both sides keep an auditable payment record.

What Viaclave replaces

  • Private-key generation and secure storage.
  • Solana RPC polling and retry logic.
  • Associated token account setup.
  • Idempotent payment handling.
  • Balance reconciliation across task completions.

Example payment

The sender can pay another agent by handle or wallet ID. Amounts are sent in token base units, so 1 USDC is 1000000 micro-USDC.

await fetch("https://api.viaclave.com/v1/payments/send", {
  method: "POST",
  headers: {
    "Authorization": "Bearer vc_test_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from_wallet_id: "wal_researcher",
    to_handle: "scraper-agent",
    amount: 1000000,
    token: "USDC",
    memo: "Payment for completed crawl",
    idempotency_key: "crawl-job-42",
  }),
});

Add idempotency before production

Agents retry. Networks fail. Webhooks can be delivered more than once. That means every task payment should include an idempotency key tied to the job, not to a random timestamp.

For example, use crawl-job-42, inference-request-abc, or report-section-7. If the agent retries the same payment after a timeout, Viaclave can return the original result instead of charging twice.

A basic ROI model

Suppose a research agent buys 100 source bundles per day at 0.25 USDC each. That is 25 USDC per day in variable cost. If those bundles replace a 1500 USDC monthly data subscription that the agent only used sporadically, pay-per-result can reduce waste.

The same math applies to inference routing, scraping, translation, moderation, and prediction-market research. The goal is not to make every task cheap. The goal is to pay only when work is requested, delivered, and useful.

Why Solana fits this flow

Agent payments need low fees, fast confirmation, stablecoin liquidity, and simple external settlement. Solana gives Viaclave a fast settlement network, while the internal ledger keeps frequent agent-to-agent payments cheap and immediate.

What to build first

  • Create one wallet for the buyer agent and one for the provider agent.
  • Send test USDC in test mode for a fixed task price.
  • Add idempotency keys tied to job IDs.
  • Add spending limits before live payments.
  • Add webhooks or polling only after the basic payment loop works.

Build this workflow in test mode

Create a test API key, connect the MCP server, or call the REST API directly. Viaclave's test mode lets you try wallet creation and test stablecoin payments without real funds.