How to Install and Prepare an Offline AI PWA on Android
Installing a PWA adds the app experience, but offline AI is ready only after the shell, runtime, model, tokenizer, and local state are present and tested.
Short answer
To prepare an offline AI PWA on Android, open it in a supported browser, install it from the browser menu, launch the installed app online, download and verify one compatible model, activate it, and send a short test prompt. Then close and reopen the PWA, enable airplane mode, and send a new prompt. Installation alone does not download a model or guarantee offline readiness.
On this page
What installation actually does
A Progressive Web App is still a web application, but it can provide an installed, standalone experience and use service workers and storage APIs for offline behaviour. Installation can add a home-screen icon and launch the app without the normal browser chrome. It does not automatically make every route, model, or feature available offline.
web.dev explains that a PWA's assets are web assets and that service workers, Cache Storage, and IndexedDB can make selected assets and data available locally. [1] The application decides what to cache, when to update it, and how to recover from missing or stale data. A large local model is normally a separate explicit download rather than part of the small installable shell.
For local AI, think of installation as the first of several readiness steps. The shell must be cached, the inference runtime must be available, a compatible model and tokenizer must be complete, the model must be active, and local storage must survive a restart. Only a real offline prompt verifies the complete path.
Check the phone before downloading
Confirm that the Android browser supports installation for the site and that the app offers an install action or appears in the browser's install menu. The exact wording can vary by browser version and device. Use the site's canonical secure HTTPS address because service workers and many powerful web capabilities require a secure context.
Check free storage before choosing a model. The displayed artifact size is not the only space used. Partial downloads, verification data, runtime assets, application caches, conversations, and imported files also need room. Runtime memory is separate from storage, so a model that downloads successfully may still be too large to load reliably.
Review the model's task, format, license, size, and device requirements. Choose one small compatible model first instead of downloading several. A successful basic setup is easier to diagnose than a storage-full phone with multiple incomplete artifacts.
- Update the browser and Android system components.
- Use the official HTTPS app address.
- Leave comfortable storage beyond the model's listed size.
- Keep the phone charged during a large download.
- Start with one model that the app marks compatible.
Install the PWA and cache the shell
Open the app in the browser while online and wait for the main interface to finish loading. Use the browser menu or the app's install control, review the name and origin, then confirm installation. Launch the new home-screen app rather than continuing only in the old browser tab.
Installation and service-worker control are related but not identical. A service worker is event-driven and can intercept requests, return cached resources, or provide an offline fallback. The W3C specification defines this request handling model, but the application must still populate its caches correctly. [2]
Keep the installed app open online long enough for its current shell and required runtime assets to settle. If the app exposes an offline-readiness status, verify it. Close and reopen the PWA once before downloading a model. This catches an install that points to an error page, a stale release, or an origin different from the one expected.
Do not clear site data after setup. The installed icon can remain even when the browser's origin storage has been removed, leaving a shell that must download its model again.
Download, verify, and activate one model
Open the model manager inside the installed PWA. Select a model that is available for the current browser and device. A good downloader shows the source, exact size or a useful estimate, progress, pause or cancellation behaviour, and a specific error when bytes cannot move.
Wait for verification to complete. A finished network transfer does not prove that the file is intact. The application should compare the artifact with expected metadata or a cryptographic digest before marking it installed. Partial data must not be labelled ready.
After verification, activate the model. Downloaded and selected are different states. The active model should be visible in the composer or model manager and should remain selected after the PWA is closed and reopened. Send a short prompt such as “Reply with exactly OK” while still online. This confirms that the runtime can load the artifact before network conditions complicate the diagnosis.
- Select one compatible model.
- Start the download and confirm the byte count changes.
- Keep the PWA in the foreground when the browser requires it.
- Wait for integrity verification, not only 100 percent transfer.
- Choose Use or Activate in the current app context.
- Send one short online smoke-test prompt.
- Reopen the PWA and confirm the same model remains active.
Protect local storage from surprises
PWAs can use Cache Storage for request-and-response assets and IndexedDB for structured records and binary data. web.dev also notes that storage is tied to the origin and remains under user and browser control. Users can delete it, and persistence decisions can vary. [3]
Installing a PWA can improve the browser's assessment that the origin matters to the user, but it is not an immutable backup. Avoid Android storage cleaners that remove site data, and use the app's encrypted export if conversations or projects are important. Record or safely store any vault passphrase because a properly encrypted local vault cannot provide password recovery through a cloud account that does not exist.
Check the model manager after a phone restart. If it shows the artifact as missing or unverified, resolve that while online. Do not discover the problem after boarding a flight or entering a location without service.
Updates also deserve care. A new shell may need different runtime assets or a model migration. Let the update finish online, then repeat the short prompt and restart test before relying on offline use again.
Run a real airplane-mode test
An offline test must create new work. Viewing an old response or cached page proves only that those bytes were stored. Close the app, enable airplane mode, relaunch from the installed icon, create a new conversation, and send a unique prompt. Confirm that visible output begins, Stop cancels it, and the composer returns to Send.
Then test the feature you actually need. Import or open a previously prepared local file, ask a new question, and open its citation. Do not expect web search, a new model download, an app update, or an uncached external link to work. The app should identify those as network-dependent rather than failing silently.
Repeat after a full browser or phone restart. Mobile operating systems can reclaim background processes and memory, so a tab that worked immediately after setup is not enough evidence. Note the phone, Android version, browser version, app version, selected model, and date.
Offline readiness checklist
| Check | Ready signal |
|---|---|
| App shell | PWA opens from its icon in airplane mode |
| Runtime | Model initialisation completes without a network request |
| Model | Exact artifact is verified and active after restart |
| Generation | A new prompt produces new local output |
| Cancellation | Stop ends the run and restores Send |
| Files | Prepared local content opens and citations resolve |
| Boundaries | Search and downloads clearly report that a network is required |
Troubleshoot common failures
If the icon opens a browser error, reconnect and let the current shell load fully. Confirm that the installed origin matches the production address and that site data has not been cleared. A service worker cannot supply assets that were never cached.
If the shell opens but no model appears, check model storage and verification status. A partial download may have been interrupted when Android backgrounded the app. Resume online and keep the relevant surface active. If the model disappears repeatedly, inspect storage pressure and browser persistence rather than redownloading blindly.
If the model loads but the first answer takes a long time, separate cold loading from prompt processing and token generation. Use a new empty conversation and a short prompt. A large history or file context can delay first output even when later tokens stream acceptably.
If optional search fails in airplane mode, that is expected. Offline local inference and online information retrieval are separate capabilities. The product should make the boundary explicit before it sends a query.
Preparing CuriousLM for offline use
CuriousLM's PWA is designed so ordinary chat, projects, supported local files, and model inference can stay on the current device after preparation. The model manager requires an explicit download, verification, and activation step. The selected model should remain selected across app reopen.
The initial shell, updates, model artifacts, and some runtime assets require connectivity. Optional Tavily search and response reports are also network actions with separate review and confirmation. No hosted model should silently replace the selected local model when the device goes offline.
For travel, complete setup at home, send the short smoke-test prompt, restart the PWA, and repeat in airplane mode. Keep an encrypted backup of important local work and enough free storage for the chosen model. Offline readiness is a tested state, not a permanent badge.
Sources
- Welcome to Learn Progressive Web Appsweb.dev
- Service WorkersWorld Wide Web Consortium
- Offline dataweb.dev
- Web App ManifestWorld Wide Web Consortium