The app
You wanted an agent that runs each morning without a setup project. The app is where that
promise lives: seven places, Start here, Launch, Marketplace, My Agents,
Earn, ZAI and Docs, in dapp/. Open it at / on Base Sepolia;
scripts/devstack.sh review starts a copy against the local development network, and every page
is linked from the welcome page.
Pages
Each page is one thing a person, or their agent, comes to do.
| Page | What it is for | Built on |
|---|---|---|
Home (/) | The story, how it works, and one section per thing you can do. The network figures on the page, services live, operators, ZAI staked, paid calls and USDC paid, are live. | Chain reads + the indexer. |
Marketplace (/marketplace) | Everything agents can buy, under five categories that stay in view: Private Node (your own node: connectors, installed models, workspace, hardware, wallet), LLMs (language models, planners, vision and judges, embeddings, text tools, training), Skills (open source and listed on nodes), Services (everything that acts: media, compute, MCP servers, swaps, hosting, outreach, social, agents for hire, optimizers) and Data (chain, price and trading data, prediction markets, analytics, news, web and public data). Under the chosen one its groups as chips with counts, several at once; the search narrows within them; a sort by recommended, most used, price, stake or rating; cards that open a full page. The URL carries the view, ?top=services&sub=image,video, so a link opens the same one. Live listings, run by staked operators, sit beside ready-made ones anyone can switch on; the ratings come from settled sessions: agents file them from real results. | Indexer catalogue + a live probe of each node; the template gallery in offchain/templates; which category a group sits under is Group.top in dapp/lib/catalog.ts. |
Service pages (/service/[id]) | Everything about one listing: the price per call, the node serving it and whether it is up, the operator and their stake, the tools, the exact 402 challenge a paying agent receives, how to call it from Claude, TypeScript, Python or plain HTTP, recent activity and trust signals, including the reputation built from the ratings agents filed after their sessions settled. | Node /health, /services and tools/list; chain reads for sessions and disputes. |
Listing pages (/listing/[template]) | A ready-made listing nobody serves yet: what it does, what it needs, what it could earn, and one button into Earn with it pre-filled. | The template gallery. |
Start here (/start) | Your node in four steps: installed (on this device or a server), what it connects to, the network, your first job. | The private node's routes through the app's server. |
Launch (/launch) | What you build, where it runs, then the brief or the listing, one card a step; the nodes you run, a new one on this device or a server, the best live shared runner picked for you. | The private node, the directory, the runner. |
My Agents (/my-agents, /my-agents/[id]) | Every agent of yours with its spend, runs and last run; one opens its record: results, runs with receipts and sessions on chain, spend by service and by day, the jobs. | The runner. |
Deploy Agents (/agents, /agents/[id], /agents/[id]/edit; hidden from the nav since 2026-10-12, one flag in Nav.tsx shows it again) | Build an agent, or a network of them, in four steps at the top; your agents and ready-made ones below. The build sets what it may use (only your picks, your picks first and then anything it finds, or fully loose) and a never-use list that rules services out for good, plus its budget; an agent that may find its own has a free marketplace search during a run, whatever it finds becomes callable within its budget, and it may try one service against another and keep the better result. An agent's page runs it, shows every search it made, every paid call and its receipt, its history and its schedule, and the rating it filed for each operator once the session settled (0–100, from errors and slow answers), and publishes it as a service other agents can hire. | The agent runner (offchain/src/agents/server.ts); sessions, vouchers and ratings through the SDK. |
Wallet budget (/agents/budget) | Give your agent a budget, not your keys: the connected wallet deploys its smart account, funds it with USDC, approves the PaymentManager and authorizes a budget-capped, expiring session key. The key is shown once and handed to whatever runs the agent. Check or revoke a key. Fund it from any chain: the card "Fund your AI wallet from any chain" shows the wallet's deposit address, quotes any major asset on any major chain to USDC here, sends it from your wallet and follows the deposit until it is credited, minus the 1% conversion fee; on a network the route provider does not deliver to, the local development network among them, the same card shows the deposit address, the line "Routes from other chains deliver to Base; on this network send USDC to your deposit address and it is swept to your AI wallet" and Sweep now. | ERC-4337 smart account + session keys, RainbowKit wallet connect; the deposit service. |
Earn (/earn) | Sell an API, a model, a scraper or one of your agents: pick a ready-made listing or your own thing, set price and stake, make one real call through the node, go live. Download the node config, keys file and start commands. | The template gallery; ServiceRegistry + StakingManager. |
ZAI (/zai) | Six tabs. Stake: back an operator, claim USDC, unstake with a cooldown. Jury: stake as a juror, commit and reveal votes on disputes, finalize them, unstake with a cooldown. Token: supply, distribution, burn, live. Activity: sessions, disputes, staking, node registry and ZAI transfers, searchable. Deep links: ?tab=stake|jury|token|activity. | StakingManager, CommitRevealArbitrator, token reads, chain events + the indexer. |
Your network (/settings) | Point the app at parts you run: the agent runner, marketplace directory, catalogue node, your selling node, deposit service, bundler and your private node, one field each with a live check; saved in your browser, the hosted defaults one click away. | localStorage; every page reads its addresses through it. |
Docs (/docs) | The documentation, served by the app. Click any block to leave a note; /notes lists every note by page. | The mdBook build under public/docs; the notes API. |
Landing (/) and token page (/token) | The story for a first-time visitor; /landing-v1 keeps the earlier landing. | React, chain reads and the directory for the figures. |
Earlier paths still land where people expect: /browse → /marketplace; /sell → /earn;
/staking → /zai; /arbitration → /zai?tab=jury; /explorer → /zai?tab=activity;
/token.html → /token; /agent → /agents/budget.
Where the data comes from. The chain is the record: listings, prices, stake, sessions and the fee
split, ratings, paid reviews, disputes, every node's address and certificate pin. With
NEXT_PUBLIC_SUBGRAPH_URL naming a graph-node that serves the repository's subgraph (subgraph/), the
app reads all of that from the subgraph and needs no directory for it: the Network tab, the activity
overview and sessions, the token's holders. Anyone can run this front-end from an RPC and a subgraph.
A directory (offchain/src/indexer) adds what is not on chain: whether a node answers right now, its
tools and load, the experience records runners sign after paid calls; anyone can run one, and the app
takes the one it is pointed at. The app's own server proxies a browser's calls to nodes and runners,
since a browser refuses plain http to another machine; a node with a browser-trusted certificate can be
called straight from the page.
Stack: Next.js 15 (app router) + React 19 + TypeScript, viem + wagmi + RainbowKit, TanStack
Query, one design system in dapp/app/globals.css (Manrope + JetBrains Mono, 16px base type, 40px
controls, shared cards, badges, tables, steppers, dialogs) and shared components in
dapp/components. Reads come from the chain and the discovery indexer. Every page works at phone
width.
How the app was planned
Planned in June 2026 as five surfaces; the pages above are what shipped, and each surface's mapping to contracts and endpoints still holds.
1. Agent-builder app (discover → set budget → watch spend)
The flagship consumer surface. The plan had the person discover services (browse and search by category, price per call, accepted assets and operator reputation), set a budget (open a prepaid session, authorize an agent up to a cap) and watch spend (cumulative spend, calls made, remaining deposit and the final settlement: operator net, protocol fee, delegator share, refund). What shipped takes the first off the person: on Deploy Agents an assistant-mode agent allowed to find tools on its own searches the marketplace during a run, within the budget set, and rates each operator afterwards from the results it got.
On the network:
- Discovery → subgraph
Service/Node/Reputationentities; per-service detail pulls the node runtime'sGET /servicesandPOST /mcp tools/list. - Funding →
PaymentManageropen paths:openSessionETH,openSession,openSessionWithPermit2(any ERC-20 incl. USDT), and the gaslessopenSessionWithAuthorization(USDC / EIP-3009, via the facilitatorPOST /open/eip3009). See ARCHITECTURE.md §3. - Per-call payment →
signVoucher(signer, chainId, paymentAddr, sessionId, cumulativeAmount)from the SDK, sent as thepaymentfield ofPOST /mcp tools/call; a402JSON-RPC error is the x402 "pay me" signal (offchain/SPEC.md). - "Set a budget, don't sign every call" → the session-key / spending-cap layer (budgets and session keys): the session key signs vouchers up to the cap so the human signs once.
- Spend/settlement view → session
status(SessionStatus) and theSessionsubgraph entity (gross,operatorNet,protocolFee,delegatorShare,refund).
2. Node-operator dashboard
For people running services (MCP tool servers, resold APIs, models): register an on-chain
identity, stake ZAI, list or edit a service with its price per call and accepted assets, watch
live sessions, earnings, reputation (the ratings agents file after settled sessions) and
disputes, and trigger settlement. It shipped as Earn and the service pages: a GUI over what
offchain/src/node/server.ts and setup.ts do on startup (stake, register identity, register
service).
On the network:
- Identity →
IdentityRegistry(ERC-8004). - Stake →
StakingManager.stake(capacity =maxConcurrent = 1 + (totalStake − minNodeStake) / tokensPerSession, 0 until live); defaultminSelfStake100 ZAI (the operator's own, enough to list),minNodeStake10,000 ZAI (total, own + delegated, at which the node is live),tokensPerSession100 ZAI. A listing holdslistingBond(100 ZAI) in the registry while it is up, returned 14 days after it is taken down. - Listing →
ServiceRegistry(category,descriptorURI,pricePerCall,acceptedAssets,setAcceptedAsset); listing needs the operator's own floor, the listing is live at the node floor. - Live ops → mirror the node runtime's
GET /health,GET /services, andPOST /settle; show earnings split and reputation from theSession/Reputation/Feedbacksubgraph entities. - Disputes →
DisputeManagerstate (raised / ruled / slashed) for the operator's sessions.
3. Staking / delegation dashboard
For ZAI holders securing the network: browse nodes by stake, capacity, reputation and commission, self-stake or delegate, view and claim multi-asset rewards (USDC/USDT/ETH), start unbonding and claim after the cooldown, see the impact of any slashing; operators set their commission here. It shipped as the Stake tab of ZAI, pure wallet-connect (RainbowKit).
On the network:
StakingManager:stake/delegate/initiateUndelegate+withdrawUndelegated,claimDelegatorRewardsandclaimOperatorRewards(multi-asset, MasterChefaccRewardPerShare), unbonding (default 7 days),maxCommission(default 20%),delegatedAssetsOf(post-slash value). See ARCHITECTURE.md §4.- Reads → subgraph
Node(totalStaked,totalDelegated,totalSlashed, with per-asset rewards in itsassetStats/NodeAssetStatentries) andDelegation(amountper delegator/operator pair). - Reward source → the
delegatorShare(default 10% / 1000 bps) routed from each settlement vianotifyReward.
4. Network explorer (built on the subgraph)
A read-only "app store + analytics" view of the whole network, no wallet needed: nodes
(stake, delegation, slashing, reputation), services (category, price, activity), sessions
with their settlement split, reputation/feedback, identities, and network-wide volume,
fees to treasury and rewards, over the entire subgraph/ schema (Node, Service, Session,
Delegation, Feedback, Reputation, Identity) via GraphQL, with no contract writes. It
shipped as the Activity tab of ZAI, which reads sessions, disputes and ZAI transfers as chain
events over RPC and the node registry from the indexer rather than the subgraph; that indexer is
also what the agent runner searches to find services. Indexing and monitoring:
Operating the network.
5. Marketing landing page
The public front door for the three audiences (agents/builders, node operators, ZAI stakers): a
one-line pitch ("a decentralized, metered marketplace for AI agent services — pay per call in
USDC/USDT/ETH; ZAI secures and governs, it is never a payment asset"), a how-it-works diagram
mirroring ARCHITECTURE.md §2, CTAs into the dashboards
and the explorer, and links to the docs and GitHub. Static or SSR via Next.js for SEO, no wallet
logic beyond "Launch app" buttons. It shipped as the landing site and token page in site/ and
the app's Home.
Where the story ends
You wanted an agent that watches the market each morning and posts a brief, without the accounts, cards, keys and wiring that used to come first, or the job of keeping it all alive. On Deploy Agents you build that agent, give it a budget instead of your keys, let it find its tools on the Marketplace and pay per call, and read the ratings it files. On Earn, the people who serve those tools are paid the moment a call is answered; on ZAI, the stakers who back them and the jurors who settle the rare dispute earn for keeping it honest. Open the app, give an agent a budget, and let it work.
See also: offchain/SPEC.md · ARCHITECTURE.md · subgraph/README.md · Operating the network
Next: Welcome — back to the door the story opened with, now with the agent, the budget and the ratings in hand.