Per-tenant background worker for Openclaw — the Real Estate Agent Pack. One Railway service runs one tenant.
- Drains a per-tenant
pg-bossqueue from Supabase Postgres - Runs cron jobs (daily prospecting, nurture sweeps, end-of-day summary) on the tenant's local schedule
- Calls Kimi K2.5 via OpenRouter for lead scoring, message generation, and reply classification
- Sends SMS via Twilio
- Hits Follow Up Boss / KVCore / Lofty CRM APIs
| Var | Purpose |
|---|---|
OPENCLAW_TENANT_ID |
UUID of the tenant this worker is dedicated to |
SUPABASE_DB_URL |
Postgres connection string (Supabase Session pooler, port 6543) |
NEXT_PUBLIC_SUPABASE_URL |
Supabase REST URL |
SUPABASE_SERVICE_ROLE_KEY |
Service role key — bypasses RLS, queries are scoped manually by OPENCLAW_TENANT_ID |
OPENCLAW_ENCRYPTION_KEY |
AES-256-GCM key (base64). Must match the web app so encrypted CRM creds can be decrypted. |
OPENROUTER_API_KEY |
OpenRouter API key for Kimi K2.5 |
pnpm install
OPENCLAW_TENANT_ID=<uuid> ... pnpm dev
Provisioned by the Hermes provisioner. Each tenant gets one Railway service via /api/provision. Railway pulls this repo, builds the Dockerfile, deploys.