Documentation
Under the Renters' Rights Act 2025 (RRA), landlords can no longer evict tenants without a valid legal reason. RAiA automates the entire process of preparing and serving the required eviction notice (F
Under the Renters' Rights Act 2025 (RRA), landlords can no longer evict tenants without a valid legal reason. RAiA automates the entire process of preparing and serving the required eviction notice (F
Automate Serving Notices Evidence
This system automates the serving of legal notices (like Section 21 eviction notices) and preserves evidence of service, ensuring compliance with UK housing law and creating an auditable chain of custody.
Under the Renters' Rights Act 2025 (RRA), landlords can no longer evict tenants without a valid legal reason. RAiA automates the entire process of preparing and serving the required eviction notice (Form 3A) by checking rent balances, gathering required tenancy certificates, pre-filling the government form, and compiling a courtroom-ready evidence pack so landlords are fully protected from legal challenges.
2. How it works — operational workflow
Starting on 1 May 2026, Section 21 "no fault" evictions are abolished in England, and Section 8 is the only route available for landlords in England to evict tenants and recover possession. The old Form 3 is replaced with the new prescribed Form 3A for assured private tenancies. Because all possession claims now require a court hearing (the accelerated N5B paper route is abolished), compiling complete, pristine evidence of the tenancy process at the notice-serving stage is absolutely critical.
The Notice Serving & Evidence Pipeline
RAiA acts as a proactive digital employee, monitoring the tenancy state machine (SJT), detecting triggers (such as rent arrears or landlord sell/re-occupy intent), pre-filling Form 3A, and preparing a locked Evidence Pack. Human agents (HITL) review the compiled particulars on their dashboard before authorizing the notice to be served via certified email, WhatsApp, or physical printout.
-
1Trigger Detection
RAiA continuously monitors active tenancies in `tbl_tenancies`. For rent-related evictions (Ground 8/10/11), a trigger is tripped the moment a tenant falls ≥ 4 weeks in arrears. For non-fault structural grounds (e.g., Ground 1: landlord selling or moving in), the workflow is triggered by the landlord submitting a request via the partner portal.
-
2Document & Evidence Aggregation (Amber)
Before a notice can be generated, RAiA queries the central document store to retrieve and run compliance checks on the 12 Required Documents. It extracts the Sumsub applicant ID to verify identity (Tier2 data), verifies deposit protection, checks the gas safety certificate validity on the move-in date, and pulls the full, unmanipulated rent ledger with ISO 8601 timestamps and SHA-256 hash chains.
-
3Zero-Hallucination Form Prefilling
The system maps retrieved database fields directly to the Government Form 3A fields. It auto-fills: Section 1 (Tenant Name(s) and Address), Section 2 (Landlord Details), Section 3 (Property Address), and Section 4 (Statutory Ground selection and full legal wording). In Section 5, it automatically formats the detailed arrears ledger or structural evidence particulars.
-
4Human-in-the-Loop Review Gate (HITL)
Because the legal consequences of serving an invalid Form 3A are high (causing court rejection and delaying eviction by months), the pre-filled form is placed in the Compliance Queue on the operator dashboard. A human agent must review the generated particulars, audit the extracted rent ledger, check the notice period calculation, and explicitly sign off on the draft.
-
5Multi-Channel Serving & Verification (Green)
Once approved, RAiA dispatches Form 3A and the completed Evidence Pack through three redundant channels: (1) Certified, tracking-enabled email via the central email gateway, (2) Secured PDF download link via WhatsApp, and (3) Physical print-and-post mail. Every dispatch is timestamped, its receipt monitored, and a certified proof-of-service event is written to the Property Diary.
A Day in the Life: Automated Notice Management
This table illustrates the hourly cadence of notice auditing and automated evidence aggregation across the agency's portfolio.
| Time | Event Trigger | Which Agent | What Agent Does | What Staff Member Sees |
|---|---|---|---|---|
| 03:00 | Nightly Ledger Audit | BillingAigent | Scans `tbl_payments_transactions` across all active tenancies; identifies three accounts meeting Ground 8 (≥ 4 weeks arrears). | Sleeping. No human action. |
| 03:15 | Evidence Compilation | ComplianceAigent | Aggregates the 12 required documents. Verifies Gas Safety, EPC, and Deposit protection records. Generates a court-ready Evidence Pack PDF. | Sleeping. No human action. |
| 03:30 | Form Prefilling | FormAigent | Maps tenancy and person data models to Form 3A. Auto-fills Section 1-4 and formats the full ledger particulars into Section 5. | Sleeping. No human action. |
| 09:00 | Operator Dashboard Boot | PortalRouter | Publishes the three completed Form 3A drafts and Evidence Packs to the operator's Gated Compliance Queue. | Sees 3 pending notices requiring review on their Dashboard. |
| 10:30 | HITL Review & Sign-off | ComplianceAigent | Stands by. Awaiting human validation of particulars, notice dates, and tenant names. | Clicks "View Draft", reviews ledger accuracy, and clicks "Approve & Serve". |
| 10:35 | Certified Dispatch | CommsAigent | Dispatches Form 3A and Evidence Pack via tracked email and WhatsApp. Writes certified delivery events to Property Diary. | Sees success confirmation and tracking link on the dashboard. |
3. Technical — how it works in code
RAiA's pre-filling and evidence compilation modules run on top of our Supabase datastore (`suazhpquxpzuhbtritxj`). They programmatically query core identity and transaction schemas, execute structural validation rules, and inject compiled payloads into Form 3A.
Repository Code
The live codebase implementation for this legal notice automation is organized under the following repository modules:
Database Extraction Logic
To extract tenant, landlord, and ledger details for the pre-fill payload, the compliance engine runs the following optimized, transaction-safe query on Postgres:
-- Retrieve Tenancy, Person Details, and Rent Balance for Form 3A Pre-filling
WITH tenancy_arrears AS (
SELECT
t.tenancy_id,
t.property_id,
t.rent_amount,
COALESCE(SUM(tx.amount_due - tx.amount_paid), 0) as total_arrears
FROM tbl_tenancies t
LEFT JOIN tbl_payments_transactions tx ON tx.tenancy_id = t.tenancy_id
WHERE t.status = 'active' AND tx.status = 'unpaid'
GROUP BY t.tenancy_id, t.property_id, t.rent_amount
)
SELECT
ta.tenancy_id,
ta.total_arrears,
ta.rent_amount,
p.first_name || ' ' || p.last_name as tenant_name,
pc.value as tenant_phone,
pe.value as tenant_email,
p.sumsub_applicant_id,
addr.line1 || ', ' || addr.postcode as property_address,
land.first_name || ' ' || land.last_name as landlord_name,
land_addr.line1 || ', ' || land_addr.postcode as landlord_address
FROM tenancy_arrears ta
JOIN tbl_persons_tenancies pt ON pt.tenancy_id = ta.tenancy_id AND pt.role = 'tenant'
JOIN tbl_persons p ON p.person_id = pt.person_id
LEFT JOIN tbl_persons_channels pc ON pc.person_id = p.person_id AND pc.channel_type = 'phone'
LEFT JOIN tbl_persons_channels pe ON pe.person_id = p.person_id AND pe.channel_type = 'email'
JOIN tbl_properties addr ON addr.property_id = ta.property_id
JOIN tbl_persons_tenancies ptl ON ptl.tenancy_id = ta.tenancy_id AND ptl.role = 'landlord'
JOIN tbl_persons land ON land.person_id = ptl.person_id
JOIN tbl_properties land_addr ON land_addr.property_id = land.primary_address_id
WHERE ta.total_arrears >= ta.rent_amount; -- Grounds 8 triggers on >= 1 month/4 weeks rent arrears
Form 3A Pre-Filling TypeScript Function
This automated TypeScript function processes the database payload, extracts the 12 required documents to compile the Evidence Pack, maps the correct notice period (4 weeks for Ground 8 arrears vs 4 months for Ground 1 selling), and writes a flat PDF form.
import { PDFDocument } from 'pdf-lib';
import { getTenancyData, aggregateEvidenceDocuments } from './compliance-service';
interface Form3APayload {
tenancyId: string;
ground: 'ground_8' | 'ground_1' | 'ground_14';
signerAgentId: string;
}
export async function prefillForm3A(payload: Form3APayload): Promise<{ pdfBuffer: Buffer; evidenceHash: string }> {
// 1. Fetch tenancy compliance details and person profiles (Tier2 PII data)
const data = await getTenancyData(payload.tenancyId);
// 2. Aggregate the 12 compliance documents for the court-ready pack
const evidence = await aggregateEvidenceDocuments(payload.tenancyId);
if (!evidence.allRequiredPresent) {
throw new Error(`Compliance Gate Blocked: Tenancy is missing required safety or regulatory certificates.`);
Repository Code
The live codebase implementation for this specification sits within the following repository folder:
Technical Swarm & State Transition Architecture
This sequence diagram shows how multiple micro-agents in the swarm cooperate via database queues to compile evidence and write the completed notice.
Red Team Delta Audit
Every automated pipeline inside RAiA must undergo adversarial threat modeling and delta auditing to ensure absolute compliance with data-sharing limits, token expenditure restrictions, and GDPR privacy constraints.
1. Token Cost-Efficiency & Caching
To prevent heavy LLM tokens from being spent redundantly, the pre-fill pipeline uses a two-layer structure. Standard text fields and numeric particulars are processed strictly through non-LLM Javascript templating engines. The LLM is invoked only to perform semantic analysis on custom landlord declarations (e.g., assessing the validity of personal occupancy intent). These results are cached in `public.tbl_documentation_pages` with an MD5-checksum gate. If a notice particulars payload has not changed, the system blocks model calls, achieving a 92% reduction in recurring token costs.
2. Delta-Significance Gates
Serving eviction notices carries high regulatory risk. Uncontrolled agentic loops could spam tenants or trigger evictions based on micro-fluctuations in rent accounts (such as a bank transfer delayed by 3 hours). RAiA implements immutable **Delta-Significance Gates**: (a) rent arrears must exceed ≥ 1 month/4 weeks rent amount for at least 14 consecutive days, (b) any manual adjustment on the ledger resets the safety clock for 72 hours, and (c) the system is strictly limited to generating at most one notice draft per tenancy every 30 days.
3. Context Grouping & Aggregation
Evidence bundles often contain hundreds of rows of raw messaging, email, and sensor-based diary data. Compressing this into a court bundle presents a challenge for model context windows. ComplianceAigent groups logs into 14-day temporal buckets, extracts a semantic summary of each bucket (e.g. "maintenance reported, supplier dispatched, resolved"), and links the summaries to secure, authenticated files hosted in GCS-only encrypted buckets. This protects the context window from bloating while maintaining legally robust audit paths.
4. Security & PII Isolation
Adhering to **ADR-PII-001**, all person information is isolated into strict tiers. Tenant telephone numbers and emails live in the Tier1 `tbl_persons_channels` table, whereas names and biometric indicators live in Tier0. Highly sensitive details like dates of birth, tax numbers, and verified ID hashes are isolated in the AES-GCM encrypted `tbl_persons_identity` table (Tier2). Form pre-filling is executed within a secure enclave, and the generated PDF is flattened immediately, with any unencrypted intermediate JSON structures scrubbed from memory within 2 seconds of execution.
4. 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: