Memoo is a browser workflow recorder and runner for teams that do the same UI work over and over.
The basic idea is simple: someone performs a task once, Memoo watches the screen, listens for voice context, turns that session into a reusable playbook, and then runs that playbook again inside a visible browser with evidence for every step.
This repository was built around the Gemini Live Agent Challenge, but the codebase is more than a demo video. It already contains the main product surfaces, a working execution loop, and a Google Cloud deployment path.
Most browser automation tools make one of two bets:
- they ask people to write code and selectors by hand
- or they hide the whole thing behind a black box and ask for trust
Memoo takes a different route.
Instead of starting from code, it starts from the work itself. A teammate does the task. The system observes what happened on screen. Voice notes fill in the missing intent. Gemini helps turn that raw capture into a playbook that another teammate can inspect, edit, and run again.
That means Memoo is not trying to replace human judgment with a magical prompt. It is trying to make repetitive browser work teachable, reviewable, and reusable.
These are the ideas that shape the repo:
- Start from reality. We record what happened on screen instead of pretending a plain text prompt contains the whole workflow.
- Capture intent, not only clicks. Voice context matters because many UI actions are ambiguous without the reason behind them.
- Prefer proof over confidence. Runs produce screenshots and step results so people can verify what happened.
- Use deterministic automation first. Playwright handles the obvious path. AI fallback is there for messy pages and broken selectors, not as the default excuse for unreliability.
- Keep the browser visible. Watching the run in a live sandbox is often more useful than reading logs after the fact.
- Make memory a team asset. A playbook should outlive the person who recorded it.
- Stay practical. The stack is opinionated, but the goal is simple: save time on repeated browser work without making the system harder than the work itself.
At a high level, the product loop looks like this:
- A teammate records a workflow in Teach Mode.
- Memoo sends frames to Gemini to detect meaningful browser actions.
- Navigator Live captures voice context and can ask short clarifying questions.
- Gemini compiles the raw events into structured playbook steps.
- A run executes the playbook in either a visible sandbox or a headless browser.
- The run stores per-step results and screenshot evidence.
That gives you something better than a transcript and more adaptable than a hardcoded script.
| Path | Purpose |
|---|---|
apps/web |
Next.js product UI: landing page, onboarding, capture flow, playbooks, runs, automations, vault |
apps/api |
FastAPI backend: auth, teams, captures, compile flow, runs, automations, vault, storage |
apps/agent |
Stagehand-compatible browser agent service used when deterministic selectors fail |
apps/sandbox |
Visible Chromium sandbox exposed through noVNC and CDP |
apps/video |
Remotion studio for the Memoo pitch/demo video |
infra/terraform/gcp |
Terraform stack for Google Cloud deployment |
scripts/gcp |
Build, bootstrap, and deploy helpers |
docs/gemini-live-agent-challenge.md |
Build story and challenge submission write-up |
docs/project.md |
Product notes, planning, and repo-level project context |
The frontend lives in apps/web and covers the product workflow end to end:
- public landing page
- login and registration
- team workspace dashboard
- capture flow
- playbook library and folders
- run creation and run detail pages
- automations
- vault credentials
- team settings
The backend lives in apps/api and exposes the core product behavior:
GET /api/health- auth and team onboarding
- team dashboard and membership management
- playbook folders, playbooks, and versions
- capture session creation, event ingestion, frame analysis, finalize, and compile
- run creation and run detail retrieval
- automation scheduling and webhook triggers
- vault credential storage
- sandbox status
When the API starts, it also:
- creates database tables if needed
- ensures the evidence bucket exists
- starts the automation scheduler
The agent service in apps/agent exposes a small HTTP API:
GET /healthPOST /execute
It uses Stagehand with Gemini as the model backend. In practice, this is the escape hatch for steps that are too brittle for normal selector-based execution.
The sandbox in apps/sandbox is a visible Chromium environment with:
- Xvfb + Openbox
- Chromium with remote debugging
- a forwarded CDP endpoint
- x11vnc + noVNC for live viewing
- a tiny health and landing server on port
8585
This matters because Memoo does not treat execution as an invisible background job. You can actually watch it work.
Local development and the GCP deployment follow the same basic split:
- Web for the operator-facing interface
- API for capture, compile, orchestration, and persistence
- Agent for autonomous browser fallback
- Sandbox for the visible live browser
- PostgreSQL for relational data
- MinIO or GCS for evidence assets
On Google Cloud, that becomes:
apps/webon Cloud Runapps/apion Cloud Runapps/agenton Cloud Run- PostgreSQL on Cloud SQL
- evidence storage on Google Cloud Storage
- the visible browser sandbox on a Compute Engine VM
- secrets in Secret Manager
- images in Artifact Registry
- deployment through Cloud Build and Terraform
The dedicated VM for the sandbox is intentional. A live browser session with both noVNC and CDP exposed does not fit neatly into a single serverless container.
- Frontend: Next.js 16, React 19, Tailwind CSS 4, Framer Motion
- Backend: FastAPI, SQLAlchemy, Pydantic, asyncpg
- Automation: Playwright, Stagehand
- AI: Google Gemini models, including Gemini Live
- Storage: PostgreSQL + MinIO locally, GCS in Google Cloud
- Video: Remotion
- Infra: Docker Compose, Terraform, Cloud Build, Cloud Run, Compute Engine
There are two reasonable ways to run Memoo:
- Full Docker stack: best when you want the whole system working with the fewest surprises
- Workspace development: best when you want to edit the web or API app directly on your machine
This is the easiest path if you want the product running end to end.
- Copy the root environment file:
cp .env.template .env- Fill in at least:
GOOGLE_API_KEYNEXT_PUBLIC_GEMINI_API_KEY
- Start the stack:
docker compose up -d --build- Open:
- Web app:
http://localhost:3000 - API docs:
http://localhost:8000/docs - Adminer:
http://localhost:8080 - MinIO console:
http://localhost:9001 - Sandbox:
http://localhost:6080/vnc.html?autoconnect=true&resize=scale&reconnect=true&show_dot=false
Useful commands:
docker compose logs -f
docker compose downYou can also use the Makefile shortcuts:
make up
make logs
make downUse this when you want fast iteration on the web app or API without rebuilding containers each time.
- Node.js 20+
- Python 3.11+
- Docker and Docker Compose
- a Gemini API key
From the repository root:
npm run setupThat installs:
apps/webdependenciesapps/videodependencies- the Python environment for
apps/api
If you are running the API on your host machine instead of in Docker, install the browser once:
cd apps/api
. .venv/bin/activate
python -m playwright install chromiumFor host-based development, the API and web app do not read the root .env in the same way Docker Compose does.
Create:
apps/api/.envapps/web/.env.local
Suggested starting point for apps/api/.env:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=memoo
DB_USER=memoo
DB_PASSWORD=memoo
CORS_ORIGINS=http://localhost:3000
STORAGE_BACKEND=minio
STORAGE_BUCKET=memoo-evidence
STORAGE_PUBLIC_URL=http://localhost:9000
MINIO_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=memoo
MINIO_SECRET_KEY=memoosecret
MINIO_USE_SSL=false
GOOGLE_API_KEY=your_google_api_key
GEMINI_MODEL=gemini-2.5-flash
SANDBOX_CDP_URL=http://localhost:9222
STAGEHAND_SERVICE_URL=http://localhost:8787Suggested starting point for apps/web/.env.local:
NEXT_PUBLIC_API_BASE_URL=http://localhost:8000/api
NEXT_PUBLIC_API_PUBLIC_BASE_URL=http://localhost:8000/api
NEXT_PUBLIC_SANDBOX_NOVNC_URL=http://localhost:6080/vnc.html?autoconnect=true&resize=scale&reconnect=true&show_dot=false
NEXT_PUBLIC_GEMINI_API_KEY=your_google_api_key
NEXT_PUBLIC_GEMINI_LIVE_MODEL=gemini-2.5-flash-native-audio-preview-12-2025At minimum you need PostgreSQL, MinIO, and the sandbox. If you want autonomous fallback, you also need the agent service.
The most reliable path is still to run the full Docker dependencies:
docker compose up -d postgres minio minio-init adminer sandboxThen start the agent locally in a separate terminal:
cd apps/agent
npm install
GOOGLE_API_KEY=your_google_api_key PORT=8787 node --watch server.mjsAPI:
npm run api:devWeb:
npm run web:devOr both at once:
npm run devIf you want a populated workspace:
npm run api:seed- Web app:
http://localhost:3000 - API base:
http://localhost:8000/api - API docs:
http://localhost:8000/docs - Sandbox status via API:
http://localhost:8000/api/sandbox/status - Sandbox noVNC:
http://localhost:6080/vnc.html?autoconnect=true&resize=scale&reconnect=true&show_dot=false - Chromium DevTools endpoint from host:
http://localhost:9222/json/version - Adminer:
http://localhost:8080 - MinIO API:
http://localhost:9000 - MinIO console:
http://localhost:9001 - Agent health when run locally:
http://localhost:8787/health
From the repository root:
npm run setup
npm run dev
npm run web:dev
npm run web:build
npm run web:lint
npm run video:dev
npm run video:render
npm run api:dev
npm run api:seed
npm run db:up
npm run db:downmake up
make down
make logs
make logs-api
make logs-web
make shell-api
make shell-web
make shell-db
make seed
make clean
make rebuildThere are also production-oriented targets such as make prod-up, make prod-down, and the GCP deployment helpers.
The capture flow records a live session and stores browser events plus voice context.
Important API endpoints:
POST /api/teams/{team_id}/capturesPOST /api/captures/{capture_id}/eventsPOST /api/captures/{capture_id}/analyze-framePOST /api/captures/{capture_id}/finalize
Frames are sent to Gemini so the system can detect actions grounded in visible UI evidence. The API normalizes the result and filters noisy detections with a minimum confidence threshold.
The web app connects to Gemini Live for real-time voice interaction during capture. This is where Memoo can ask short clarifying questions instead of guessing what the user meant.
The compile step turns raw capture events into semantic playbook steps with titles, selectors, variables, and guardrails.
Endpoint:
POST /api/captures/{capture_id}/compile
Runs execute through Playwright first. If a step breaks because the selector or page state is messier than expected, the API can delegate the step to the Stagehand-based agent.
Endpoints:
POST /api/teams/{team_id}/runsGET /api/runs/{run_id}
Each run stores step-by-step results and screenshots. That is a core part of the product, not an afterthought.
Memoo uses two kinds of storage:
- PostgreSQL for teams, members, captures, playbooks, runs, automations, invites, and vault metadata
- Object storage for screenshots and evidence assets
Locally, object storage defaults to MinIO. On Google Cloud, the API can switch to GCS with:
STORAGE_BACKEND=gcsThe repo already includes more than ad hoc one-off runs.
Automations can be:
- interval-based
- webhook-triggered
Useful endpoints:
GET /api/teams/{team_id}/automationsPOST /api/teams/{team_id}/automationsPATCH /api/automations/{automation_id}DELETE /api/automations/{automation_id}POST /api/automations/{automation_id}/runPOST /api/automations/webhook/{webhook_token}
The scheduler starts inside the API process at startup and polls for due work.
Vault credentials let playbooks and automations reference stored secrets through template keys.
Useful endpoints:
GET /api/teams/{team_id}/vaultPOST /api/teams/{team_id}/vaultDELETE /api/vault/{credential_id}
apps/video contains the Remotion project used for branded Memoo demos.
Run it with:
npm run video:dev
npm run video:renderThe current composition is MemooBrandStory.
The GCP stack lives in infra/terraform/gcp.
- web service to Cloud Run
- API service to Cloud Run
- agent service to Cloud Run
- PostgreSQL to Cloud SQL
- evidence storage to Google Cloud Storage
- sandbox to a Compute Engine VM
- secrets to Secret Manager
- images to Artifact Registry
export PROJECT_ID="your-project"
export REGION="europe-west1"
./scripts/gcp/bootstrap_tf_state.sh
./scripts/gcp/deploy.shIf you prefer Cloud Build:
gcloud builds submit \
--config cloudbuild.yaml \
--substitutions=_REGION=europe-west1,_ZONE=europe-west1-b,_PREFIX=memoo,_GOOGLE_API_KEY=your-key,_NEXT_PUBLIC_GEMINI_API_KEY=your-keyRead the full deployment notes in infra/terraform/gcp/README.md.
Check:
GOOGLE_API_KEYis present for the APINEXT_PUBLIC_GEMINI_API_KEYis present for the browser Gemini Live session- the selected Gemini model is enabled on that key
Check:
docker compose pshttp://localhost:8000/api/sandbox/statushttp://localhost:6080/vnc.html?autoconnect=true&resize=scale&reconnect=true&show_dot=falsehttp://localhost:9222/json/versiondocker compose exec sandbox curl -fsS http://localhost:8585/health
That usually means the agent fallback is unavailable. Check:
- the agent service is running
STAGEHAND_SERVICE_URLpoints to the right host- the Google API key is available to the agent too
Check:
- MinIO is running locally
- the bucket exists
STORAGE_PUBLIC_URLorMINIO_PUBLIC_URLpoints to a reachable address
Remember:
- Docker Compose uses the root
.env - the FastAPI app reads
apps/api/.env - the Next.js app reads
apps/web/.env.local
This repo is already useful, but it is still a hackathon-era codebase in a few places.
- database migrations are currently handled by startup-time table creation and a few
ALTER TABLEsafeguards - some flows are optimized for demo speed rather than long-term product polish
- the cloud stack favors a fast path to deployment over perfect secret hygiene
That is not a warning label so much as a map. The foundations are here. There is still room to harden the edges.
If you are recording a demo, this flow tells the story clearly:
- Show Teach Mode detecting steps from the live screen.
- Speak extra context through Navigator Live.
- Compile the capture into a playbook.
- Run the playbook in the visible sandbox.
- Open the run detail page and show screenshot evidence.
- Mention the Cloud Run, Cloud SQL, GCS, and sandbox VM split.
