RAIA™ Specification

3.10 Dynamic Asset Snapshots & Overnight Rebuild Pipelines

An asset snapshot is a compiled cheat sheet for a rental property — a background pipeline gathers data from multiple sources, organizes it, and creates a secure markdown dossier for AI assistants.

← Back to Developer Hub TEXTBOOK SPECIFICATION
🧩 Section A: In Plain English

Dynamic Asset Snapshots

An asset snapshot is a compiled cheat sheet for a rental property — a background pipeline gathers data from multiple sources, organizes it, and creates a secure markdown dossier for AI assistants.

🧩 In Plain English

An asset snapshot acts as a highly compiled "cheat sheet" for a rental property. Instead of forcing our AI assistants to search through multiple raw databases, communication logs, and PDF files on the fly, a background pipeline gathers all this information in advance, organizes it, and compresses it. This creates a secure, structured markdown dossier containing tenancy terms, compliance dates, and recent activity. Because we pre-scrub sensitive customer details locally using a private AI filter, we can send this context to external models for summarization without violating data compliance rules or risking training opt-ins.

2 Layers
Static & Live Snapshots
10 Min
Live Debounce Lock
Zero Leak
Local PII Scrubbing
ADR-084
No Webhook Loop Guard

⚡ Dynamic Asset Snapshots & Overnight Pipelines

Sovereign Engineering (ADR-086)

RAIA™ (Real estate Artificial Intelligence Agent) OS implements a dual-layer property context system designed to eliminate LLM hallucinations, enforce localized GDPR/PII boundaries, and optimize API costs. The system splits property context into a multi-year Static Layer and a highly dynamic Live Layer. This ensures our AI concierge has a complete, structured, and compliant understanding of every managed property.

Chapter 1: The Rationale (Why We Snapshot)

1. The Data Fragmentation Problem

A property's ground truth is scattered across multiple isolated silos: relational terms in Supabase, email logs in Google BigQuery, support threads in Intercom, financial records in automated bank reconciliation gateway, and PDF certificates in Google Cloud Storage. Searching all these endpoints dynamically during an active customer chat leads to unacceptable latency (15s+), excessive token consumption, and catastrophic hallucinations when search results fail to align.

2. The AI Hallucination Solution

By compiling these silos into a single, structured Markdown dossier (the "Golden Record") *before* a conversation begins, we constrain the LLM context to verified facts. The AI concierge no longer queries relational tables or writes complex SQL joins; it simply reads the pre-compiled snapshot. This guarantees 100% factual accuracy on complex questions like rent review histories and break-clause dates.

3. PII Minimization & Zero Leakage

Under GDPR/ADR-PII-001, we must never send raw personal documentation or unredacted emails to external API providers. Dynamic snapshots solve this through a **two-step local sanitization pipeline**: raw communications are pulled, pre-scrubbed by our local `nvidia/gliner-PII` NER model to remove names, passport numbers, phone numbers, and emails, and only then sent to Claude/Gemini APIs for summarization.

4. Operational Tokenomics

Compiling a static snapshot is a token-intensive operation, requiring ~15,000 to ~20,000 input tokens. Rebuilding all 3,464 managed assets nightly would cost over $340/day. Instead, we use **Selective Rebuilding**: snapshots are compiled only for properties with active SJT lifecycle events, keeping active DB records lean and keeping daily token costs below $1.50.

Chapter 2: Dual-Layer Architecture & Data Flows

RAIA™ (Real estate Artificial Intelligence Agent) OS splits the property context into two distinct layers managed in a single table, tbl_asset_snapshots, ensuring high-speed delivery to the agent:

Figure 1.1: Dual-Layer Dynamic Snapshot Architecture DATA SOURCES PIPELINE & SECURITY DB DUAL LAYERS CONSUMERS Static Structures tbl_tenancies tbl_documents (Gas/EPC) Historic Comms gmail_legacy.email_diary intercom_legacy Live Events property_events maintenance_tickets Live Financials tbl_rents (automated bank reconciliation gateway) arrears_status rebuild-snapshot-tiers.cjs Core Compilation Coordinator Interval: Nightly Sweep / Lifecycle Triggers Local PII Filter: nvidia/gliner-PII (Local VPS) live-event-listener.cjs Debouncer (10 Min Window) Trigger: property_events INSERT PII Filter: Redacts before external API Anthropic API Claude 4.6 (EU Regional) tbl_asset_snapshots snapshot_static • Landlord Terms • Compliance Dates • Lead Tenant IDs • RRA Legal Flags • Compressed Diaries rebuilt_at / trigger_type snapshot_live • Open Tickets (Owner) • Rent Arrears Ledger • Key Vault Location • Damp/Mould SLA • 14-Day activity log • Quiescent Fallback debounced 10m / event_id Concierge AI Agent Awaab's SLA Alerts Trigger
Figure 1.1: Schematic representation of our decoupled dual-layer storage context, mapping input pipelines to output snapshot records.

Security & Pipeline Guardrails

Guard Rail Operational Layer Enforcement Style Enforcement Action
Local PII Extraction Redaction Input Sanitization Hard-Block Local nvidia/gliner-PII scrubs Tier 2 documents & names before calling external API.
10-Minute Write Debouncer Database Trigger Soft-Gate PostgreSQL triggers check last write. If < 10 mins, shunts rebuild into a lazy queue.
Webhook Loop Prevention Relational Design Hard-Block Decoupled tbl_asset_snapshots table prevents updates on assets from looping.
Canned Quiescent States Inference Cost Saving Auto-Pass No active events in 14 days bypasses LLM call entirely, writing pre-rendered text.

2.1 Detailed Architectural Breakdown

1. The Static Layer (snapshot_static)

