Echo is a workflow automation platform that lets you create, edit, and run browser-based workflows. The agent uses EchoPrism (vision-language model) to execute steps (navigate, click, type, scroll) in a headless browser. You can stream live screenshots while a run executes.
| Layer | Stack |
|---|---|
| Frontend | Next.js 16, React 19, Tailwind CSS, Firebase Auth, Firestore |
| Backend | FastAPI, Firebase Admin, Google Cloud Storage |
| Agent | EchoPrism, Playwright (Cloud Run Job) |
| Deploy | Cloud Run (services + job), gcloud, Docker |
echo/
├── apps/
│ ├── web/ # Next.js 16 web app
│ │ ├── app/ # App Router pages
│ │ ├── components/ # UI components
│ │ ├── lib/ # Firebase, API, utils
│ │ └── DESIGN_SYSTEM.md
│ └── desktop/ # Electron + Vite desktop app
├── packages/
│ └── echo-types/ # Shared TypeScript types
├── backend/ # FastAPI app + EchoPrism agent
├── firebase/ # Firebase config, rules
├── scripts/ # deploy.sh, deploy/, Python helpers
└── package.json # Root scripts (dev, build, deploy)
- Node.js 18+
- Python 3.11+
- Docker (for deployment)
- gcloud CLI (for deployment)
- Firebase project
- Google Cloud project (same as or linked to Firebase)
- Go to Google Cloud Console
- Create or select a project with billing enabled
In APIs & Services → Enable APIs, enable:
- Cloud Run API
- Cloud Scheduler API
- Firestore API
- Cloud Storage API
- Gemini API
- Go to Cloud Storage → Buckets
- Create a bucket with Uniform bucket-level access
- Note the bucket name (e.g.
echo-assets-prod)
This bucket stores workflow assets (video, screenshots) and agent screenshots for live streaming.
- Go to Firebase Console
- Create a new project or add Firebase to your existing GCP project
- Authentication → Sign-in method
- Enable Email/Password
- Enable Google (add OAuth client IDs if needed)
- Firestore Database → Create database
- Choose Native mode
- Pick a location (e.g.
us-central1)
- Project Settings (gear) → Your apps
- Add a web app (</>)
- Copy the config object (e.g.
apiKey,authDomain,projectId, etc.)
From the project root:
cd firebase && firebase deploy --only firestore:rulesOr run pnpm firebase:deploy (see package.json scripts). Alternatively, paste the rules in Firestore → Rules and publish.
Use the same GCP project for both Firebase and Cloud Run. The default compute service account will access Firebase (Auth, Firestore) and GCS via Application Default Credentials.
For Cloud Run, you typically use the default compute service account or a custom one.
Use the default compute SA. Ensure it has:
- Firestore: Cloud Datastore User (or Firestore roles)
- Storage: Storage Object Admin (for GCS upload and signed URLs)
- Cloud Run Jobs: Run Jobs Executor (for agent job execution)
- Go to Google AI Studio
- Sign in and create an API key (select your GCP project)
- Copy the key
Used for:
- Workflow synthesis (video/screenshots → steps)
- EchoPrism agent (workflow execution)
git clone <your-repo>
cd echo
npm installYou do not need .env or .env.local files when using Doppler. Secrets live in Doppler and are injected at runtime.
Setup (one-time):
- Install Doppler CLI:
brew install dopplerhq/cli/doppler - Log in:
doppler login - Link the project:
doppler setup(select project anddevconfig) - Add all env vars in the Doppler dashboard (backend + frontend; see Environment variables reference below)
- For local GCP access, run
gcloud auth application-default login
Run:
# Terminal 1 – backend
pnpm run backend:dev
# Terminal 2 – frontend
pnpm run dev
# or desktop app:
pnpm run dev:desktop
# Terminal 3 (optional) – EchoPrism Agent (chat, voice, synthesis)
pnpm run echo-prism-agent:devWhen running EchoPrism Agent locally, set NEXT_PUBLIC_ECHO_AGENT_URL (web) and VITE_ECHO_AGENT_URL (desktop) to http://localhost:8081 in Doppler.
For teammates: Invite them in Doppler → Members. They run doppler setup once and gcloud auth application-default login, then use the scripts above. No .env copying.
If you prefer local env files instead of Doppler:
Frontend
cd frontend
cp .env.local.example .env.localEdit .env.local with your Firebase config and NEXT_PUBLIC_API_URL=http://localhost:8000.
pnpm install
pnpm run devBackend
cd backend
cp .env.example .envEdit .env with ECHO_GCP_PROJECT_ID, ECHO_GCS_BUCKET, GEMINI_API_KEY.
pip install -r requirements.txt
uvicorn main:app --reloadFrontend: http://localhost:3000
Backend: http://localhost:8000
Health: http://localhost:8000/health
cd backend/agent
pip install -r requirements.txt
playwright install chromiumRun manually (for debugging):
WORKFLOW_ID=xxx RUN_ID=yyy OWNER_UID=zzz GEMINI_API_KEY=your-key \
ECHO_GCS_BUCKET=your-bucket python run_workflow_agent.pySet HEADLESS=false to see the browser.
Ensure these are set in backend/.env:
| Variable | Required | Description |
|---|---|---|
ECHO_GCP_PROJECT_ID |
Yes | GCP project ID |
ECHO_GCS_BUCKET |
Yes | GCS bucket name |
GEMINI_API_KEY |
Yes | Gemini API key |
ECHO_CLOUD_RUN_REGION |
No | Default us-central1 |
pnpm run deploy
# or with backend/.env:
doppler run --config prd -- ./scripts/deploy.sh
# or
GEMINI_API_KEY=your-key ECHO_GCS_BUCKET=your-bucket \
./scripts/deploy.sh YOUR_GCP_PROJECT_ID us-central1The script will:
- Build frontend, backend, and agent Docker images
- Push to
gcr.io/YOUR_PROJECT/... - Deploy
echo-frontendandecho-backendas Cloud Run services - Deploy
echo-agentas a Cloud Run Job - Configure env vars and CORS
- Grant agent execution permissions
- Frontend URL:
https://echo-frontend-{PROJECT_NUMBER}.{REGION}.run.app - Backend URL:
https://echo-backend-{PROJECT_NUMBER}.{REGION}.run.app
The deploy script injects NEXT_PUBLIC_API_URL and NEXT_PUBLIC_ECHO_AGENT_URL into the frontend build. No extra config needed for production.
See scripts/doppler-env-reference.md for the canonical list. Summary:
- Shared (Backend + EchoPrism):
ECHO_GCS_BUCKET,ECHO_GCP_PROJECT_ID,GEMINI_API_KEY,ECHOPRISM_OMNIPARSER_URL,GOOGLE_APPLICATION_CREDENTIALS - Frontend (web):
NEXT_PUBLIC_API_URL,NEXT_PUBLIC_ECHO_AGENT_URL,NEXT_PUBLIC_FIREBASE_* - Desktop:
VITE_API_URL,VITE_ECHO_AGENT_URL
users/{userId}– User profiles (synced on sign-in)workflows/{workflowId}– Workflow metadata (name, status)workflows/{workflowId}/steps/{stepId}– Workflow steps (order, action, params)workflows/{workflowId}/runs/{runId}– Run metadata (status, lastScreenshotUrl, etc.)workflows/{workflowId}/runs/{runId}/logs/{logId}– Run logs
The backend and agent use Firebase Admin SDK and bypass Firestore rules. The frontend reads/writes via rules defined in firebase/firestore.rules.
| Script | Description |
|---|---|
pnpm run dev |
Start Next.js frontend (Doppler env) |
pnpm run dev:desktop |
Start Electron desktop app (Doppler env) |
pnpm run backend:dev |
Start FastAPI backend (Doppler env) |
pnpm run echo-prism-agent:dev |
Start EchoPrism Agent locally (port 8081, Doppler env) |
pnpm run backend:docker |
Build and run backend in Docker |
pnpm run deploy |
Deploy to Cloud Run (uses Doppler prd) |
Ensure Firebase and GCP use the same project. Verify ECHO_GCP_PROJECT_ID is set correctly.
- Confirm
GEMINI_API_KEYandECHO_GCS_BUCKETare set for the agent - Verify the backend SA can execute the agent job (
roles/run.jobsExecutorWithOverridesorrun.invoker) - Check Cloud Run Job logs for the agent
- Ensure
ECHO_GCS_BUCKETis set for the agent - Ensure the agent’s service account has Storage Object Admin on the bucket
- Redeploy after changing env vars
FRONTEND_ORIGIN is set from the Cloud Run frontend URL during deploy. If you use a custom domain, update CORS in the backend.
Google often blocks automated traffic. Consider starting on a different site (e.g. DuckDuckGo) or using the search action instead of navigating directly to google.com.