RAIA™ Specification

Messaging RAIA (Real estate Artificial Intelligence Agent) & Contextual Communication Architecture

This document specifies the segregation of portfolio-wide communications from individual property-level interactions. In RAIA (Real estate Artificial Intelligence Agent) OS, the top-level Messages tab acts as a Universal Inbox for global triage

← Back to Developer Hub TEXTBOOK SPECIFICATION
RAIA™ (Real estate Artificial Intelligence Agent) Specification

This document specifies the segregation of portfolio-wide communications from individual property-level interactions. In RAIA (Real estate Artificial Intelligence Agent) OS, the top-level Messages tab acts as a Universal Inbox for global triage

🧩 Section A: In Plain English

Messaging RAIA (Real estate Artificial Intelligence Agent) & Contextual Communication Architecture

This specification details the structural partition, data models, and routing logic of RAIA's communication pipelines, formalizing the boundary between portfolio-level lists and property-specific workspaces.

📐 System Specifications & Design Spec

Messaging RAIA (Real estate Artificial Intelligence Agent) & Contextual Communication Architecture

This specification details the structural partition, data models, and routing logic of RAIA™ (Real estate Artificial Intelligence Agent) OS communication pipelines. It formalizes the strict boundary between universal portfolio-level communication lists and asset-specific property workspaces, presenting a multi-model Red Team design audit of this critical UX pattern.

RAIA™ (Real estate Artificial Intelligence Agent) OS Communication Topology

💬
Universal Inbox Route: /portfolio/inbox

Aggregates all inbound channels (WhatsApp, Email, SMS, Telegram) for all active assets. Used by centralized triagers and night crons.

🏠
Contextual Property Inbox Route: /property/:propertyId/messages

Strictly isolates conversations linked to the active property_id. Zero bleed-through of irrelevant tenant or building issues.

Chapter 1 — The Contextual Separation Principle (UX Architecture)

Modern real estate operations fail due to a lack of logical isolation. In standard SaaS solutions, messages are organized chronologically or grouped by contact. This introduces a severe vulnerability when a single landlord owns ten properties, or a professional tenant is linked to multiple tenancies. Organizing chats solely by contact results in Context Contamination: an agent triaging a maintenance repair on Gloucester Terrace sees text about rent disputes on Paddington Street simply because the contact profile is identical.

1️⃣

The Universal Portfolio Inbox (Messages)

Accessible via the top navigation (/portfolio/inbox). This viewport behaves as a central desk terminal. It displays a unified chronological list of all active conversations. Initial leads (unmatched to any property records), general inquiries, and multi-asset compliance campaigns are triaged here. The global inbox serves as the entry pipeline where AI parsing routines run before assets can be classified.

2️⃣

The Scoped Property Inbox (Property View)

When an operator navigates to an individual property profile (e.g., [PR000711] First Floor Rear Flat, Gloucester Terrace), the user interface enters a Context Lock. The messaging panel within this view MUST filter all threads to display ONLY those records mapped directly to the current property_id. Clicking the mail icon inside the property sidebar displays conversations with that property's current tenants, guarantor, and building manager.

Chapter 2 — Red Team Model UX Assessments (DeepSeek vs. ChatGPT vs. Opus vs. Gemini)

Designing real estate agentic workflows requires evaluating cognitive structures across different LLM design cultures. We conducted a Red Team analysis of this design pattern using the four leading model families:

🤖

DeepSeek-V3 (Efficient Scale)

Philosophy: Prioritizes extreme raw structural indexing and high data density.

UX Risk: May design an extremely fast, query-optimized list but overlook human sensory fatigue. Fails to notice "empty states" (e.g., Screenshot 1 with "No conversations found" instead of displaying an option to link historical emails).

Vulnerability: High density leads to operator cognitive bypass, skipping vital tenancy verification.
💬

ChatGPT / GPT-4o (Product SaaS Pattern)

Philosophy: Strict adherence to industry standard Slack-like conversational layouts.

UX Risk: Flat list designs grouping by contact name. Under this model, the chat window naively aggregates all texts from Landlord "John Smith" across properties A, B, and C into a single scroll, leaking security credentials across boundaries.

Vulnerability: Collapses database relations into a simple string contact, destroying tenant isolation.
🧠

Claude 3.5 Opus (Context Preservation)

Philosophy: Heavy multi-tier system modeling, preserving legal boundaries.

UX Risk: Over-engineers relationships. Demands strict compliance handshakes and manual linking approvals before showing *any* conversation in the sidebar, causing operational paralysis.

Vulnerability: Extreme friction on simple leasing queries; developers bypass the interface via direct DB scripts.
✨

Gemini Latest (Spatial/Multi-Modal)

Philosophy: Highly spatial, visual-centric layouts connecting map coordinates directly to active panes.

UX Risk: Collapses deep state logic. Tends to oversimplify conversational data as transient "map pin tooltips," failing to track the underlying transactional entity changes on the ledger.

Vulnerability: Loose data mapping; visual representation looks beautiful, but data state remains out of sync.

Repository Code

The live codebase implementation for this specification sits within the following repository folder:

Chapter 3 — Database & Routing Schema (ADR-252)

To prevent the context leak identified in Chapter 1, RAIA™ (Real estate Artificial Intelligence Agent) OS utilizes an explicit relation join inside tbl_conversations. Standard contact-based mapping is replaced by a strict property-scoped state machine:

Database Schema: public.tbl_conversations Additions

  • conversation_id: UUID (Primary Key)
  • property_id: UUID (Foreign Key linking to tbl_properties(property_id), Nullable)
  • person_id: UUID (Foreign Key linking to tbl_persons(person_id))
  • active_tenancy_id: UUID (Foreign Key linking to tbl_tenancies(tenancy_id), Nullable)
  • channel: Text representation of current medium (whatsapp, email, telegram)

Contextual Inbox Retrieval Query

The query used inside the Property Message Sidebar component. It restricts conversation threads strictly to the asset context, ensuring zero leakage of external threads involving the same person:

SELECT 
  c.conversation_id,
  c.channel,
  p.first_name || ' ' || p.last_name AS contact_name,
  COALESCE(
    (SELECT body FROM public.tbl_conversation_messages m 
     WHERE m.conversation_id = c.conversation_id 
     ORDER BY m.created_at DESC LIMIT 1),
    'No messages'
  ) AS last_message_body,
  c.updated_at
FROM public.tbl_conversations c
JOIN public.tbl_persons p ON c.person_id = p.person_id
WHERE c.property_id = :activePropertyId
  AND c.organisation_id = :activeOrgId
ORDER BY c.updated_at DESC;

Chapter 4 — Frontend Component Architecture & GTM Implementation Plan

The user experience implementation enforces strict separation of view concerns, optimizing layout structures based on the operator's viewport context:

Interface View Component Handler Routing Behavior AI Draft Scoping
Universal Inbox UniversalInbox.tsx Fetches all conversations for active organisation. Unbound from asset scope. Scans all leases and landlord profile data globally to draft responses.
Property Messages Panel ContextualPropertyInbox.tsx Restricted to active propertyId from React router params. Strictly locked to current property assets, gas certs, and lease ledger.

🚀 GTM Implementation Roadmap

Phase 1: Shadow-Mode Context Linking

ACTIVE

Nightly crons and background AI models scan incoming messages in the Universal Inbox. They apply a zero-hallucination parsing loop matching sender IDs, postcodes, and active lease records to assign a property_id to existing unmapped conversations automatically. No manual user interface modification is active.

Phase 2: Gated HITL Workspace Segmentation

GATED

Launch of the ContextualPropertyInbox.tsx interface on beta test-tenant environments. Operators navigating to Property details are served only mapped threads. If a conversation fails to resolve, a clear call-to-action is provided allowing human staff to manually bind the conversation to the asset.

Phase 3: Fully Autonomous RAIA (Real estate Artificial Intelligence Agent) Integration

AUTO

The platform is fully decoupled from manual routing. RAIA (Real estate Artificial Intelligence Agent) autonomously detects, handles, and resolves messages under the isolated property context. Direct human interaction is bypassed completely, reverting to 0% AI raw agentic fallback strictly upon complex regulatory dispute trigger exceptions.

Repository Code

The live codebase implementation for this textbook logic sits within the following repository folder: