oneshotlm
Compare all models on this prompt →

Force-directed graph · mercury-2

Output generated Cost / run $0.0038 Runtime 7.2s

Prompt for this run

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelmercury-2
vendorInception
harnesspi-agent
generated2026-08-01

METRICS

runtime7.2s
tokens in8.8k
tokens out2.4k
cached945
cost / run$0.0038
Transcript · 8 messages
user

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

assistant
→ bash {"command":"ls -1"}
toolResult

d3.min.js

assistant
→ write index.html (3273 bytes)
toolResult

Successfully wrote 3273 bytes to index.html

assistant
→ bash {"command":"ls -l index.html"}
toolResult

-rw-r--r--. 1 node node 3283 Aug 1 20:03 index.html

assistant

The **index.html** file has been created in the current directory (`/tmp/ws`). It contains a self‑contained web page that: * Loads the provided `d3.min.js` library locally. * Generates a sample graph with ~40 nodes divided into clusters. * Renders an interactive force‑directed layout with: * Draggable nodes, * Hover highlighting of a node’s neighbors, * Zoom and pan support. You can open `index.html` in a browser to see the interactive graph. No external resources are required.