A lightweight local wrapper for Google AI Mode using Node.js, Express and Playwright.
It exposes a small HTTP API and a simple web UI for creating Google AI Mode chats, sending prompts and reading responses.
This project does not use an official Google AI Mode API.
It automates a Chromium browser session with Playwright.
- Local HTTP API
- Web UI at
http://localhost:3000 - Multiple chat sessions
- Docker support
- Configurable browser locale, timezone and headless mode
Client / Web UI
↓
Express server
↓
Playwright
↓
Chromium
↓
Google AI Mode
docker compose up --buildThen open:
http://localhost:3000
Health check:
curl http://localhost:3000/healthThe available endpoints are shown in the web UI and exposed at:
http://localhost:3000/api
Main endpoints:
GET /health
GET /api
POST /chat/new
POST /chat/:chatId/message
GET /chat/:chatId/last
GET /chat/:chatId/all
DELETE /chat/:chatId
Environment variables:
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
HTTP server port |
HEADLESS |
true |
Run Chromium in headless mode |
AIMODE_URL |
https://www.google.com/aimode |
Initial Google AI Mode URL |
BROWSER_LOCALE |
it-IT |
Browser locale |
BROWSER_TIMEZONE |
Europe/Rome |
Browser timezone |
BROWSER_USER_AGENT |
unset | Optional custom user agent |
This project is intended for local use.
Avoid exposing the API publicly unless you add authentication and proper access controls.
For local-only Docker binding, prefer:
ports:
- "127.0.0.1:3000:3000"This wrapper depends on the Google AI Mode web interface and DOM selectors.
It may stop working if Google changes the page structure, blocks automation, requires verification, or changes availability by region/session.
server.js Express API server
aimodeClient.js Playwright automation logic
selectors.js DOM selectors
public/index.html Web UI
Dockerfile Docker image
docker-compose.yml Docker Compose config
This is an unofficial project and is not affiliated with Google.
Use responsibly and make sure your usage complies with applicable terms and laws.