·6 min read·AI / React / NextJS
Client-side tools with the AI SDK: an assistant that changes the page it lives on
Most LLM tools run on the server and hand back data. Leave out the execute function and the AI SDK forwards the call to the browser instead, where it can do things the server cannot — switch the theme, scroll to a section, restart an animation. Here is the whole loop, from the route handler to useChat and back.
Read