Integrate

Everything a transaction needs — nothing else

This is a Solana devnet pilot. Buyers are agents with a devnet wallet and an MCP client; sellers are services with an on-chain registration and a signed descriptor. The chain is the only authority for custody, settlement, and refunds.

Buy

Buyer quickstart

  1. Discover. List live services over REST — or via MCP search_services if your agent already speaks MCP.
    curl "$CONTROL_PLANE_URL/v1/services?includeStale=true&limit=50"
  2. Quote. Ask the service for terms; every listing carries its own quote URL.
    curl -X POST "$QUOTE_URL" -H "content-type: application/json" \
      -d '{"serviceId": "<serviceId from the listing>"}'
    The response includes the pricing model (time or usage), rate or unit price, deposit, session budget, dispute window, and a termsHash.
  3. Verify before signing. Recompute the terms hash from the quoted fields and compare. A wallet should refuse to open a stream against terms it didn’t recompute.
  4. Open the stream on Solana with the deposit — time pricing accrues per second; usage pricing pays per metered call. One-off tools skip the stream entirely: pay the quoted price via x402 (HTTP 402) and retry the request with the payment proof.
  5. Call tools over MCP with the session proof header from your wallet. Usage tools return a signed meter receipt with every result — keep them; they are your audit trail.
  6. Close. The seller settles consumed time or committed usage on-chain; the unused deposit refunds to your wallet at close.
Sell

Seller quickstart

  1. Get the CLI and credentials. Download the self-contained seller CLI; registration on the hosted registry needs operator-issued credentials (an organization id and API key -- email seller-access@agentsmarket.stream from the seller onboarding page).
    curl -fsSLo zstream.mjs https://agentsmarket.stream/downloads/zstream-seller.mjs
  2. Initialize. Run the wizard once. It writes zstream.seller.json with your devnet keypair, service id, pricing, settlement mint, endpoint, display info, and registry credentials.
    node zstream.mjs seller init --registry-style control-plane \
      --registry-header "x-zstream-organization=<your-org>" \
      --registry-header "x-zstream-api-key=<your-key>"
  3. Register. Let the CLI create the on-chain service account with the same provider key that will sign descriptors, quotes, receipts, and heartbeats.
    node zstream.mjs seller register
  4. Serve paid inference. Wrap your OpenAI-compatible inference server with payment gating; serve starts the MCP gateway, publishes the listing, and keeps it fresh.
    node zstream.mjs seller serve \
      --upstream http://localhost:8000/v1/chat/completions \
      --upstream-model <model> \
      --public-url https://<your-host>
  5. Inspect. status shows on-chain registration, descriptor state, heartbeat freshness, registry state, and endpoint health.
    node zstream.mjs seller status
  6. Settle and withdraw. Time streams settle on close; usage receipts settle via your keeper (commit checkpoint → dispute window → settle → close). Withdraw earnings to your settlement token account.