dani.ai

AI jobs with a guaranteed start time, paid through escrow, and a market to trade your place in line

dani.ai

Created At

ETHGlobal Mumbai

Project Description

AI agents work to deadlines, but GPU time is rented by the hour and a queue promises nothing about when a job runs. An urgent job can sit behind work that could wait all day, with no way to move up.

dani.ai is a market for GPU time built around one promise: every job gets a time it must start by. A provider measures its own slowest speed and plays its queue forward assuming every job runs as long as it possibly can. Where a new booking lands is its start-by time. Real jobs finish early, so tickets only ever start sooner, and new bookings never push back an existing promise. A job that runs long is never killed; the provider absorbs the overrun.

Payment goes into escrow, not to the provider. Providers set their own prices by job size. You deposit the price of your job's maximum size, the escrow charges the size the job actually used, and the rest comes back. If the start slips, part of the charge is refunded: 25% up to 30 seconds late, 50% up to a minute, and everything if it's later, fails, or never starts. Lateness is judged by Hedera consensus timestamps, not by anyone's clock.

An agent that's running late can buy an earlier place from one that can wait. The seller only accepts a later place that still meets its own deadline, and both places plus the payment move in one atomic transaction. Agents can also reserve capacity ahead at today's price and resell it if plans change.

In the web app, people sign in with HashPack, approve a budget, and get their own agent. They can book a single job, a batch (one instruction over many files, lines or CSV rows), or a repeating job that reserves each run's place ahead. Anyone with a GPU can join as a provider with one command and their own wallet. Every provider gets a public track record built from the messages it signed on Hedera. It all runs on Hedera testnet, with Arkiv for discovery and public records.

How it's Made

A TypeScript monorepo with five packages: shared (types and chain helpers), provider, agent, host and web.

Provider: Built with Node.js, it works with any OpenAI-compatible model server. Our demo uses Ollama running Qwen2.5 0.5B. At startup, it calibrates its worst-case performance by keeping every worker busy and testing the longest inputs and outputs. Random prefixes prevent prompt caching from making performance appear faster than it actually is. Jobs stream over SSE, allowing the provider to monitor token generation and distinguish slow jobs from stalled ones. Scheduling uses a list-scheduling simulation of the entire queue, and bookings are only accepted if they don't increase the number of promises that could be broken.

Hedera (@hiero-ledger/sdk): Handles all payments and execution proofs.

  • x402 payments: Payments go into an escrow account through the blocky402 facilitator. An unpaid request to /book returns an HTTP 402 response containing the current price and promised start-by time, allowing agents to get a live quote for free.
  • Signed HCS log: Each provider maintains a batched, signed log of bookings, starts, results and trades on its own HCS topic.
  • Escrow keeper: Reads these logs and uses Hedera consensus timestamps to determine payouts.
  • HTS NFTs: Queue positions are minted as NFTs only when traded. Afterward, they return to the treasury and are reissued by updating their metadata through TokenUpdateNfts, costing approximately one-tenth as much as minting new ones.
  • Atomic trades: A single TransferTransaction handles two NFT transfers and the HBAR payment. The seller verifies the transaction details before signing.
  • Budgets: Users provide their agents with HBAR allowances directly from their wallets, so funds remain in their wallets until a booking is made.

Arkiv: Acts as the discovery layer.

  • Provider offers: Providers publish their model, speed, pricing by job size and next available start time. Offers expire automatically, so offline providers disappear without manual cleanup.
  • Places for sale: Buyers can find suitable tickets using a single typed query filtering by start time, seller deadline, size and budget.
  • Public task records: No private content is stored. Since records are claims, agents verify each entity's owner against the provider's account before trusting it.

Host: Runs one agent per signed-in user. Sign-in verifies HashPack signatures over one-time challenges. Agent keys are derived from a host secret, allowing accounts to be recovered through Hedera even if the database is lost. Storage uses PostgreSQL through Drizzle, with embedded PGlite when no database is configured.

Web: Built with React 19 and Vite, using TanStack Query, view transitions and hedera-wallet-connect for HashPack. The wallet SDK and pdf.js (for reading dropped PDFs directly in the browser) are loaded only when needed.

background image mobile

Join the mailing list

Get the latest news and updates