The Static Layer represents the overall multi-year relationship context of the property. It contains core specifications (e.g., structural type, keys, smart meter configurations), legal landlord agreements, historical compliance dates (EPC, Gas Safety, EICR, including explicit warning indicators for expiries), and localized tenancy frameworks (break clauses, notices, and rent history). This layer compiles infrequently—typically only upon key tenancy lifecycle events or manual triggers.

2. The Live Layer (snapshot_live)

The Live Layer captures active operational momentum. It indexes outstanding maintenance issues (categorized by contractor ownership and days open), current rent arrears schedules, and key locations, and includes a rolling 14-day activity digest mapping communications across our SMS, email, and WhatsApp channels. To keep this layer running smoothly under high-frequency updates (e.g., when a tenant sends multiple chat messages), a Postgres debouncing trigger enforces a strict **10-minute cooldown** per asset. If no events have occurred in 14 days, the system bypasses the LLM call entirely and writes a pre-formatted, quiescent string, reducing unnecessary API costs.

2.2 Step-by-Step Compilation & Local PII Scrubbing Workflow

When a database event triggers a snapshot rebuild (static or live), the pipeline executes the following sequence:

Figure 1.2: Step-by-Step Compilation Workflow Trigger DB Event INSERT/UPDATE Extract Pull Raw Data from Sources Scrub PII Local NER Filter gliner-PII Compile LLM Summary Write to DB
Figure 1.2: The four-stage compilation workflow with local PII scrubbing before any external API call.

📋 Section B — User Guide: Working with Asset Snapshots

Asset snapshots are generated automatically overnight and on-demand. This guide explains how to trigger, view, and interpret snapshots within Paperclip.

How Snapshots Are Generated

  1. Overnight batch: The pipeline runs each night, collecting data from Supabase, BigQuery, automated bank reconciliation gateway, and GCS for all active properties.
  2. PII scrubbing: Tenant names, phone numbers, and emails are stripped locally before any external AI summarisation call.
  3. Snapshot storage: The compiled Markdown dossier is written to secure storage and linked to the property record.
  4. Live refresh: For urgent queries, a live snapshot can be triggered — subject to a 10-minute debounce lock to prevent API hammering.
  5. Context injection: The AI concierge automatically loads the most recent snapshot when a property conversation is opened.
Tip: If a snapshot seems outdated (e.g. missing a recent rent payment), navigate to the property record in Paperclip and use Refresh Snapshot. The debounce lock resets after 10 minutes.

Reading a Snapshot

Each snapshot is structured as a Markdown dossier with these top-level sections:

  • Property Summary — address, type, current rent, lease dates
  • Tenancy Terms — break clauses, renewal status, guarantor details
  • Compliance Dates — gas safety, EPC, EICR, smoke alarm dates
  • Recent Activity — last 10 comms across all channels
  • Financial Snapshot — rent arrears flag, last automated bank reconciliation gateway sync timestamp
Note: Snapshots are read-only. To update property data, edit the source record in Paperclip. The overnight batch will refresh the snapshot automatically.

Repository Code

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

🔧 Section C: Developer Guide

Architecture Details

The dynamic asset snapshot system implements a dual-layer compilation pipeline with local PII scrubbing, selective rebuilding, and debounced live updates. The architecture decouples data extraction from AI inference to enforce GDPR compliance and control operational costs.

  • Core Component: rebuild-snapshot-tiers.cjs (static compiler) and live-event-listener.cjs (live debouncer)
  • Data Flow: Source Tables → Local PII Scrub → External LLM API → Compiled Markdown → tbl_asset_snapshots
  • Integration Points: Supabase (tbl_tenancies, tbl_documents, tbl_asset_snapshots), Google BigQuery (gmail_legacy.email_diary), Anthropic API (Claude 4.6), nvidia/gliner-PII NER model

Configuration Reference

Key configuration parameters for this system:

Parameter Type Default Description
snapshot_static_enabled boolean true Enable nightly static snapshot compilation
live_debounce_minutes integer 10 Cooldown window between live snapshot rebuilds per asset
quiescent_threshold_days integer 14 Days of inactivity before bypassing LLM and writing canned text
pii_scrub_model string nvidia/gliner-PII Local NER model for PII redaction before external API calls
llm_provider string anthropic/claude-4.6 External LLM for snapshot summarization (EU regional endpoint)
DYNAMIC SNAPSHOT PIPELINE — DATA FLOW Supabase Tables tbl_tenancies, tbl_documents BigQuery / automated bank reconciliation gateway email_diary, transactions Local PII Scrub nvidia/gliner-PII NER Zero external leakage LLM Compiler Claude 4.6 (EU) Query-driven hierarchy tbl_asset_snapshots snapshot_static snapshot_live Concierge AI Agent Local PII scrubbing occurs before any external API call — raw personal data never leaves the VPS Selective rebuild: only assets with active SJT lifecycle events · 10-minute debounce on live updates Data Sources PII Scrub (Local) LLM Compiler Snapshot DB Consumer

Figure 2: Dynamic snapshot pipeline — data sources, local PII scrubbing, LLM compilation, and storage.

Troubleshooting

Issue Cause Resolution
Snapshot stale after event Debounce lock active (10 min cooldown) Wait for debounce window or manually trigger via Paperclip Refresh Snapshot
PII detected in snapshot NER model missed entity or new data pattern Review gliner-PII confidence thresholds; retrain on new entity types; re-run scrub pipeline
Snapshot not generated No active SJT lifecycle event (selective rebuild) Verify property has qualifying event; check rebuild-snapshot-tiers.cjs logs for skip reason
Repo Reference RAIA

This component is part of the RAIA (Real estate Artificial Intelligence Agent) platform mono-repo. Implementation details, API contracts, and integration tests are available in the repository.