WIP: This project is a Work In Progress, created for the talk "IA en el navegador" at MiduConf as a playground to showcase and explain Chrome's built-in AI APIs directly in the browser.
This monorepo demonstrates the use of Chrome's on-device AI APIs, including:
- Prompt API: Generate text from prompts, with support for streaming and structured output.
- Summarizer API: Summarize text with options for type, length, format, and language.
- Writer API: Generate long-form content with customizable tone, format, and length.
- Rewriter API: Rewrite text to improve clarity, style, or tone.
- Translator API: Detect and translate text between languages.
- Language Detector API: Detect the language of a given text.
- Proofreader API: Check and correct grammar, spelling, and punctuation, with explanations.
All APIs are wrapped in TypeScript packages and showcased in a Vue 3 demo app.
The apps/demo folder contains a Vue 3 + Vite web app that provides interactive playgrounds for each API. Each demo includes:
- Live input/output for each AI API
- Options for streaming, structured output, and customization
- Session history and error handling
- Chrome Canary (or a version supporting built-in AI APIs)
- Enable required Chrome flags: open
chrome://flagsand enable all built-in AI API flags - pnpm installed
pnpm install # Install dependencies
pnpm lint # Lint all packages
pnpm build # Build all packages
pnpm --filter demo dev # Run the demo apppnpm --filter <package> dev # Develop a specific package (watch mode)
pnpm build # Build all packages
pnpm type-check # Type check all packages
pnpm lint # Lint all packages
pnpm lint:fix # Lint and fix all packagesapps/demo— Vue 3 playground for all APIspackages/prompt-api— Prompt API wrapperpackages/summarizer-api— Summarizer API wrapperpackages/writer-api— Writer API wrapperpackages/rewriter-api— Rewriter API wrapperpackages/translator-api— Translator API wrapperpackages/language-detector-api— Language Detector API wrapperpackages/proofreader-api— Proofreader API wrapperpackages/utils— Shared utilities
PRs and issues are welcome! This project is experimental and evolving. Feel free to open discussions, suggest improvements, or report bugs.
-
Official documentation & demos:
-
Early Preview Program (EPP):
-
Debugging tools:
chrome://on-device-internals— Inspect on-device AI internalschrome://flags— Enable/disable experimental features
-
Community & best practices:
Developed and designed by Alba Silvente (@dawntraoz) for MiduConf 2025.