AI-powered voice booking agent platform. Businesses create voice agents that handle reservations and bookings via real-time phone conversations, integrated with Google Calendar. Built on Gemini Live API for bidirectional native audio streaming.
apps/
web/ → Next.js 15 dashboard & API (port 3005)
agent/ → Fastify 5 voice agent server, Gemini Live API (port 8080)
widget/ → Embeddable voice booking widget (port 3006)
call/ → WhatsApp-style direct call link app (port 3009)
packages/
db/ → Prisma schema + client (PostgreSQL)
shared/ → Shared constants and types
ui/ → Shared UI components (shadcn/ui)
typescript-config/
eslint-config/
| Layer | Technology |
|---|---|
| Voice AI | Gemini 2.5 Flash Live API via @google/genai SDK |
| Web | Next.js 15 (App Router), React 19, TanStack Query, Tailwind CSS 4 |
| Agent | Fastify 5, WebSocket, @google/genai Live API streaming |
| Widget & Call App | Next.js 15, Web Audio API, PCM 16kHz streaming |
| Database | PostgreSQL 15 via Prisma ORM |
| Auth | iron-session (encrypted cookies) + bcryptjs |
| Calendar | Google Calendar API via OAuth 2.0 |
| Infra | Google Cloud Run, Cloud SQL, Cloud Build, Terraform |
| Monorepo | Turborepo + pnpm workspaces |
- Node.js >= 20
- pnpm >= 10.4
- PostgreSQL (local or Cloud SQL)
- Google Cloud account with:
- Gemini API key (for voice agent + research)
- Google Places API key (for location search)
- Google OAuth 2.0 credentials (for calendar integration)
pnpm installcp apps/web/.env.example apps/web/.envapps/web/.env
# Auth
SESSION_SECRET= # At least 32 characters (openssl rand -base64 48)
AUTH_USERNAME=admin # Default admin username (lazy-seeded on first login)
AUTH_PASSWORD=changeme # Default admin password (lazy-seeded on first login)
ALLOW_SIGNUP=false # Set to "true" to allow new user registration
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/liveagent
# Agent Service
NEXT_PUBLIC_AGENT_WS_URL=ws://localhost:8080
AGENT_SERVICE_URL=http://localhost:8080
# Google Cloud
GOOGLE_API_KEY= # Gemini API key
GOOGLE_PLACES_API_KEY= # Google Places API key
# Google OAuth (Calendar integration)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Widget
NEXT_PUBLIC_WIDGET_URL=http://localhost:3006
NEXT_PUBLIC_DEMO_AGENT_ID= # Agent ID for landing page demoapps/agent/.env
GOOGLE_API_KEY= # Same Gemini API key
DATABASE_URL=postgresql://user:password@localhost:5432/liveagent
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
PORT=8080pnpm db:generate # Generate Prisma client
pnpm db:push # Push schema to database- Gemini API key — Google AI Studio — add to both
apps/web/.envandapps/agent/.env - Places API key — Google Cloud Console — add to
apps/web/.env
- Go to Google Cloud Console
- Create an OAuth 2.0 Client ID (type: Web application)
- Add authorized redirect URI:
http://localhost:3005/api/agents/[id]/calendar/callback - Enable the Google Calendar API in your project
- Copy Client ID and Client Secret to both
.envfiles
pnpm dev| App | URL |
|---|---|
| Web dashboard | http://localhost:3005 |
| Agent server | http://localhost:8080 |
| Widget | http://localhost:3006 |
| Call app | http://localhost:3009 |
Run individual apps:
pnpm --filter @liveagent/web dev # Web dashboard
pnpm --filter @liveagent/agent dev # Agent server
pnpm --filter @liveagent/widget dev # Widget
pnpm --filter @liveagent/call dev # Call apppnpm db:generate # Regenerate Prisma client after schema changes
pnpm db:push # Push schema to DB (dev, no migrations)
pnpm db:migrate # Run migrations (production)
pnpm db:studio # Open Prisma Studio GUI- Create an agent in the dashboard — configure business name, type, voice, greeting, and instructions
- Connect Google Calendar — OAuth flow links your calendar for real-time availability checking and booking
- Voice calls — The agent service uses Gemini Live API (
@google/genai) for real-time bidirectional audio streaming. Callers speak naturally; the AI checks availability and creates bookings via function calling (check_availability, create_booking, reschedule, cancel) - Widget — Embed a voice booking widget on any website with a single
<script>tag - Call link — Share a direct call URL (e.g.,
call.liveagent.dev/joes-barbershop) via social bios, QR codes, or SMS - Playground — Test and customize the widget appearance and agent behavior in the dashboard
Authentication uses iron-session encrypted cookies with credentials stored in PostgreSQL (bcrypt-hashed passwords).
- Default admin user is lazy-seeded on first login using
AUTH_USERNAMEandAUTH_PASSWORDenv vars - Signup is disabled by default (
ALLOW_SIGNUP=false) - All data is single-tenant with
orgId="default"
A single terraform apply builds all Docker images in Cloud Build and deploys everything to Cloud Run. No local Docker required.
- Terraform >= 1.5
- gcloud CLI authenticated (
gcloud auth login && gcloud auth application-default login)
These are enabled automatically by Terraform:
| API | Service ID | Used For |
|---|---|---|
| Cloud Run | run.googleapis.com |
Hosting web, agent, and widget services |
| Cloud SQL Admin | sqladmin.googleapis.com |
Managing PostgreSQL database |
| Artifact Registry | artifactregistry.googleapis.com |
Storing Docker images |
| Cloud Build | cloudbuild.googleapis.com |
Building Docker images remotely |
| Secret Manager | secretmanager.googleapis.com |
Storing credentials |
| VPC Access | vpcaccess.googleapis.com |
Secure Cloud SQL connectivity |
| Generative Language | generativelanguage.googleapis.com |
Gemini API for voice streaming, TTS, research |
| Vertex AI | aiplatform.googleapis.com |
Alternative Gemini endpoint |
| Google Calendar | calendar-json.googleapis.com |
Booking management |
| Google Places | places.googleapis.com |
Business location search |
# 1. Configure
cd infra
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your values
# 2. Initialize Terraform
terraform init
# 3. Deploy everything (builds images in Cloud Build + deploys to Cloud Run)
terraform applyThat's it. Terraform will:
- Enable all required GCP APIs
- Create Artifact Registry repository
- Build all 4 Docker images in Cloud Build (no local Docker needed)
- Create Cloud SQL PostgreSQL database
- Run Prisma schema push via Cloud SQL Proxy (automatic)
- Deploy 4 Cloud Run services (web, agent, widget, call)
- Configure service accounts and IAM
cd infra
terraform output web_url # Dashboard
terraform output agent_url # Voice agent WebSocket
terraform output widget_url # Embeddable widget
terraform output call_url # Direct call link appTo show a live voice widget on the landing page:
- Create an agent in the dashboard
- Set
demo_agent_idinterraform.tfvarswith the agent ID - Run
terraform applyagain
After code changes, just run terraform apply again. It rebuilds all images in Cloud Build and updates the Cloud Run services.
This project is licensed under the GNU General Public License v3.0.
