Build pipeline & harness
Every phase from analysis to verified preview; sprints and Best-of-N. This page is part of the Building apps chapter of the TokenOS documentation.
- Build pipeline & harness A build is a sequence of deterministic phases around a handful of model calls. Understanding the phases explains what Mission Control is streaming, why a task stays processing after the files exist, and what the credits buy. Phases of POST /api/create-project-async Jev classifies the prompt (intent, complexity, whether it touches money, whether it needs a browser check) and suggests a model tier. The wallet signature on the body is verified and credits are reserved.
- The CIE deep-researches the prompt into a product plan: pages, data model, on-chain actions, design direction. Plans are cached so a retry is cheap.
- Tokens, type scale and component conventions are fixed for the whole app so pages generated in parallel look like one product.
- Every page is produced as two parallel passes — a data layer and a JSX render layer — with truncation detection, brace / paren balance checks, JSX-tag salvage trim and automatic cross-provider fallback.
- The deterministic runtime ( config.js , lib/web3.js , hooks/useWallet.js , lib/walletBridge.js ) is written and repair_page_hazards rewrites common mistakes (treating the wallet string as a provider, missing state declarations, keyed RPC URLs).
- Every /media/… reference is resolved to a real asset: raster hero / feature images from the Gemini image model, procedural SVG logos. Assets are stored and materialised into the preview. See Quality gate & brand art .
- The project is bundled with Vite into a static preview served under a sandboxed path; a node-free in-browser fallback exists for environments without a bundler.
- Headless Chromium mounts the preview, captures console / page errors and a screenshot. Failures are sent back to the model for up to 2 repair rounds ; the outcome is recorded as result.render .
- Only now does the task flip to completed with result.preview_url and result.render . If generation failed outright the reserved credits are refunded.
Task status payload
Build harness (sprints)
For larger goals the harness runs plan → sprint → evaluate loops against an existing project with self-healing between sprints. Start it from the Agents window (⌘J) or POST /api/harness/start (wallet-signed).
Best-of-N
Run the same goal on 2 – 3 distinct models in parallel, compare the evaluator scores and apply the winning snapshot. POST /api/harness/best-of-n , 20 credits per model. Runs appear in the Sessions rail and under GET /api/runs .
plan 10 credits · each sprint 15 · each eval 5
max_sprints ≤ 6 · max_attempts ≤ 4 · budget = 60 × max_sprints credits
static checks → isolated LLM evaluator → browser (optional, verify_browser) → Jev acceptance
Per-provider concurrency caps and model-aware output budgets.
Truncation auto-retry with tighter prompts; a Retry pill in the IDE when an upstream provider hiccups.
Automatic fallback chains per provider so a build never dead-ends on an outage.
Build-status registry with auto-rebuild of stale previews.
Browse the full TokenOS documentation or jump to the API reference, credits & pricing or FAQ.
About TokenOS
TokenOS is the AI operating system for the autonomous Web3 economy. It combines an agentic IDE that turns a prompt into a deployed dApp, a marketplace of x402-paid AI agents, a peer-to-peer AI inference market where anyone can sell spare API quota or GPU time for USDC, MCP and A2A connectors for Claude, Cursor and ChatGPT, and the $TOS utility and governance token on Solana.
Builders pay with prepaid credits; sellers and agent creators are paid for work actually delivered; TokenOS indexes, verifies and settles. Nothing on this site is investment advice, and node payouts, agent payments and referral credits are fees for usage — not token distributions or returns.