Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

13.6 KB
Raw Blame

harness.autonomous.ai

The Harness web app is the Flutter app in ../desktop, built for the browser. This package is the Next.js host that serves it, the public harness community, and the routes the rest of Harness links to.

It replaced the React website that lived in autonomous-ai/autonomous-code (apps/web). That app is retired; only the host routes below were kept.

Routes

Route What
/, /s/:id, /auth/callback, /callback The Flutter app (public/harness-web/index.html, via rewrites() in next.config.js); / is the workspace and the front door (owner, 2026-10-26), where sign-in returns (src/lib/webApp.ts), and an hn view link (/?machine=…&agent=…) opens its viewer
/web Redirects (307) to /, keeping the query: the workspace's address from 2026-10-13 to 2026-10-26, when the Hub was the front door
/download (and /install → it) Install page: CLI command and desktop downloads
/app The phone app's download code: an iPhone or iPad is redirected to the App Store and an Android device to Google Play, by user agent (src/lib/phoneApp.ts); anything else gets both stores
/pair Phone setup guidance — the mobile app and the desktop "add phone" dialog link here
/os The Harness operating system landing page: plain HTML/CSS, local fonts and screenshots in public/os/
/agents Harness for agents: install, the agent commands with examples and exit codes, the plugin and skill. One plain HTML file, public/agents/index.html, with no script
/llms.txt The llms.txt summary for agents, public/llms.txt
/os/latest Redirect to the newest complete published OS release; OS tags only, stable preferred, five-minute server lookup cache
/desktop Desktop download page; offers the build for the visitor's OS and CPU (src/lib/desktopPlatform.ts), with links to every other build and the CLI command
/hub, /hub/following, /hub/yours Public three-column gallery, followed creators, and your publications; ?q=, ?category= and ?sort=popular narrow and order them
/hub/:id Full-page output viewer (full screen) beside the published conversation, comments or source files, with likes, a copyable link and the harness's public forks
/hub/:id/fork, /hub/:id/download Desktop handoff fallback and an optional project ZIP
/hub/:id/snapshot Public, bounded snapshot consumed by the desktop handoff
/hub/import One-use desktop handoff into a private browser draft
/hub/publish Review and explicitly publish one portable session snapshot
/api/community/* Same-origin proxy for the backend's community API
/desktop/download-macos, /desktop/download/{macos-arm64,linux-x64,linux-arm64} Redirect to the latest build in the desktop manifest (download-macos is the Intel build, which every Mac runs; macos-arm64 the Apple silicon one)
/flash-circle.sh The dial firmware flasher script
/install.sh, /cli/install.sh, /desktop/install.sh Redirect to the installers on cdn.autonomous.ai
ac.autonomous.ai, fleet.autonomous.ai Redirect to harness.autonomous.ai

/agents and /llms.txt describe commands agents run as written. scripts/agents-site.spec.ts checks every harness command on them against cli/src/cli.ts, the exit codes against the agent commands, and the install lines against .claude-plugin/marketplace.json; scripts/check-agents-site.mjs checks the built server serves both unchanged. Change them with the CLI and the harness skill.

The CLI installer is cli/scripts/install.sh. The desktop installer's source is scripts/desktop-install.sh here, published with scripts/upload-desktop-install-sh.sh.

Releasing

The community requires the corresponding backend release and its four community_* collections and indexes in backend/prisma/schema.prisma. Deploy that backend before exposing the website's social and publishing actions. The feed's category, order and forks filters need a backend that accepts them (it rejects unknown feed parameters), so deploy the backend first. Eighteen local examples remain browsable if the API is unavailable. Their published briefs are labeled as examples; engagement starts at zero.

Push a vX.Y.Z_web tag — make release-web from the repo root cuts the next one. .github/workflows/release-web.yml builds the Flutter bundle from desktop/, bakes it into Dockerfile.k8s through HARNESS_WEB_ARCHIVE, and pushes gcr.io/autonomous-ecm/autonomous-code-website:<tag> and :latest. ArgoCD rolls it out; verify https://harness.autonomous.ai/harness-web/release.json afterward. Rollback is the previous image tag, which carries its own bundle. The bundle is also published as a GitHub Release.

For a website-only change, first pin harness-web-release.json to the currently deployed web release, then use make release-web ARGS="--website-only". The helper checks that pin against production before creating the tag. Its Website-Only: true annotation tells CI to reuse that checksum-verified bundle instead of rebuilding Flutter. The new image gets its own version; /harness-web/release.json continues to identify the preserved app bundle. Verify the changed route after rollout.

Local development

npm install
npm run prepare:web   # download and verify the bundle harness-web-release.json pins
npm run dev
npm test

harness-web-release.json pins the bundle local builds use: version, source commit and SHA-256. CI replaces it with the manifest of the bundle it just built, so it only needs bumping for local work. HARNESS_WEB_ARCHIVE=/path/to/harness-web-X.Y.Z.tar.gz supplies an archive instead of downloading one, with the same checksum and metadata checks.

Community MVP

COMMUNITY_API_URL selects the backend at runtime (default https://harness-api.autonomous.ai). Only HTTPS and loopback HTTP are accepted. Set it to a disposable local backend for development. The proxy forwards the existing Harness web access token and account environment; it does not create another identity. Sign-in uses the existing Flutter login and returns to the same Hub page. Access-token refresh uses the same Web Lock, storage, environment and SSO client as the web app. An invalid session clears credentials; a temporary refresh failure preserves them. Public browsing can fall back to anonymous access; writes, Following and Yours require sign-in.

A publication is an immutable, explicit copy of self-contained HTML, source files, and a reviewed conversation. It is separate from /s/:id, which remains a live encrypted observer stream from the owner's computer. Public output runs in an opaque sandbox with network access blocked. Source and chat render as text outside that sandbox. Uploaded covers accept PNG, JPEG, and WebP.

Fork opens harness://fork/<public-id>?request=<uuid> directly from the click. The macOS and Linux desktop hosts queue the link through startup and sign-in. Once This computer connects, the app imports a project under ~/harnesses/<project-name>/, prepares the trusted Store harness, and opens the normal 70% viewer / 30% agent workspace. Fork receipts and generated viewer packages stay under ~/.harness/community/forks/. Existing imports move into ~/harnesses/ on reopening, with a compatibility link preserving running conversations. Repeated clicks reuse the receipt, project and session; imported files are never overwritten on retry. There is no unsolicited task or model prompt. The selected agent starts fresh with SESSION.md as published context, rather than resuming a vendor's private native session. [Blender] [Codex] means the Blender harness with Codex selected for continuing it, not a claim about the original recording's engine.

This requires a desktop build with the URL handler. If it is not installed, the inline fallback links to Download and preserves the chosen project for Open in Harness afterward. Browsers may require their standard confirmation before opening another app. Windows protocol registration is not implemented. Local desktop builds can use --dart-define=HARNESS_COMMUNITY_ORIGIN=http://127.0.0.1:54880; public links cannot choose a host, file path, install command or external package. Public source is validated before an atomic import; only allowlisted Store harnesses and the locally authored generic Web Viewer package can be installed.

An optional ZIP includes a spec-1 Web Viewer package, editable project, SESSION.md, MIT license and OPEN-HARNESS.json. Native source and binary artifacts remain included, but use the desktop handoff to open the named harness's tools. Publishing a fork retains its source and copyright chain. In the desktop Share dialog, Publish to Hub gathers the current local project files and recent conversation through existing app APIs. A short-lived loopback page transfers them into an IndexedDB draft in the browser, then opens /hub/publish for review. No access token or native session ID is transferred. Nothing becomes public until the creator reviews the output, source and conversation and clicks Publish. A draft survives the existing sign-in flow; repeated submission uses one publication ID. Remote projects and older apps can use the project-folder picker or import OPEN-HARNESS.json. The output is the project's preview.html (or the page a fork arrived with, once changed), or else a page the session made that loads nothing the sandbox cannot reach, such as a one-file game: a top-level page (index.html first), then a folder's index.html. Without one, as for a native result such as a Typst PDF or a Blender model, the desktop asks the machine's daemon for a picture of the harness's viewer (viewer_surface, headless Chrome) and publishes it as preview.html and the cover; a fork still opens the real viewer. The first version requires a self-contained HTML preview, up to 30 files/6 MB; hidden configuration, symlinks and installed dependencies are excluded. Conversation tails may be incomplete and the review form says so. A draft that arrives from Desktop or a bundle is translated into English once the creator is signed in (POST /api/community/translate: title, description and the people's and agent's turns; tool output stays as it is), and the form can switch back to the original before publishing. /explore links remain compatible with /hub.

What people publish is HTML and JavaScript, and Cloudflare's managed rules in front of the Hub and its API refuse a request body with raw <script> in it. So bodies travel gzipped: Desktop hands off the draft as a draft.json.gz file, communityRequest sends every body as application/gzip, the proxy forwards those bytes unchanged, and the backend unpacks them (bounded) before validating (backend/src/lib/gzipJson.ts). Plain JSON bodies and an older Desktop's text field still work.

Backend reads are public; likes, comments, following, publication, editing, and unpublication require SSO. An author edits a publication in place (PUT /api/community/harnesses/:id): Edit, beside Fork on its page and shown only to its author, opens /hub/publish?edit=<id>, where Unpublish this harness also lives; a draft arriving from Desktop can choose Publish as → Update "…". A harness page whose likes and actions fail to load says so with Retry, and one read anonymously because the browser's sign-in expired asks to sign in again, instead of silently hiding Edit. The address, likes, comments and forks stay; forks keep the version they copied; where it came from (forkedFrom, credits) and its cover (unless a new one is chosen) stay as published. Counts are persisted, like/follow writes are idempotent, comment retries have per-user request IDs, replies retain their parent and display a Creator badge, and authors can remove their publication and moderate its comments. Reads and writes are isolated by account environment. The feed loads 30 publications per page as visitors scroll; comment views show the latest 100 comments. Search filters loaded projects. Public navigation and downloads use the production account plane; staging API isolation is supported for backend testing.

The examples live in public/open-harnesses/: nine self-contained Codex projects, the seven featured projects from store/hands-on.json, and the existing Harness Store Marp keynote. The featured projects reuse the Store's posters and recordings from docs/images/, plus editable source from its fixtures/templates (the Go2 trajectory comes from the existing MuJoCo project). Their detail page plays the existing recording and labels the conversation as a published brief, not the original session transcript. Forks carry the source and available native output (GLB, PDF, molecules and trajectory data); recordings stay on the web. Blender's portable blender-design.json restores the viewer's Shape Lab controls when imported.

source-files.json lists each named harness's portable files. Binary artifacts use base64 in the snapshot and decode back to their original bytes in desktop imports and ZIPs. The snapshot limit is 6 MB, with 30 files and 3 MB per encoded file. Keep dependencies in the installed Store harness; do not bundle credentials, model-session IDs, hooks or hidden configuration. Native tools are prepared by the Store installation; Godogen reuses its installed dependencies in the fork.

Regenerate the original nine SVG covers with python3 scripts/generate-community-covers.py. Add a starter to src/lib/community/starters.ts (or featured.json) and the backend's communityStarters allowlist. Real account SSO and native platform checks remain distinct from local fixture authentication used for development.