Browser demo
Needle smart home
A cozy room with a local brain.
Compare the direct library, Vercel AI SDK, and pi Agent execution loops on resident WebGPU or the pure TypeScript reference backend—without sending inference data to a server.
Choose the execution engine
Section titled “Choose the execution engine”- Resident WebGPU keeps hidden lanes, KV cache, attention, engrams, confidence, and constrained token selection on the GPU. It requires browser WebGPU and TypeGPU.
- Pure TypeScript is the portable numerical reference and requires no GPU, WASM, or native addon.
Changing the selector disposes the loaded model and initializes the newly selected backend on the next run. The output panel always shows the backend that actually executed the request.
What stays local?
Section titled “What stays local?”The model archive is fetched from the pinned Hugging Face revision. Your prompt, generated reasoning, tool arguments, tool results, and simulated room state stay in the page. The smart-home tools only update this local bedroom visualization and do not access device hardware.
For the most reliable first result, choose one of the suggested light, curtain, fan, or room-status instructions. Needle is a compact action model; unrelated conversational prompts may correctly decline with [].