About the demo
What the live demo is, why it runs in your browser, and how it relates to agni serve.
The demo opens a design in the agni viewer with the engine running in your browser. You install nothing, and nothing you open is uploaded.
What it holds ¶
The landing page lists a few seed designs. One is the gateway board the tutorials use, and the others are open-source KiCad boards from the samples corpus, each shipped under its own licence. Open one and the viewer draws its sheets and its board, runs the rule catalog, answers queries, traces a signal and scores a checklist, the same as it would against a server. The browser engine keeps no review store, so a checklist run lasts until you leave the page; it still shows every item’s verdict and saves as the checklist page.
You can also drop a folder or a .zip of your own design files on the demo’s “Open files” page, or
pick them with its buttons. The page proposes which designs the files make, shows each as the
design.yaml that would declare it, and lets you edit that before opening one. Dropped files are kept
in your browser’s storage, so a reload reopens them, and the same page lists them with a Delete. They
are never sent anywhere.
Every design is read on a Load page before the viewer opens it, whether it is a seed or your own. The Load page shows each step as it reads. Once a design has been read, it opens straight in the viewer on the next visit.
The browser engine has a size limit, 128 MB of design files by default. A page served by
agni serve --engine wasm sends a design over --wasm-max-bytes to the server and says so in its
top bar. The demo has no server behind it, so it is for designs under that size.
An agent can move the viewer tabs you have open, but only through a server, so the demo cannot show
it.
agni serve --mcp --viewer-rooms on your own machine does, and
Moving a viewer tab you have open
covers it. examples/embed-viewer/README.md has the walk to show it to someone, step by step.
Why it runs in the browser ¶
The project does not host a server for its demos. The docs are static files on GitHub Pages, so the
demo is static files too. agni site (make demo-site) writes the viewer, the engine compiled to
WebAssembly and the seed designs under /agni/demo/, and the docs workflow publishes them with every
merge to main.
The analysis needs no server because the same services run in either place. The viewer sends the
same calls whoever answers them. agni serve answers them on your machine or a shared host, and the
WebAssembly engine answers them in the visitor’s browser. Either one reads the design, runs the
checks and evaluates the queries, and the viewer only draws the answers. On your own server,
agni serve --engine wasm or a page’s ?engine=wasm picks the browser engine for one design, and
Running the server covers both.
The same contract in the browser
covers how the two engines are held to the same answers.
Two static renders ¶
These two are pictures rather than the live viewer. agni render drew them at build time, and you
can drag to pan and scroll to zoom.