No comments yet.
The code is available at https://github.com/rellfy/yeet-the-cube
The AI part is done as a plugin that defines the yeet function and is uploaded to asterai.io which hosts the AI agent. Messages are received in the front-end and decoded with protobuf. Once the yeet request is identified a function is called to yeet the cube with three.js.
So this example is serverless (hosted on vercel and asterai for the AI agent), meaning there's no need to manage any server code to implement AI-powered UX use cases such as this (very important) one.