AI-powered agent that reviews construction submittals (shop drawings, product data, material samples) and produces structured approval/rejection responses following AIA/EJCDC standards.
- Multimodal Analysis: Processes both PDF documents and embedded images/drawings using Claude Vision
- RAG-powered Context: Uses LlamaIndex with configurable parsing strategies for accurate retrieval
- Dual LLM Support: Primary Claude (claude-sonnet-4-20250514) with GPT-4 fallback
- Structured Output: Returns decisions with confidence scores, citations, and detailed comments
- AIA/EJCDC Compliant: Decisions follow industry-standard categories (Approved, Approved as Noted, Revise and Resubmit, Rejected)
- Modern Frontend: Tailwind CSS + Alpine.js interface with drag-and-drop upload
┌─────────────────────────────────────────────────────────────────┐
│ Frontend (Alpine.js) │
└────────────────────────────────┬────────────────────────────────┘
│
┌────────────────────────────────▼────────────────────────────────┐
│ FastAPI Backend │
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ /health │ │ /review │ │ /documents │ │
│ └──────────┘ └────┬─────┘ └──────────────┘ │
└─────────────────────┼───────────────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────────────┐
│ Review Agent │
│ ┌────────────────┐ ┌─────────────────┐ ┌───────────────────┐ │
│ │ Vision Analyzer│ │ Context Retriever│ │ LLM Client │ │
│ │ (Claude Vision)│ │ (LlamaIndex RAG) │ │ (Claude + GPT-4) │ │
│ └────────────────┘ └─────────────────┘ └───────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
┌─────────────────────▼───────────────────────────────────────────┐
│ Knowledge Base (ChromaDB) │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Configurable Parsing Strategies: │ │
│ │ • SentenceSplitter (fast, basic) │ │
│ │ • SemanticSplitterNodeParser (similarity-based) │ │
│ │ • HierarchicalNodeParser (parent/child relationships) │ │
│ │ • SentenceWindowNodeParser (surrounding context) │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
- Python 3.13+
- Anthropic API key
- OpenAI API key (for embeddings and fallback)
# Clone the repository
git clone https://github.com/Rohianon/construction-submittal-agent.git
cd construction-submittal-agent
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate
uv sync
# Configure environment
cp .env.example .env
# Edit .env with your API keysPlace your project specification PDFs in the knowledge base directory:
mkdir -p data/knowledge_base
# Copy your PDF specifications to data/knowledge_base/python main.py
# or
uvicorn main:app --reloadOpen http://localhost:8000 in your browser.
Review a construction submittal.
Request (multipart/form-data):
file: PDF file to review (required)project_name: Project name (optional)spec_section: Specification section reference (optional)parsing_strategy: One ofsentence,semantic,hierarchical,window(optional, default:sentence)
Response:
{
"decision": "APPROVED_AS_NOTED",
"confidence_score": 0.85,
"reasoning": "The submitted material meets specifications with minor clarifications needed.",
"detailed_comments": [
{
"category": "technical",
"severity": "medium",
"comment": "Finish color specified as 'warm gray' - confirm this matches spec section 09 90 00 color schedule.",
"location": "Page 2, Material Schedule"
}
],
"compliance_checks": {
"material_compliance": {
"status": "pass",
"details": "Material meets ASTM A36 requirements"
}
},
"required_actions": [
"Confirm color selection with architect"
],
"citations": [
{
"source": "Project Specifications",
"section": "05 12 00",
"page": 3,
"quote": "All structural steel shall conform to ASTM A36"
}
]
}Health check endpoint.
List documents in the knowledge base.
Re-ingest knowledge base with a different parsing strategy.
The system supports multiple LlamaIndex parsing strategies for experimentation:
| Strategy | Description | Best For |
|---|---|---|
sentence |
Basic sentence-level splitting | Fast processing, general use |
semantic |
Similarity-based chunking | Documents with varying section lengths |
hierarchical |
Parent/child node relationships | Complex structured documents |
window |
Preserves surrounding context | Detailed cross-reference needs |
Switch strategies via the /api/documents/ingest endpoint or the parsing_strategy parameter on reviews.
docker build -t submittal-agent .
docker run -p 8000:8000 --env-file .env submittal-agent- Connect your GitHub repository
- Set environment variables:
ANTHROPIC_API_KEYOPENAI_API_KEYENVIRONMENT=production
- Deploy
construction-submittal-agent/
├── main.py # FastAPI application entry point
├── api/
│ └── routes/
│ ├── health.py # Health check endpoint
│ ├── review.py # Main review endpoint
│ └── documents.py # Document management
├── submittal_agent/
│ ├── agent/
│ │ ├── llm_client.py # Unified LLM client (Claude + GPT-4)
│ │ ├── prompts.py # System prompts
│ │ ├── review_agent.py # Main orchestrator
│ │ └── vision_analyzer.py # Image/drawing analysis
│ ├── indexing/
│ │ └── vector_store.py # ChromaDB + LlamaIndex
│ ├── ingestion/
│ │ ├── pdf_parser.py # PDF text extraction
│ │ └── image_extractor.py # Drawing extraction
│ ├── retrieval/
│ │ └── retriever.py # RAG retrieval
│ └── schemas/
│ └── review_response.py # Pydantic models
├── static/
│ └── index.html # Frontend (Tailwind + Alpine.js)
├── data/
│ └── knowledge_base/ # Project specifications
├── Dockerfile
├── pyproject.toml
└── requirements.txt
Following AIA/EJCDC standards:
- APPROVED: Submittal conforms to contract documents
- APPROVED_AS_NOTED: Approved with minor modifications noted
- REVISE_AND_RESUBMIT: Requires corrections before approval
- REJECTED: Does not meet requirements, resubmission required
MIT