Files · Vertex AI Voice Agent for Buildium Maintenance Requests
73 (1 binary, 770.4 kB total)attempt 1
README.md·3057 B·markdown
markdown
# Vertex AI Voice Agent for Buildium Maintenance Requests
> A 24/7 voice receptionist that authenticates tenants, creates work orders in Buildium, and provides real‑time status updates — so property managers never miss a maintenance call.
## Environment Variables
| Var | Placeholder |
|-----|-------------|
| `NODE_ENV` | `development` |
| `TWILIO_ACCOUNT_SID` | `<your-twilio-account-sid>` |
| `TWILIO_AUTH_TOKEN` | `<your-twilio-auth-token>` |
| `TWILIO_PHONE_NUMBER` | `<your-twilio-phone-number>` |
| `DEEPGRAM_API_KEY` | `<your-deepgram-api-key>` |
| `CARTESIA_API_KEY` | `<your-cartesia-api-key>` |
| `GOOGLE_CLOUD_PROJECT` | `<your-gcp-project-id>` |
| `GOOGLE_CLOUD_LOCATION` | `us-central1` |
| `GOOGLE_GENAI_USE_VERTEXAI` | `true` |
| `GOOGLE_APPLICATION_CREDENTIALS` | `<path-to-service-account.json>` |
| `UPSTASH_REDIS_URL` | `<your-upstash-redis-url>` |
| `UPSTASH_REDIS_TOKEN` | `<your-upstash-redis-token>` |
| `BUILDIUM_CLIENT_ID` | `<your-buildium-client-id>` |
| `BUILDIUM_CLIENT_SECRET` | `<your-buildium-client-secret>` |
| `BUILDIUM_API_BASE_URL` | `https://api.buildium.com` |
| `LANGFUSE_PUBLIC_KEY` | `<your-langfuse-public-key>` |
| `LANGFUSE_SECRET_KEY` | `<your-langfuse-secret-key>` |
| `LANGFUSE_BASE_URL` | `https://cloud.langfuse.com` |
| `SESSION_TTL_SECONDS` | `3600` |
| `SESSION_MAX_TURNS` | `20` |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `<your-otel-endpoint>` |
## Architecture
```
Twilio Call → POST /api/calls (TwiML) → /api/twilio/stream (WebSocket)
│
▼
@reaatech/voice-agent-core Pipeline
│
┌─────────────────────────┼─────────────────────────┐
▼ ▼ ▼
STT (Deepgram Nova-2) LLM (Vertex AI Gemini 2.5 Flash) TTS (Cartesia Sonic)
│ │ │
└─────────────────────────┼─────────────────────────┘
│
▼
Buildium API (work orders)
```
Twilio receives an incoming call and forwards it via webhook to `POST /api/calls`, which returns TwiML instructing Twilio to stream audio to the WebSocket endpoint at `/api/twilio/stream`. The `@reaatech/voice-agent-core` Pipeline orchestrates three stages: speech-to-text via Deepgram Nova-2, conversation logic via Vertex AI Gemini 2.5 Flash, and text-to-speech via Cartesia Sonic. Work order creation is handled through the Buildium API.
## Setup
```bash
pnpm install
pnpm dev
```
Configure your Twilio phone number's voice webhook to `POST /api/calls`.