terracomply.ai

Inspiration

It all started close to home. Our neighbor Amrut moved out after his lease ended, expecting his security deposit back. Instead:

  • His landlord delayed it by 60 days, even though the law requires repayment within 30 days.
  • Worse, Amrut was suddenly asked to pay extra charges without justification.

Only after consulting our college’s legal team did he realize he had a strong case.
But as students, it was sad and stressful for us to see a friend go through so much hassle—weeks of stress over something that could have been prevented.

We realized:

  • This isn’t just about Amrut—it could happen to any renter, homeowner or buyer.
  • Real estate compliance and risk checks are often confusing, fragmented and nearly impossible to verify in real time.

That pain inspired us to create TerraComply.ai — a multi-agent framework that makes real estate compliance transparent, automated, and accessible for everyone.


What it does

TerraComply helps users check compliance and risk in real estate by combining:

  • CrewAI multi-agent framework → intelligently routes queries to the relevant compliance agent.
  • Retrieval-Augmented Generation (RAG) → provides transparent, citation-backed answers.
  • Fine-tuned LLM using LORA Adapter → used in categories like AML/Fraud for anomaly detection.
  • Multimodal analysis (text + images via Gemini API) → users can upload documents or images and get actionable insights.

We focused on four key compliance categories:

  1. Tenant/Landlord Regulations
    • Protect renters’ rights, deposits, and ensure safe housing.
    • Handle move-out notices, rent increases, and eviction rules.
  2. Listing/MLS Compliance
    • Ensure property listings are accurate, legal, and non-discriminatory.
    • Prevent advertising violations and manage penalties.
  3. Transaction Review / Disclosures / Contract Addenda (Virginia Focus)
    • Ensure sellers disclose property issues.
    • Allow buyers to back out if undisclosed issues arise.
  4. AML / Fraud (FinCEN rule)
    • Detect suspicious cash real estate purchases.
    • Report and track transactions to prevent money laundering.

How we built it

  • Started with a RAG pipeline, but evolved to CrewAI as our orchestrator agent.
  • CrewAI routes user queries to the correct specialized agent trained on a domain-specific dataset.
  • Each agent uses RAG for retrieval, the AML/Fraud detection agent uses LLM that we fine-tuned for anomaly detection like money laundering and fraud detection.
  • Collected, cleaned, and categorized data from multiple sources to ensure coverage across all compliance areas.
  • Integrated multimodal support via Gemini API for analyzing text and images of lease agreements, HOA notices, and disclosures.
  • Built the entire pipeline from scratch, including data ingestion, agent orchestration, fine-tuning, and the interface for real-time queries.

Multi-Agent Architecture

  • CrewAI Framework with Google Gemini 2.5 Flash
  • Router Agent → classifies queries into correct domain
  • Query Refiner → optimizes queries with domain-specific context
  • 4 Specialized Agents → expert knowledge for each compliance area

Advanced RAG System

  • Document Processing → Recursive text splitting + FAISS vector DB
  • Embeddings → sentence-transformers/all-MiniLM-L6-v2
  • Retrieval → Qwen2.5:3B for contextual answers

Custom Fine-Tuned Fraud Model

  • Synthetic Dataset → Generated Q&A pairs from FinCEN PDFs using Qwen2.5:14B
  • LoRA Fine-Tuning → Custom model trained specifically on AML regulations
  • Ollama Deployment → Local inference for secure fraud detection

Full-Stack Integration

  • Backend → FastAPI with CORS handling
  • Frontend → Next.js + TypeScript + shadcn/ui

Challenges we ran into

  • GPU Resource Constraints → Qwen2.5:14B too large for local training, required external servers
  • Model Stability Issues → Pivoted from local Qwen to Gemini API for synthetic dataset generation
  • Multi-Domain Complexity → Ensuring accurate routing and citation across diverse regulatory frameworks
  • Integration Orchestration → Coordinating multiple models (Ollama + APIs) in unified system

Accomplishments that we're proud of

  • Built a fully functional CrewAI multi-agent system within hackathon timelines.
  • Integrated RAG + fine-tuned LLM + multimodal input in a single framework.
  • Developed a system that can save renters and homeowners time, stress, and money.
  • Experienced strong team collaboration, leveraging each member’s expertise in architecture, data scraping, R&D, and AI.

What we learned

  • Mastered an advanced tech stack, including CrewAI, RAG pipelines, fine-tuning, and multimodal APIs.
  • Learned the power of shared expertise, with each team member contributing to a different technical domain.
  • Realized how AI can solve real-world problems like tenant disputes, compliance verification, and fraud detection.
  • Collaboration under pressure strengthened our ability to plan, implement, and iterate quickly as we built our new team right here.

Impact

  • For renters: Know your rights instantly before signing leases or moving out.
  • For homeowners: Ensure your modifications, transactions, and listings comply with regulations.
  • For property managers and HOAs: Automate compliance checks and reduce manual overhead.
  • Real-time, trustworthy, citation-backed insights that empower users to act confidently.

What's next for TerraComply.ai

  • Expand to all 50 states to cover nationwide compliance laws.
  • Add real-time regulatory updates for dynamic compliance.
  • Build a user-friendly interface for query, story, and analysis modes.
  • Integrate with legal aid and consumer protection platforms for escalation support.
  • Explore partnerships with MLS providers, property managers, and fintechs for broader adoption.

Closing Note

“If Amrut had TerraComply, he could have avoided weeks of stress and financial uncertainty. With our system, anyone can know their housing rights—powered by AI, backed by law.”


Built With

  • crewai
  • fastapi
  • geminiapi
  • langchain
  • lora
  • nextjs
  • transformers
Share this project:

Updates