Gemini Nano is now available in Chrome 138 through the Prompt API, offering local AI capabilities with a 6k token context window. The setup requires enabling chrome://flags/#prompt-api-for-gemini-nano and downloading a 1.5-2.4GB model. Key challenges include poor instruction following for required fields and stateful sessions by default. The guide covers JSON schema implementation, stateless session patterns, and wrapper libraries for easier integration.

4m read timeFrom swyx.io
Post cover image
Table of contents
setupbasic important thingspitfalls

Sort: