Run a Private AI Chatbot in Chrome – No API Key, No Cloud, No Cost

 

Most people assume AI assistants require a subscription, an internet connection, and a willingness to let your conversations pass through someone else’s server. What if none of that were true?

You might think that setting up a local LLM AI is beyond your capabilities, or maybe just takes too much space.

All you need is to open a special HTML file to use it.

As of Chrome 138+, there’s a fully capable large language model sitting dormant inside your browser right now — and with a little tinkering, you can build a slick multi-chat interface to talk to it. That’s exactly what the Local Chrome AI project does.

What Is This, Exactly?

Google has been quietly shipping Gemini Nano — a real, capable LLM — inside Chrome as part of its on-device AI initiative. It’s not a toy. It can answer questions, write code, summarize content, describe images, and hold a conversation. The catch: Google doesn’t exactly advertise how to turn it on, and there’s no built-in chat interface. That’s the gap this project fills.

The result is a single HTML file you download and open locally. No server. No npm install. No signup. You just drop it in Chrome and start chatting.

Setting It Up

Before the HTML file does anything, you need to unlock Gemini Nano in Chrome’s experimental flags. Paste these URLs into your address bar one at a time:

  • chrome://flags/#prompt-api-for-gemini-nanoEnabled
  • chrome://flags/#prompt-api-for-gemini-nano-multimodal-inputEnabled (for image support)
  • chrome://flags/#optimization-guide-on-device-modelEnabled BypassPerfRequirement

Then restart Chrome via chrome://restart. After that, go to chrome://components, find Optimization Guide On Device Model, and hit Check for update. Chrome will pull down the model — it’s 2–4 GB, so give it a few minutes. When the status reads “Component already up to date,” you’re ready.

Then just download one of the HTML files from the repo and open it in Chrome. That’s it.

What the Interface Does

The full-featured file (local_AI_with_sidebar.html) looks and feels like a real chat app. There’s a sidebar for managing multiple conversations, each one saved independently in your browser’s localStorage. You can create new threads, delete individual ones, or wipe everything with a single button. Conversations get auto-titled based on your first message.

The image-enabled version (local_AI_Sidebar_image_Uploads.html) adds a camera icon next to the input field. Attach a photo, ask a question about it, and Gemini Nano analyzes it entirely on your device. The image shows as a thumbnail in the chat bubble; click it for a fullscreen lightbox view.  A settings panel lets you control whether images get saved to localStorage (they’re big you may not want them persisting) and how many messages back the model sees as context. Because of that, the default settings are to save space by not storing uploaded images in Chrome’s localStorage, but you can turn on image saving if you want to.  Just be sure to turn this setting on before you upload an image. Anything uploaded previous to the setting change won’t be saved.

There’s also a minimal single-window version (minimi.html) if you just want to kick the tires without the sidebar.

The Clever Engineering Under the Hood

Local LLMs are stateless — every prompt starts from zero. The project solves this with two techniques worth knowing about.

The first is a simple context injection: before every message, the last N exchanges from localStorage get prepended to the prompt, giving the model a rolling memory of the conversation. You can tune how many messages back it looks in the settings panel.

The second is recursive summarization. When a chat exceeds a certain length, the script quietly asks the model to summarize everything so far, then replaces the growing history with that single compressed summary. This prevents what the README aptly calls the “Quadratic Slowdown” — where every new message has to carry an ever-longer context, making responses progressively slower. The summarization happens silently; from your perspective the conversation just continues normally.

Privacy Is the Real Feature

Every word of every conversation stays on your hard drive. The model runs on your GPU. Nothing is transmitted anywhere. You can turn off your Wi-Fi and it keeps working. Really, try it!

Cloud AI assistants are excellent, but they’re not private by design. This is.

The tradeoff is capability. Gemini Nano is a small model optimized to run locally, not a frontier model running on a data center. It’s fast, it’s private, and it handles everyday tasks well, but it won’t match GPT-4 or Claude on complex reasoning. For a lot of use cases, that’s a perfectly fine deal.

Who Should Try This

If you’re the type of person who reads about experimental Chrome flags for fun, you’ll have this running in ten minutes and enjoy every second of it. If you have colleagues who handle sensitive documents and keep asking “is this AI thing private?”, this is a concrete answer you can hand them as an HTML file.

The project is open source under MIT and lives at github.com/morrowsend/local_chome_ai. Fork it, modify the system prompt to give the AI a different personality, build your own tools on top of the same LanguageModel API — the foundation is solid and the code is readable.

Local AI has been technically possible for a while now. This project makes it actually convenient.


Requires Chrome 138+. The on-device model download is 2–4 GB. Performance depends on your GPU — on a modern machine responses are near-instant; on integrated graphics expect a few seconds per reply.

Saving Data and Converting Microsoft Works Files

A lifetime ago, my computer only had Wordpad (RIP 2025) as a text editor. It was fine for basic things, but when I had the chance to get Microsoft Works, I jumped on it. From that point on, I felt like a real professional using Works. I wrote all my terrible teenage poetry and story ideas in Works.  Years later, I came across the files, however, I was unable to open them. Works had long been surpassed and basically disappeared from the internet and all human consciousness it seemed.

I tried to bring some of these files into Microsoft Word, but that only worked on a few files, as the encoding on most of them was pretty goofy. Even viewing the files in a hex editor was either incredibly time-consuming or completely fruitless. I resigned and just left the files on an old hard drive to rot to magnetic equilibrium with the countless other data I hoard, forever to be an uncheckable box on my bucket list.

Recently, I came across the old hard drive and was determined to read those terrible poems. So I went to my much-loved word processor, Libreoffice,  to see if they could be saved. Almost like magic, I was able to open a couple of the files!!! It worked!  Opening the files one by one, then saving them, would take forever. (I had a lot of bad poetry…) So I cracked open the ol’e Google machine and found a reddit post that made my day. I run Libreoffice Portable, so I couldn’t just use the commands in that post. I had to find the actual “soffice” executable.

No worries, I just poked around until I found it deep down in the LibreOffice Portable folder. Now to convert all my old tomes of terrible teenage tradition, all I had to do is:

  1. Visit the folder in my file explorer
  2. Right-click and open a command line there
  3. Recite the magic words:

    C:\Users\username\Installations\LibreOfficePortablePrevious\App\libreoffice\program\soffice.com –convert-to doc *wps 

  4. Then spin around twice and cross my fingers as I press “Enter” and…

Huzzah! All of the files are converted to .doc in one fell swoop.

Now I can spend the rest of the evening firmly rooted in the deepest of cringe. Bonus! I found some of my wife’s old teenage writing as well, haha. I’ll have to save those for a rainy day 🙂

Alexa can’t find your FireTV or Pro Remote? Here’s the Fix!

If you’ve ever changed your Fire TV’s name, only to have Alexa suddenly refuse to communicate with it. or worse, lose track of your Fire TV Voice Remote Pro, then you know how frustrating it is. I tried everything, but what finally worked was a complete reset and a specific re-pairing sequence.

If you’re stuck, follow this step-by-step guide to get your Alexa and Fire TV devices talking again!

The Problem: Changing the Fire TV name breaks the connection with Alexa and the Voice Remote Pro.

The Solution: A Full Factory Reset and Strategic Re-pairing
The key is to essentially wipe the slate clean for all involved devices (Fire TV, Alexa, and the Remote Pro) and reintroduce them in a specific order.

Phase 1: The Clean Slate

Before you start re-pairing, you need to completely remove the old, broken connection from every device.

  1. Factory Reset Your Fire TV:
    Go into your Fire TV Settings –>My Fire TV –> Reset to Factory Defaults. This will erase all your settings, apps, and channels. You will have to reinstall your apps and log into them again. Confirm the reset.
  2. Prepare the Remote Pro (CRITICAL STEP):
    While the Fire TV is resetting/rebooting, immediately unplug the batteries from your Fire TV Voice Remote Pro (the one with the “find my remote” beep feature). This prevents it from automatically re-pairing with the Fire TV before you want it to.
  3. Clean Up the Alexa App:
    Open the Alexa App on your phone and go to Devices –> Echo & Alexa (or All Devices). Find and delete the entries for your Fire TV and the associated remote(s) that are causing issues.

    Phase 2: The Rebuild (The Specific Order Matters!)

    Now that everything is clean, we’ll connect the devices in an order that ensures Alexa properly recognizes the Fire TV and its advanced remote.

  4. Use Your Old/Standard Remote First:
    Wait for the Fire TV to boot up to the initial setup screen (the one asking for your language/Wi-Fi).Use a standard (non-Pro) Fire TV remote to complete the setup process, connect to your Wi-Fi, and sign in to your Amazon account.
  5. Pair the Voice Remote Pro on the Fire TV:
    Once the Fire TV is fully operational (on the main screen), put the batteries back into your Fire TV Voice Remote Pro. Go into Settings on the Fire TV –>Remotes & Bluetooth Devices –> Amazon Fire TV Remotes –> Add New Remote. Follow the on-screen instructions to pair the Pro remote directly with the Fire TV.
  6. Re-Discover the Device in Alexa:
    Go back to the Alexa App on your phone and go to Devices and search for New Devices. Alexa should now find your newly reset and configured Fire TV.
  7. Enable Voice Assistant Control for the Fire TV:
    Once the Fire TV is listed in the Alexa app, tap on the Fire TV device entry. Look for the “Manage Devices” or “Fire TV Settings” option within the device details. Crucially, make sure that the settings to allow voice assistants to access and control the Fire TV are turned ON.

Your Fire TV should now be properly connected to your Alexa ecosystem, and all the voice commands and remote features (like the all-important beep to find your lost remote!) should be functional again.

If this worked for you, let me know in the comments!

Roll Your Own Home Alarm System (Part 3): Remote Access and Announcements

In the first article, we selected hardware and software for our alarm system. In the second, we learned how to make connections between all of our devices to have sensors send notifications to phones that are on the network, or activate a siren. In this article, we’ll cover accessing the system when you are not home over the internet and having voice announcements.

Remote Access:

Honestly, I have wasted a LOT of my time over the years setting this up in different ways, with VPNs, hosting stuff myself, etc.  It’d work for a bit, then after an update something would break and I’d be without remote access for a while (having a fairly useless system) until I devoted a few hours to repairing everything again.   I’ve come to a setup I like quite a lot.  It barely costs anything and gives me the flexibility that I like while being very easy to set up.

I made an account with Nabu Casa, which is the official Home Assistant Cloud service. It is run by the same folks who created Home Assistant, so it integrates easily, seamlessly, and even has automatic backups of your system (see caveat below) in case it gets hosed up somehow.  It isn’t free, but it is super cheap compared to my hourly rate I’d charge for my time. Currently it is only $65 per YEAR!  The amount of time I have saved here and the frustrations I’ve avoided with it makes it priceless.

The one caveat with the automatic backups is that the backups are encrypted. So you need to manually download the emergency backup kit from within your instance of homeassistant before you have to use them. Otherwise, if something hoses your system and you need to reinstall HomeassistantOS from scratch, you’ll have lose everything and have to start over. Go ahead and download this backup kit if you’ve been following this tutorial series and store the key somewhere securely so you can use it in case of emergency.

As I said, I’ve messed around with Home Assistant for more than 5 or 6 years, and I’ve never written an article about it because I didn’t want to endorse other people pulling their hair out working with it, but Nabu Casa makes it all worth it!

The way it works is that once you sign up, the Nabu Casa website will generate a custom URL for you. You simply log into your Home Assistant instance, Select “Settings”  Then “Home Assistant Cloud” You’ll be able to login and/or paste this URL from Nabu Casa, and  you’re done. From that point forward, you will be able to securely control your Home Assistant, and get notifications anywhere you have internet access!

Voice Announcements:

There are about a million ways to get voice announcements in Home Assistant. Years ago I’d send a message to an old cellphone I was using as a front panel that ran LANnouncer.  Nowadays, we have Amazon echo devices (echo dots, echo show, old fire tablets, etc.). Home Assistant will let you connect with these, Google Home , or even their own new Voice module (which I may get once it is more mature).

If you paid attention in the last article when connecting your sensors, you would have gone into the sensor’s settings and activate sharing to voice assistants. This is step 1, so if you haven’t done that yet,  go back and do so now. Each time you do this, your Alexa will announce they have seen a new device.

Next, open your Alexa app on your phone. If you go into devices you should be able to see the devices and they should have the names you gave them.

The easiest method I’ve found to make simple announcements is to create a routine, add the device you want as the trigger, then make the announcement. Announcements can go to multiple Alexa devices, and “messages” can only go to a single device.  Here’s a video showing how:

More Complicated Use Case:

I wanted to have an alert every 5 minutes if a window or door was left opened past 8pm. This would remind me to go close it. The way to set this up wasn’t intuitive to me at first, but I found a great way to do it without having to code Home Assistant’s YAML file directly.

First, I need to create a Helper in Home assistant. You can find this in the Settings–>devices & Services window, select “Helper” tab at either the top or the bottom (depending on what app you use to access home assistant). Create a new helper and search for “toggle” as the type. Name it something (i.e. “Open Window Alert”) and give it an icon.

This creates a new pane on your Overview with a toggle button. You can toggle it on or off manually there, but we are going to control it with an automation instead.  Before we do that, go to the settings of this new button and expose it to a voice assistant like we did with other sensors before. This makes it so that Alexa will see this as a device like your other sensors.

Then we will create a new automation. In the trigger, you’ll select “Time & Date” then “Time Pattern”  This will allow us to have a repeating time trigger. The syntax is goofy here. To make it do a multiple of minutes, you must put a slash before the number of minutes. For example “/5” for  every 5 minutes.  Luckily, when you do this, it changes the text of the trigger and gives you a sentence in English to help you debug the timer. eg “Trigger every 5 minutes of every hour”  vs “trigger 5 minutes past the hour each hour.”

Next you’ll want to add two AND IF conditions.  The first is a fixed time of 8pm, and the second condition is “Kitchen window opened”

For the THEN DO action I want it to notify my phone, as well as to TURN ON the New Window Alert. To do this, select Helper” from the Actions list, then you can try one of 2 methods. You can “Toggle” the input boolean (our switch) or you can select “Turn On” and add a second “Turn Off” action afterward. While testing, I chose the two separate ON and OFF commands. Note that if you Toggle, then the alert will only be voiced half as often as the time you selected above.

Once you select this, you will then need to link this to our specific helper. Click the “Choose Entity” button to select the ” New Window Alert” switch on the front panel we created. This is the input boolean referred to above.

Now this automation will trigger every 5 minutes when it is past 8pm, the window is opened. It should send a notification to your phone and we can make an announcement on Alexa.  Go to Alexa, and create a routine using this “New Window Alert” as the Trigger, and make it announce “Kitchen Window opened, Please close the window.”

If you chose to use the Toggle Function above note that you will get notifications every 5 minutes, but announcements every 10 minutes because toggling only flips the switch one direction each time it is toggled.

Roll Your Own Home Alarm System (Part 2): Connecting Devices

If you’re following the previous article, where I discussed hardware and installing Home Assistant for our alarm system, this article will detail how to lay out a basic alarm system with window and door sensors, fire alarms, a siren, and an announcer (for announcing when doors are opened or if windows or garage doors are left open at night). For the software, we’re using Home Assistant.

In this article we’ll install the sensors, connect it to our phones and setup announcements to be spoken by an Amazon Echo Dot (Alexa) when events happen.

Previously, we installed Home Assistant on a raspberryPi, but there are other ways of using this. you can install it on a virtual machine as well, but just make sure that whatever machine you use is constantly on and connected to the network. I plugged my Rpi, router, and modem into a battery backup that’ll work for a short time in case of a power outage.

Home Assistant Phone App:

I use the phone app to simplify setting up my sensors, so this is one of the first things I recommend doing. I also track my phones location. Once I set up remote access, this basically allows me to automatically activate and deactivate my alarm system.  If I am not home, then it is armed, but once I get within a certain distance of my home, it will disarm. This way, I don’t need to buy a keypad. It is important to note that this will only work when you are on your home network until you set up remote access later.

Z-Wave Integration:

With a clean install of Home Assistant, you will need to set up the Z-Wave integration before we can add sensors. You can do this from the phone app or on a computer in a web browser. If not using the phone app, you can go to  http://homeassistant:8123 and login with the credentials you set up in the last article.

From the main window in the left column, click on “Settings”,   then select “Devices & Services.”

At the bottom right of the screen, you should click the “+ ADD INTEGRATION” button. and search for “Zwave.” The logo looks like this:

Once this is installed, we can move forward installing the different sensors and actuators.

Adding Window and Door Sensors:

For window and door sensors, I recommended the Ring window/door sensors because they use Z-wave protocol and are pretty simple to pair and re-pair with your Home Assistant system. I have other brands such as ecolink and dome as well, but Ring sensors are a bit cheaper and easier to come by nowadays.

For Ring sensors it is very easy. Using your phone, navigate to Settings–> Devices & Integrations” then click on the Z-Wave icon.  On this page, once you start adding sensors you will be able to access really detailed info on all of them. For now, we need to click “Configure” in the “Hubs” panel. Then you will see a blue button on the bottom right of the page that says “+ Add Device”. When you click this, it will ask you to scan the QR code on the bottom of the Ring door sensor. Go ahead and do this, and also remove the plastic tab on the sensor that keeps the batteries disconnected during shipping. The LED on the front should blink green about once a second. If it isn’t , then hold down the button on the front a few seconds and let go and it should start blinking. This is pairing mode for the sensor.  You should see an acknowledgement on Home Assistant when this is done.

If you now go to the Overview page, you should see your new Ring sensor. I like to give this a better name and change its icon to make it easier for me to remember what this particular sensor is supposed to do.  The benefit of using my phone for pairing is that I can be next to the door or window this sensor will be installed on as I do it. I only pair one sensor at a time as well so I don’t mix them up.

On the Overview page, click on the word “Intrusion” under this new sensor’s panel. It will take you to another screen that will show you the history of all the changes of this sensor. This is a nice page to look at to see if I want to see when the door was last opened or closed or how long it has been in those states.   To change the name and icon, click the gear icon at the top right.  Add a name such as “Door to Basement” and change the icon to a closed door.

Allowing Voice Assistant Access:

Next if you plan to have a voice assistant to announce the state of this sensor at any time, you can turn this on by clicking “Voice Assistants” and turning on the one of your choice. There are a couple other steps involved with this, but if you don’t allow the sensor to be visible here, then you can’t do any of the neat tricks like: “Alexa, Is the back door opened?” or have your voice assistant announce when sensors change or remind you to shut the windows at night.

Repeat those steps for your other sensors. fire alarms and sirens have their own pairing process so be sure to read the manual that came with yours, or you can always find all the details of your devices on the Z-wave alliance website.

Automations:

Just having sensors and sirens, etc. show up in Home Assistant doesn’t make them an alarm system. You need to figure out the rules for when you want different things to happen, then create Automations for them. Basically something like “If the front door opens, send a notification to my phone stating “Front door opened”.  Or if you left the garage bay door opened, and it is 9pm, you probably want a notification on your phone reminding you to close it. Of course, if you aren’t home, and ANY door or window opens, you want to turn on the siren and get a text, etc.

I prefer doing these on a computer rather than the phone app, but you can do it on either. For this, go into Settings–>Automations & Scenes In Home Assistant. Then click the big blue “+ CREATE AUTOMATION” button at the bottom right of that screen. Create a new automation here.  You’ll notice 3 key areas. You can add a Trigger, Condition, and an Action. The Trigger is what you are sensing, the Condition is another thing that must be met when for the action to happen, and the Action of course is what you want to happen when the automation is triggered.

Here, I’ve clicked “Add Trigger–>Device”  Then in the dropdown in the new pane, I selected “Front Door” Next the “Trigger” dropdown will give me all possible things I can check from that sensor. In my example, I selected “Front Door Opened”. The default for a Ring door sensor is “Intrusion.” If you didn’t change this as I mentioned above, then you’ll be looking for the words “Front Door Unsafe” instead.

I don’t have an AND condition for this automation, so I left it blank.

The Action I have selected is to text my phone. So to add this, click “Add Action  and select “Notifications.”  If you already installed the Home Assistant app on your phone, then it will appear here as one of the options i.e. “Send Notification via mobile_app_pixel6”  or whatever your phone is.

In the message I simply write “front Door Opened”

I have this also send a notification to my wife’s phone as well, so you can repeat the last step and select the other phone(s) you want to be notified.

The same goes for all the sensors, including leak sensors, fire alarms, CO sensors, etc.  Everything gets its own automation. Instead of starting over each time, I simply duplicate this one automation, change its name, then change the trigger sensor and edit the messages sent.  It doesn’t save a lot of time, but it is a bit better then having to search through menus.

I have some modification that I have done here as well, such as if I leave a window or garage bay door opened after 8pm, then I have the automation send me a message every 5 minutes until  I close it.  I’ll explain this later as it is a bit more complex.

Whatever automation logic you want, I recommend you write it down as a sentence, then break the logic out. For instance: If it is after 8pm AND IF the bedroom window if left opened, THEN DO send a notification to my phone.

An important automation it the logic of the siren. This can be complicated, but you can either break it into multiple individual automations. For instance: If the Front Door Opens, or Side Door is opened, or Garage door is opened, OR (whatever else), AND IF my phone is not at home THEN DO Siren Activates, and notify my phone.

Instead, you can get more detail by separating these as we have before, and just add the phones location as an AND IF, then you will know which door was opened when you weren’t home.

Conclusion:

You can slap together a pretty useful set of rules here and as long as you are at home, your phone can get notifications.  But what if you aren’t home?  The next article will go over the easiest way to set up remote monitoring of your Home Assistant system, as well as adding in announcements by a device such as an Alexa.

 

 

 

Protected by CleanTalk Anti-Spam