RAIA™ Specification

Documentation

RAIA™ (Real estate Artificial Intelligence Agent) stays smart on global real estate trends, regulatory shifts, and AI developments by automatically reading 44 industry news feeds every single night. These articles are automatically sent to Goog

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

RAIA™ (Real estate Artificial Intelligence Agent) stays smart on global real estate trends, regulatory shifts, and AI developments by automatically reading 44 industry news feeds every single night. These articles are automatically sent to Goog

🧩 Section A: In Plain English
d Industry News Feeds + NotebookLM

RAIA (Real estate Artificial Intelligence Agent) stays current on global real estate trends by automatically reading 44 industry news feeds every night and sending them to NotebookLM for analysis, which then powers a live NewsTicker dashboard.

📘 SECTION 3.14 TECHNICAL SPECIFICATION & ARCHITECTURE BLUEPRINT
🧩 In Plain English

RAIA™ (Real estate Artificial Intelligence Agent) stays smart on global real estate trends, regulatory shifts, and AI developments by automatically reading 44 industry news feeds every single night. These articles are automatically sent to Google NotebookLM, which analyzes them using our proprietary business context (Sovereign Pilot Agency & EstateAigents) and pre-computes a 7-day business impact score. This analysis is pushed directly to our database to populate the live NewsTicker on our main agent dashboard—ensuring our business strategy is always aligned with active market shifts.

3.14 News Feed scanning & Google NotebookLM Research Integration

Engineering Blueprint

In the modern proptech and property management landscape, staying ahead of legal changes (such as the Renters' Rights Act 2025), economic indicators (Bank of England rate adjustments), and technical AI breakthroughs is a massive competitive advantage. Traditionally, this required human staff to waste hours reading blogs, newsletters, and academic papers.

To solve this, RAIA™ (Real estate Artificial Intelligence Agent) implements an autonomous, dual-stage feed monitoring and semantic enrichment pipeline. Utilizing a local RSS-fetching engine (blogwatcher-cli), custom SQLite buffering, and a headless Google NotebookLM scraper (notebooklm-cli), the platform ingests, categorizes, uploads, and queries market news completely autonomously. The resulting context-specific business impact analyses are stored in Supabase to drive the live system-wide NewsTicker.

1. Dual-Stage Ingestion & Semantic Enrichment Flow

Our news pipeline operates in two distinct phases running sequentially every night via scheduled crons. This decoupling ensures that raw network-bound RSS scanning does not block deep LLM querying, and keeps articles safely queued if upstream APIs or browser cookie sessions drop.

1A. SCAN TRIGGER 44 Active RSS Feeds Supabase REST Fetch 1B. LOCAL SCRAPER blogwatcher-cli Pulls RSS → SQLite 1C. RESEARCH INDEX Google NotebookLM 5-split segmented vaults 2A. SEMANTIC QUERY Temporal Impact Ask B2B context reasoning 2B. STORAGE LEDGER Supabase DB Sync articles & enrichments 2C. PRESENTATION LAYER NewsTicker Board Live agent login dashboard

2. Chronological Pipeline Operations

A

Pipeline A: RSS Intake & NotebookLM Upload (Daily at 04:00 AM)

Executed by blogwatcher-notebooklm-sync.py, this cron job retrieves active feeds from Supabase, updates blogwatcher-cli's SQLite registry, scans for new articles, maps each to its target Notebook ID based on jurisdiction and stream, and uploads the URLs to Google NotebookLM. It marks SQLite articles as read to prevent duplicates.

B

Pipeline B: Supabase Sync & Impact Enrichment (Daily at 04:30 AM)

Executed by sync-news-to-supabase.py, this job transfers articles from SQLite to the public Supabase database. It queries NotebookLM using notebooklm-cli ask with a context-rich prompt assessing the news' impact on Sovereign Pilot Agency and EstateAigents, then stores the analysis in the enrichments table, updating the status to completed.

3. Google NotebookLM Segmentation & Vault Structure

To maintain highly accurate, noise-free, and legally precise semantic answers, RAIA™ (Real estate Artificial Intelligence Agent) avoids dumps into a single large notebook. Instead, the knowledge base is strictly segmented into 5 distinct NotebookLM vaults. The system maps incoming RSS feed articles based on their relational Jurisdiction and Stream markers:

Jurisdiction Stream Target Notebook Name NotebookLM ID
UK Sales UK Real Estate Sales & Valuation c5de58ad-39c9-4673-b134-14bb4759ea63
UK Lettings UK Lettings & Renters' Rights Act 21ba6dec-e245-4c0b-8408-be0ed8df1855
Thailand Sales Thailand Luxury Real Estate & Sales e842f6bb-aaaa-412a-83b1-420ebfed0156
Thailand Lettings Thailand Residential Lettings Compliance 40ec9a59-e4d2-48e0-bb27-f47c3bd2aa88
Global AI-PropTech AI In PropTech, LLM Innovations & Automation 6ddddd9c-ee8c-4c51-a346-9b20346bf1a3

4. Session Monitoring, Re-Auth Gating & Anti-Silence Alerts

Google NotebookLM does not offer an official public API; thus, the notebooklm CLI interacts with Google's endpoints via headlessly injected Chrome session cookies (representing the estateaigents Google account). These session tokens expire periodically (typically every 14-30 days), which causes upload or query requests to fail.

Pre-Flight Authentication Guard

To prevent silent pipeline drops, Pipeline A runs a strict pre-flight check using notebooklm list --json. This command executes a real query to Google's server to verify cookie status. If the check fails:

  • Queue Preservation: Unread articles remain marked as unread in SQLite, preventing data loss.
  • Instant Dispatch Alert: The script bypasses normal silent logs and fires an active Telegram warning to the administrator.

Telegram Resync Notification Format

When a session drops, Hermes sends an actionable resync alert containing instructions and quick links. This alert is sent directly to the Telegram dashboard to ensure immediate attention:

🔴 *BlogWatcher→NotebookLM sync WARNING* Auth pre-flight FAILED for profile `estateaigents`. Error: list returned empty notebooks — session likely expired *Action required:* Open Chrome (EstateAigents profile), log into notebooklm.google.com, then click *🔄 Sync Cookies Now* in the EstateAigents NBML Sync extension. ⚠️ *RSS Feed scanning will still proceed*, but uploading new articles and AI impact calculations are paused.

5. Step-by-Step Session Recovery SOP

If you receive the "Auth pre-flight FAILED" warning on Telegram, follow these exact manual steps to re-authenticate the headless sync engine in under 60 seconds:

STEP 01

Open EstateAigents Profile

Open the dedicated Google Chrome browser instance logged into the estate.aigents@gmail.com profile on the secure administration desktop.

STEP 02

Access Google NotebookLM

Navigate to notebooklm.google.com and verify you are fully authenticated and can view the notebooks.

STEP 03

Click Cookie Sync Extension

Click the custom **🔄 Sync Cookies Now** icon in your browser's extension bar. This automatically uploads the fresh cookie block to the server, instantly restoring the pipeline.

6. Red Team Audit: Semantic Clustering & Token-Efficient Portfolio Impact Automation

Red Team Architectural Delta
⚠️ Red Team Vulnerability Warning (High Resource Exhaustion & Context Fragmentation): Our current news-ticker architecture operates on a chronological, per-article evaluation pattern. When multiple sources publish updates on the same underlying industry shift (e.g., the dominant listing aggregator £1.5bn CMA Investigation or Bank of England interest rate hikes), the system triggers independent, redundant LLM calls. This introduces severe resource exhaustion (token waste) and fragmented portfolio impact analyses across overlapping cards, forcing human operators to synthesize the results manually.

To transition from a raw chronological feed to an automated, topic-driven market intelligence network, the platform introduces a Semantic Clustering & Delta-Gated Analysis Pipeline. This design clusters raw incoming articles into active Topics, gates heavy strategic reasoning behind lightweight Delta Checks, and automates portfolio risk re-audits without requiring Human-in-the-Loop (HITL) manual triggers.

Figure 3.14b: Clustered & Delta-Gated Market Intelligence Pipeline

Repository Code

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

0 Q 452 60 502 60" stroke="var(--indigo)" stroke-width="1.5" marker-end="url(#arrow-indigo)" fill="none" /> 1. RAW INTAKE 44 RSS Feeds Chronological Articles 2. SEMANTIC ROUTER deepseek-v4-flash Group by Topic similarity REGISTRY tbl_market_topics Stores core topic headers 3. DELTA GATEWAY Strategic Delta check Substantive news change? ROUTE A: SILENT LINK No Strategic Change Skip LLM analysis & map ROUTE B: FULL RE-AUDIT Substantive Update Query deep reasoning LLM

6.1 Relational Schema Upgrades

To implement this architecture, we deprecate the direct association of standalone article enrichments. Instead, we introduce a central public.tbl_market_topics catalog, mapping raw chronological articles to distinct, unified thematic clusters.

-- SQL Migration: V195__market_intelligence_semantic_clustering.sql

-- 1. Create central topic catalog
CREATE TABLE public.tbl_market_topics (
    topic_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    topic_name VARCHAR(255) NOT NULL UNIQUE,
    topic_summary TEXT NOT NULL,
    jurisdiction VARCHAR(50) NOT NULL,
    stream VARCHAR(50) NOT NULL,
    severity_level VARCHAR(20) CHECK (severity_level IN ('informational', 'warning', 'critical')),
    portfolio_impact_analysis JSONB DEFAULT '{}'::jsonb, -- Pre-computed automated strategy
    created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL,
    last_updated_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
);

-- 2. Add relational foreign key and indexing to base articles
ALTER TABLE public.articles 
ADD COLUMN topic_id UUID REFERENCES public.tbl_market_topics(topic_id) ON DELETE SET NULL;

CREATE INDEX idx_articles_topic_id ON public.articles(topic_id);
    

6.2 Cascading, Token-Efficient Pipeline Stages

The automated nightly cron job executes in four decoupled, resource-gated stages to minimize API token expenditure:

  • 1
    Intake & Semantic Router (0.015¢ / article)

    When a new article is scraped, the pipeline runs a lightweight classification prompt against deepseek-v4-flash. It passes the article title and summary along with a list of active topic titles in the database. The model returns either the matching topic_id if it fits an active cluster, or declares a NEW_TOPIC flag.

  • 2
    Delta-Significance Gate (0.005¢ / article)

    If linked to an existing topic, the article text is passed to a cheap delta gateway checker. It compares the new facts against the cached topic_summary. If the article contains no fresh regulatory compliance triggers or strategic macroeconomic changes (e.g., another outlet summarizing the same interest rate decision), it is logged and the pipeline halts, skipping heavy analysis.

  • 3
    Autonomous Strategic Portfolio Re-Audit (0.15¢ / re-audit)

    If a material change is flagged, the pipeline automatically compiles the combined text of the top 3 most authoritative articles in the topic cluster, merges our standard B2B business profile (Sovereign Pilot Agency & EstateAigents compliance goals), and executes a deep reasoning re-audit using gemini-3.5-flash (or NotebookLM) to rebuild the portfolio_impact_analysis.

  • 4
    Zero-HITL Dashboard Push

    The newly computed strategic analysis is written directly back to tbl_market_topics.portfolio_impact_analysis. The frontend NewsTicker shifts from an un-grouped, button-click chronological view to a beautiful, topic-centric visual layout, instantly presenting the automated strategic impact summaries on page load.

6.3 Token Cost-Benefit & Efficiency Audit

By transitioning strategic auditing to the Topic level rather than the Article level, we eliminate redundant reasoning cycles over duplicate reports, yielding massive architectural and financial advantages:

Ingestion Pattern LLM Routing & Analysis Model Avg. Monthly Volume Avg. Token Burn / Run Monthly Cost Est. Savings Ratio
Chronological (Legacy Per-Article) Claude 3.5 Sonnet / Gemini-1.5-Pro 1,200 independent articles 25,000 input / 1,500 output ~$630.00 Baseline
Topic-Clustered & Delta-Gated DeepSeek-v4-Flash + Gemini-3.5-Flash 150 Unique Topics (1,200 articles) 3,000 (Router) + 12,000 (Gated) ~$14.50 97.7% Reduction

7. Operational References & Human Perspectives

The following high-fidelity Loom videos document the exact manual keystrokes, screen transitions, and decision trees utilized by human operators today. These serve as the ground-truth behavioral specifications for RAIA’s automated agents:

Repository Code

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

🔧 Section C: Developer Guide

Architecture Details

Integration architecture uses a hub-and-spoke model with a central integration engine that manages API connections, data transformation, and error handling. Each external integration is a self-contained adapter with its own configuration, rate limiting, and health monitoring.

  • Core Component: Integration engine and adapter registry
  • Data Flow: External API → Adapter → Normalisation → Core Processing → Response → Adapter → External API
  • Integration Points: REST APIs, webhooks, OAuth2, rate limiters, circuit breakers

Configuration Reference

Key configuration parameters for this system:

Parameter Type Default Description
integration_timeout integer 15000 API call timeout in milliseconds
rate_limit_rpm integer 60 Maximum requests per minute
circuit_breaker_threshold integer 5 Failure count before circuit opens
INTEGRATION ARCHITECTURE — ADAPTER → NORMALISE → CORE 1. ADAPTER LAYER External API Adapters Auth & Rate Limiting 🔌 Adapters 2. NORMALISATION Data Transformation Schema Mapping 🔄 Normalise 3. CORE ENGINE Business Logic Event Dispatch ⚙️ Core Engine Hub-and-spoke integration: adapters normalise external data, core engine processes and dispatches events Adapter pattern · Rate limiting · Circuit breaker · OAuth2 · Schema mapping Adapters / External Normalisation / Mapping Core / Business Logic Data flow →

Figure 2: Integration architecture — component interaction and data flow.

Troubleshooting

Issue Cause Resolution
API rate limit exceeded High request volume exceeding provider limits Implement request queuing or increase rate_limit_rpm
Adapter connection failure Provider API outage or credential expiry Check provider status page and rotate credentials
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.