An Agentic application to review building plans against the California Building Standards Code and San Paloma County reach codes.
Note: San Paloma is a fictitious county used for the purpose of this demonstration.
This is a monorepo containing:
- Frontend: React application built with Vite and Tailwind CSS.
- API Gateway: Go backend using the Gin framework to handle file uploads and orchestrate the AI analysis.
- Compliance Agent: Python service using FastAPI, Google Cloud Document AI, Vertex AI RAG Engine, Model Armor, and Gemini for building plan analysis.
- Contractor Agent: A2A-compliant Python service for finding licensed contractors using Gemini and Google Search.
- Assessor MCP Server: Python service providing county property and zoning data via the Model Context Protocol (MCP).
- Agent Engine: Vertex AI Agent Engine for deploying and scaling the AI components, including centralized session management and memory.
plan/: Contains the project specifications and DESIGN documentation..agents/: Contains the AI agent's skills and configurations.
- Node.js & npm (for the frontend)
- Go (for the API gateway)
- Python 3.12+ &
uv(for the AI Agent) - Google Cloud Project with Billing enabled
- Google Cloud Service Account with permissions for Vertex AI and Document AI
We provide a set of scripts in the infra directory to automate the one-time setup of GCP APIs, Service Accounts, and the Vertex AI RAG Engine.
cd infra
make setupThis will:
- Enable necessary APIs (Vertex AI, Document AI, Telemetry, etc.).
- Create a service account
build-permit-sawith the required IAM roles. - Create a Vertex AI RAG Corpus named
ca-building-codesinus-west1and upload documents frombuilding-codes/. - Deploys the Vertex AI Agent Engine using the logic in the
agent-engine/directory.
To dynamically onboard your deployed agents to the Agent Registry, run from the infra directory:
make onboardAfter running the automated setup, you need to manually create a Document AI Processor:
- Go to the Document AI console.
- Click Create Processor and select Document OCR.
- Note the Processor ID and add it to your
.envfile in theagentdirectory.
Install dependencies for all components:
make installStart all microservices in the background:
make allTo deploy all components to Google Cloud Run:
make deployStop all background microservices:
make stopFor detailed setup, configuration, and individual execution of each component, refer to their respective READMEs:
- Frontend: React application setup and styling.
- API Gateway: Go backend and user management.
- Compliance Agent: Python AI analysis and RAG setup.
- Contractor Agent: A2A communication and discovery.
- Assessor MCP Server: Model Context Protocol tools.
- Agent Engine: Vertex AI deployment utilities.
- Infrastructure: Automated GCP provisioning.
- Open
http://localhost:3000in your browser. - Upload a sample PDF building plan.
- The frontend will send the PDF to the Go API, which forwards it to the Python Agent.
- The Python Agent will extract text using Document AI, query the RAG engine for relevant codes, and use Gemini to generate a compliance report.
- The UI will display the results, including specific code violations and suggestions.
This application was built with the assistance of Stitch and Jules.
Please see CONTRIBUTING.md for details on how to contribute to this project.
This demo is NOT endorsed by Google or Google Cloud. The repo is intended for educational/hobbyists use only.
This project is licensed under the terms of the LICENSE file.
