{"id":13451215,"url":"https://github.com/pacwoodson/ai-mask","last_synced_at":"2026-03-05T18:01:42.780Z","repository":{"id":224271226,"uuid":"761987594","full_name":"pacwoodson/ai-mask","owner":"pacwoodson","description":"Serve local ML inference engines to web apps ","archived":false,"fork":false,"pushed_at":"2024-04-09T08:42:49.000Z","size":522,"stargazers_count":31,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-20T02:30:17.932Z","etag":null,"topics":["ai","artificial-intelligence","chrome-extension","machine-learning","wasm","webgpu"],"latest_commit_sha":null,"homepage":"https://chromewebstore.google.com/detail/lkfaajachdpegnlpikpdajccldcgfdde","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pacwoodson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-22T21:34:48.000Z","updated_at":"2026-01-18T13:50:01.000Z","dependencies_parsed_at":"2024-04-09T09:44:08.288Z","dependency_job_id":"272821e0-24e7-435c-9d9a-57c7eed588c1","html_url":"https://github.com/pacwoodson/ai-mask","commit_stats":null,"previous_names":["pacoccino/webai-extension","pacoccino/ai-mask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pacwoodson/ai-mask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacwoodson%2Fai-mask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacwoodson%2Fai-mask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacwoodson%2Fai-mask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacwoodson%2Fai-mask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pacwoodson","download_url":"https://codeload.github.com/pacwoodson/ai-mask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacwoodson%2Fai-mask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30141283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T16:58:46.102Z","status":"ssl_error","status_checked_at":"2026-03-05T16:58:45.706Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","chrome-extension","machine-learning","wasm","webgpu"],"created_at":"2024-07-31T07:00:49.962Z","updated_at":"2026-03-05T18:01:42.758Z","avatar_url":"https://github.com/pacwoodson.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\n# AI-Mask\n  ![AI-Mask Logo](/packages/extension/icons/icon-128.png)\n\n**Bring local inference into web apps !**\n\n[Download extension](https://chromewebstore.google.com/detail/lkfaajachdpegnlpikpdajccldcgfdde) | [Supported apps](#supported-apps) | [Integration guide](#for-integrators) | [SDK Documentation](/packages/sdk)\n\n\n[![npm version](https://badge.fury.io/js/@ai-mask%2Fsdk.svg)](https://badge.fury.io/js/@ai-mask%2Fsdk)\n\n\u003e This is an experimental project at an MVP stage. \n\u003e **[Feedback](https://github.com/pacoccino/ai-mask/discussions) will be greatly appreciated for the future of this project.**\n \n## What ?\n\nAI-Mask is a chrome **web extension** that serves as a local provider to  **AI** models execution. It runs model **on-device** for web apps which needs it, for **free**, and with full-**privacy**. \n\nSee it as the [Metamask](https://metamask.io/) of AI. \n\n**Try it !**\n[Install the extension](https://pacoccino.github.io/ai-mask/), then open the [Chat app](https://chatbot.opac.me)\n\n[AI-Mask Demo.mp4](https://github.com/pacoccino/ai-mask/assets/1371207/f75e8b27-c91a-4bc6-bd14-8eae0d68050f)\n\n\n## Why ?\n\nOn-device AI inference is getting quite a traction recently. Most of our devices are already capable of executing machine learning models and software compatibility is ready.\n\nThanks to some [amazing](https://github.com/mlc-ai/web-llm) [libraries](https://github.com/xenova/transformers.js), running **machine learning** models **in the browser** has become ridiculously easy, accelerated with **WASM** and **WebGPU**. This means they'll work and run nearly at **full-performance** on virtually **any device**, hardware and operating system.\n\n**But** State-of-the-art web inference libraries store models in the browser cache, which have been, for security reason, [domain partitionned](https://developer.chrome.com/blog/http-cache-partitioning). This means that if multiple web apps use the same models, it needs to be downloaded once per domain, which can use a **lot of disk space**.\n\nWith this extension, the models are **cached only once** and served to the websites conveniently though an **unified SDK**.\n\n## Future\n\nThis is a test to see if it's interesting and getting traction from users and app developers.\n\nAnother major feature planned is also to proxy requests to OpenAI-like APIs. Users would store their API keys in the extension, and apps would query the extension to run models.\n\nThis would solve:\n- Users won't have to share API keys with non-trusted apps anymore\n- Users won't share private data with apps\n- App developers won't need to have a backend server which proxies API request to alleviate CORS issues and manipulate responses\n\n## Supported Apps\n\nWeb apps that are compatible with this extension for local inference:\n \n- [Demo App](https://pacoccino.github.io/ai-mask/) ([code](/examples/demo-app/))\n- [chatbot-ui](https://chatbot.opac.me) ([code](https://github.com/mckaywrigley/chatbot-ui/pull/1590))\n- [fully-local-pdf-chatbot](https://fully-local-pdf-chatbot-topaz.vercel.app/) ([code](https://github.com/jacoblee93/fully-local-pdf-chatbot/pull/19))\n\n## Usage\n\n### For Users\n\nEnjoy **free** and **private** execution of AI models !\n\nDo not pay for using models again, do not leak private data, and do not give your API keys to third-party apps. \n\n**How To:**\n\n1. [Install the extension](https://chromewebstore.google.com/detail/lkfaajachdpegnlpikpdajccldcgfdde)\n2. Use a [Supported app](#supported-apps)\n\n\n### For Integrators\n\nEasily support AI-Mask in your AI apps, and bring free and private local-inference to your users ! Do not store API keys again, and get rid of your backend and server costs. \n\n**Quick Start**\n\nInstall package:\n```shell\nnpm install -S @ai-mask/sdk\n```\nRun inference:\n```typescript\nimport { AIMaskClient } from '@ai-mask'\n\nconst messages = [{ role: 'user', content: 'What is the capital of France ? ' }]\n\nconst aiMaskClient = new AIMaskClient()\nconst response = await aiMaskClient.chat(\n\t{ messages },\n  { modelId: 'gemma-2b-it-q4f32_1' },\n)\n```\n\nFor full reference, see [AI-Mask SDK Documentation](/packages/sdk)\n\n\nYou can see the [demo app code](/examples/demo-app/) and an [example pull request](https://github.com/pacoccino/chatbot-ui/pull/1/files) to see how it's easy to integrate into existing apps\n\n**Note**: App users must have the extension installed for this to work. \n\n## Technology\n\nAI-Mask is a ManifestV3 extension, heavily relying on the work of third party libraries to execute model inference:\n  \n- [web-llm](https://github.com/mlc-ai/web-llm) Inference with WASM/WebGPU via Apache TVM\n- [transformers.js](https://github.com/mlc-ai/web-llm) Inference with WASM via ONNX Runtime\n\nIssues with service workers:\n- [WebGPU is not exposed to service workers](https://github.com/gpuweb/gpuweb/issues/4197) \n- For [some reasons](https://github.com/xenova/transformers.js/pull/462), transformers.js can only run monothreaded in service workers\n\nTo solve these issues, the engines runs in an offscreen document\n\n## Contribute\n\n### Developpement\n\nRequirements:\n- Node 18+\n- pnpm 8+ (for monorepo workspace management)\n\n\n#### Start development server for all packages (sdk/extension/demo-app)\n```\npnpm dev\n```\n#### Typecheck and build for production\n```\npnpm build\n```\n\n## Roadmap\n\n- [X] Documentation\n- [x] Deploy demo app\n- [x] Deploy extension\n- [x] SDK Working in web workers\n- [x] ReadableStream option\n- [ ] Bring back computation in service worker from chrome 124 thx to webgpu support\n- [ ] Proxy OpenAI-like API requests and store user keys\n- [ ] Create Langchain community libs\n- [ ] Interrupts\n- [ ] Include react Hooks/utilities in SDK\n- [ ] Pull request in one popular AI app\n- [ ] Implement more tasks\n- [ ] Add more models\n- [ ] Unload model from memory after being inactive for a while\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacwoodson%2Fai-mask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacwoodson%2Fai-mask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacwoodson%2Fai-mask/lists"}