WebAI Studio
Back to Demos

Tool Calling: Smart Home

Tools Calling

Real function calling: tell the model what you want and watch it invoke JavaScript tools that drive a live dashboard.

Why On-Device?

The agentic loop — reason, call a function, read the result, respond — runs entirely on-device. Your smart-home state and commands never leave the browser.

Interactive Demo

Prompt API (tool use): Loading...
20°C
Thermostat
Silence
Speakers
Assistant
Give the house an instruction — the model chooses which tools to call.
Tool Calls
0 total

Every function the model invokes appears here with its arguments and result.

Implementation Code

demo.js