Sophia.
An AI assistant for Zyprus Property Group . Cyprus’ largest real-estate operation. Agents message her on WhatsApp, send property emails, or chat in Telegram. She drafts listings, generates 38 legal documents, calculates VAT and capital gains, and uploads everything to the Zyprus website. All from chat.
- Client
- Zyprus Property Group
- Sector
- Real estate · Cyprus-wide
- Stack
- Supabase · Next.js 15 · OpenRouter
- Channels
- WhatsApp · Email · Telegram
One thread on WhatsApp.
A real flow, condensed. The agent doesn’t open a CRM, doesn’t fill a form, doesn’t email a designer. They talk. Sophia drafts, validates, routes for review, and uploads.
Sophia
online
- Sophia, I have a 3-bed apartment in Limassol, 240k, owner Michalis 99 123 456
- Got it. Sale or rent?
- Sale. 110 sqm covered, 2 bathrooms, ground floor, brand new.
- Drafting the listing now. Floor plans or just photos?
- 6 photos coming up.
- Listing #47821 created as draft. Reviewer 1 → Lauren · Reviewer 2 → requestlimassol@zyprus.com. Need the viewing form too?
- Yes, send it to me by email.
- Sent. Template 04. Viewing Form. Anything else, send when you can.
Stylized example of a real flow. Listing IDs are fictional.
Three doors, one Sophia.
Same prompts, same tools, same database. different transports. An agent can finish a property over WhatsApp, forward an inquiry by email, or land a Telegram lead, and Sophia stitches them together into the same record.
Primary channel. Agents send property details and photos. Sophia replies with drafts, calculations, and document links.
Supabase Edge Function · sophia-bot
Telegram
Lead routing for Paphos and Others groups. Indexer + private AI chat with regional gating.
Supabase Edge Function · telegram-sophia
Property emails are watched and forwarded to the same AI pipeline as WhatsApp.
Railway service · email-router → /email handler
Nine tools. Mostly write, not chat.
Sophia does work, not small talk. Almost every tool either reads from Zyprus, writes back to it, or computes a Cyprus-specific number an agent would otherwise guess.
| Tool | Purpose | Notes |
|---|---|---|
createPropertyListing | Drafts a property listing with auto-validated fields | Uploads as unpublished draft to Zyprus Drupal |
createLandListing | Drafts a land listing with separate plot-specific fields | Distinct floor-plan handling |
getZyprusData | Reads existing Zyprus data. properties, owners, references | Read-only API access |
extractFromBazaraki | Scrapes a Bazaraki listing URL to pre-fill the new draft | Reduces typing for agents |
calculateVAT | Cyprus property VAT. first-home reduced rate handling | 5% / 19% rules |
calculateTransferFees | Department of Lands transfer fee bands | Joint-name discount aware |
calculateCapitalGains | CGT on disposal. exemptions, allowances, indexation | Resident exemption logic |
getRegionalAgents | Returns the right regional reviewer for a given listing | Paphos · Limassol · Larnaca · Nicosia · Famagusta |
sendEmail | Sends generated DOCX (viewing form, marketing agreement) to the agent | Resend, verified domain |
38 Cyprus real-estate documents, generated in chat.
Every template lives in code as a registered DOCX. Sophia detects intent, collects missing fields with mandatory validation, generates the file, and sends it via Resend to the agent or directly to the client.
Viewing forms, marketing agreements, exclusivity, rentals
Reservation forms, offers, deposit receipts, identification
Owner instructions, fee letters, statements, vendor checklists
Sale agreements, transfer prep, valuation requests, advisory letters
Eight priorities, two sources of truth.
Prompts live in both Postgres and the codebase. The DB takes precedence. Lower priority numbers win in conflicts. Safety rules are file-only and never auto-optimized.
- 10identityWho Sophia is. Tone, language, who she works for.
- 20safety_rulesFile-override. Never auto-optimized.
- 25reservation_loan_vat_requiredMandatory fields for reservation deals.
- 30document_routingWhen to send DOCX vs. plain text.
- 40property_uploadValidation, region permissions, image rules.
- 50response_formatHow a Sophia message should look on WhatsApp.
- 60calculatorsWhen to invoke VAT / transfer / CGT tools.
- 70cyprus_knowledgeCyprus real-estate domain knowledge fallback.
Eleven services in production.
Sophia is not one app. She’s a network of small, single-purpose services. each cheap to operate, easy to redeploy, and auditable on its own.
| Component | Stack | Status |
|---|---|---|
| WhatsApp Bot · Sophia | Supabase Edge Function · sophia-bot | Live |
| Telegram Lead Router | Supabase Edge Function · telegram-sophia | Live (Paphos, Others) |
| Telegram Indexer | Supabase Edge Function · telegram-indexer | Live |
| Listing Notifier | Supabase Edge Function · pg_cron 15m | Live |
| Draft Cleanup | Supabase Edge Function | Live |
| Prompt Optimizer | Supabase Edge Function · pg_cron 6h | Live |
| Call Audit | Supabase Edge Function · 3CX hooks | Live |
| Email Router | Railway · email-router | Live |
| Bazaraki Scraper | Docker service | Live |
| Admin Panel | Vercel · Next.js 15 + NextAuth | Live |
| Database | Supabase Postgres + Drizzle | Live |
Region-aware. Reviewer-aware. Audit-aware.
Sophia enforces region-based ACL. agents can only upload listings in their assigned area (Paphos, Limassol, Larnaca, Nicosia, Famagusta, or “all”). Cross-region attempts are rejected with a clear message, not a silent failure.
Reviewer assignment is rule-driven, not guess-driven. For-sale listings get a primary reviewer (Lauren) plus a regional office; rentals stay with the agent who created them. Famagusta routes directly to the regional office. Michelle’s rentals route to demetra@zyprus.com with the Limassol office as backup.
Every WhatsApp inbound, every email forward, every Telegram routing decision lands in Postgres with a chat_history row, a media row, and (where applicable) a listing_uploads row. The pg_cron listing-notifier polls every 15 minutes for publication status and notifies the agent when a draft goes live.