Inspiration

Architecture is broken. Every year, thousands of building projects are delayed or rejected due to compliance errors, costing the industry billions and—more importantly—compromising safety. We realized that while AI chatbots can read regulations, they couldn’t see the spatial reality of a building.

With the launch of Gemini 3 and the dawn of the “Action Era,” we saw an opportunity to change this. We didn’t want to build another tool that just flags issues. We wanted an autonomous agent that acts like a senior architect: seeing the problem, reasoning through constraints, and fixing it.

What it does

SiteWarden AI is an autonomous compliance agent that ensures floor plans meet safety codes.

  • Perceives: Accepts floor plan images/PDFs and building code regulations (PDFs; optionally auto-discovered by country).
  • Reasons: Uses Gemini’s multimodal reasoning + long-context understanding to extract constraints and detect violations (e.g., corridor width, door clear width, exit clearance).
  • Acts: Generates and executes geometry modifications (via Python) to produce a compliant schematic fix.
  • Verifies: Runs a self-correction loop (detect → fix → re-check) until compliant or max iterations reached.
  • Certifies: Produces a PDF Compliance Certificate with before/after visual evidence, rule summaries, and citations.

How we built it

SiteWarden is built as an orchestrated system, not a prompt wrapper.

  • Frontend / Orchestrator: Streamlit UI manages inputs (blueprint upload, country selection, optional regulation upload), the agent loop, and the live preview.
  • Regulation Engine: Ingests regulation PDFs (or discovers them online), then normalizes them into structured, numeric constraints (e.g., min_corridor_width_m) with citations.
  • AI Core (Gemini 3 API): Multimodal analysis of the floor plan + long-context reasoning over regulation documents; produces structured outputs that drive deterministic actions.
  • Execution Tools: Python rendering/modification pipeline (schematic generation), plus ReportLab to generate the compliance certificate PDF.

Challenges we ran into

  • Precision vs. hallucination: Architecture needs measurable constraints. We enforced structured outputs (numeric constraints, explicit violations, citations) to keep the agent grounded.
  • Real-world blueprints are messy: Many plans are dense, scanned, or angled. We added robust preprocessing and fallbacks (PDF extraction, image conversion) and kept outputs verifiable.
  • UI & artifacts: Ensuring the live preview doesn’t “stack” old iterations and the PDF always uses the correct uploaded “Before” image required careful state and file handling.

Accomplishments that we're proud of

  • A working autonomous compliance loop that iterates until it reaches compliance.
  • Country-aware regulation handling with optional user uploads and source attribution.
  • A professional PDF Compliance Certificate with clean before/after evidence and a structured list of corrections.

What we learned

We learned the “Action Era” is about systems, not chat. The biggest wins came from orchestration: turning model outputs into actions, then verifying results with repeatable artifacts. We also learned that structured constraints + verification loops are the difference between a demo and a product.

What's next for SiteWarden AI

  • DXF/DWG/CAD integration to apply fixes directly in industry formats instead of only producing schematics.
  • Stronger spatial localization (highlighting exact problem regions and generating step-by-step remediation guidance).
  • Team workflows (review mode, change logs, export to engineering reports) to support real-world adoption.

Built With

  • 3.0
  • ai
  • api
  • architecture
  • cloud:
  • data
  • frameworks
  • gemini
  • generation)
  • geometry/schematic
  • github
  • google
  • grounding
  • image
  • languages:
  • matplotlib
  • mermaid.js
  • parsing)
  • pdf
  • pillow
  • processing)
  • pydantic
  • pypdf2
  • python
  • reportlab
  • search
  • streamlit
  • structured
  • studio
  • validation)
Share this project:

Updates