Context
In small-to-mid construction and fabrication businesses, the bottleneck is rarely capacity — it is the estimator. A single experienced person can be the only one who can look at a floor plan or excavation drawing and tell you what it costs to build. They are also usually the slowest part of the sales cycle, and the most expensive person to lose.
Problem
Quantity takeoff sits on the estimator's desk. Every drawing has to be measured manually with a digital wheel or scale. Every BOM rebuilt by hand. Every quote rewritten when revisions land. Customers wait days for prices that, twenty quotes later, the estimator could have generated in their head. Worse — when they leave, the company's pricing knowledge leaves with them. Generic AI tools that try to brute-force this end up either hallucinating walls or returning answers no estimator will trust.
Approach
KavAI reads what the estimator reads — floor plans, excavation drawings, site plans, revision markups — as vector or scanned PDF, and extracts the same structured information they would: rooms, walls, areas, hatches, dimensions. The pipeline is explicit and inspectable: ingest, pre-clean (OCR + dim-strip), detect lines, refine (sub-pixel RANSAC), merge + classify, group into walls / rooms / hatch, semantic labels. The agent only intervenes for the parts it cannot resolve itself — and it asks, instead of guessing.
System
/ the things actually shipped
- 01
Vector + scanned PDF ingest with route sniffing — the pipeline picks the right path for the input automatically.
- 02
OCR + dimension-strip pre-clean that pulls scale, callouts, and text off the geometry layer before detection begins.
- 03
Line detection with sub-pixel RANSAC refinement — walls survive scan noise, paper folds, and faint print.
- 04
Merge + classify pass that turns line segments into walls, openings, and hatches with provenance back to the source pixel.
- 05
Semantic grouping into rooms, with per-room area, perimeter, and a "what the agent is unsure of" panel.
- 06
An agent dock that narrates each stage and asks the estimator only when confidence falls below the threshold — full audit trail, every claim traces back to the diagram.
In Practice
Selected views from the system, traced for this case study.




How the pieces fit.
Architecture
- Next.js
- TypeScript
- react-konva (vector canvas)
- Annotation layer
- Python
- CV pipeline
- OCR + dim-strip
- RANSAC line refinement
- Confidence scoring
- Anthropic-backed agent dock
- Stage-aware prompts
- Human-in-the-loop on low confidence
- PostgreSQL
- Object storage for drawings
- Quote-to-pixel trace table
- Versioned price book
- AWS
- Kubernetes
- GPU nodes for inference
- Docker
Outcome
An eight-hour takeoff cycle compresses to under fifteen minutes. The estimator goes from bottleneck to reviewer — they spend their time on the 10% of drawings where their judgement actually matters, not the 90% where they're just measuring lines. The pricing knowledge is no longer locked in one head, and the audit trail means every line in every quote can be defended back to the source pixel.
Learnings
/ what would be different next time
- /01
A black-box estimator is a non-starter. The pipeline had to be inspectable at every stage, or no estimator would adopt it.
- /02
Sub-pixel RANSAC was the difference between "works on clean CAD" and "works on a folded site plan a contractor sent over WhatsApp".
- /03
The agent should ask, not guess. A 94% confident wall that gets confirmed is more valuable than a 99% confident wall that gets quietly inserted.
- /04
Pricing knowledge is the second product. The takeoff is the first.