Interactive HTML widgets
Rendered right in the chat, with the full tab one click away.
Sometimes you want to interact with data, content, or a visualization. If so, ask for a widget. If you would save or deploy it, ask for the code instead. A request like "let me poke at these embeddings" is widget territory.
What a widget is
A self-contained HTML page the code agent writes on request. Inline in the chat at 320px, one click to expand to the full tab, and the same file adapts to both. It can pull Plotly, D3, Chart.js, or Three.js from approved CDNs, fetch live data (HuggingFace APIs, for instance), and take your file inputs; paste a CSV and it builds an interface around it.
| Worked examples | What it does |
|---|---|
| HuggingFace model explorer | Live-queries the HF API; filter by task, sort by downloads, click through to model cards |
| Confusion-matrix visualizer | Paste labels and counts; interactive heatmap with per-class precision, recall, and F1 on hover |
| Embedding-space viewer | 2D scatter of your vectors via t-SNE or PCA; color by cluster, hover for metadata, zoom the neighborhoods |
| Game of Life | Conway's automaton on a canvas. No research value; excellent for the fifth hour of a rebuttal. |
make a step sequencer (6 tracks)
Here is a 6-track step sequencer for you. It uses synthesized drum sounds (Kick, Snare, Hi-Hat, Open Hat, Clap, Tom), so you don't need to wait for audio files to load.
I've included a few extra controls like Swing to give the beat some groove, and a volume slider. It starts with a basic pattern loaded up—just hit Play to get started!
Here is the interactive embedding visualizer.
It includes a pre-loaded dataset of 90 words across 4 categories. You can switch between "t-SNE" and "PCA" views using the dropdown, and use the search bar to highlight specific words (try "lion", "blue", or "doctor").
Share it
Every widget has a Share button. One click makes a public link. Anyone can open and interact without logging in, and you can toggle sharing off to revoke access. Send the sample-size calculator to your labmate; they use it in their browser rather than in your account.
The sandbox
Widgets run in a sandboxed iframe under a strict content security policy, with no access to your session, cookies, or storage. Inside the frame they get full ES6, canvas, SVG, and keyboard interaction.
When the widget settles the question, freeze the answer into a document you can cite.