oneshotlm
Compare all models on this prompt →

Force-directed graph · gemini-3.1-flash-lite-preview

Output generated Cost / run $0.0043 Runtime 8.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

modelgemini-3.1-flash-lite-preview
vendorGoogle
harnesspi-agent
generated2026-07-22

METRICS

runtime8.2s
tokens in6.6k
tokens out1.8k
cached0
cost / run$0.0043
Transcript · 6 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
thinking
**Initiating Web App Design**

I'm starting to build a single-page web application using `index.html`. My focus is on a force-directed graph with about 40 nodes, clustered for visual clarity. I'm leveraging `d3.min.js` to create draggable nodes with hover highlighting, to reveal details. I want it responsive too.


→ bash {"command":"ls -F"}
toolResult

d3.min.js

assistant
→ write index.html (3800 bytes)
toolResult

Successfully wrote 3800 bytes to index.html

assistant

The force-directed graph is ready in `index.html`. It uses the provided `d3.min.js` to render 40 nodes organized in 4 clusters, provides zoom/pan capabilities, features draggable nodes, and implements hover-based highlighting for network connectivity.