Inspiration
Construction material quotations are surprisingly difficult to automate.
Customers rarely provide perfect product names. They send handwritten notes, photos, PDFs, spreadsheets, screenshots, abbreviations, incomplete dimensions, and informal construction terminology.
The challenge is not simply extracting text. The real challenge is understanding what the customer means and matching that request to the correct product among thousands of ERP SKUs.
QuoteAgent was created from a real quotation workflow at a Brazilian construction materials retailer with more than 8,000 active products and approximately 1,875 quote or material-list requests per month across the sales operation.
Our goal was to reduce repetitive product-search work without removing the salesperson from the final business decision.
What it does
QuoteAgent transforms unstructured customer material lists into structured product recommendations.
It can process handwritten lists and photos, PDFs, Excel spreadsheets, Word documents, and plain text.
Gemini 3.5 Flash first understands and structures the customer's input.
QuoteAgent then performs deterministic catalog retrieval using SQLite FTS5/BM25. When the deterministic match is strong enough, the system avoids an unnecessary AI call.
When the result is ambiguous, the item is escalated to an autonomous agent built with Google Agent Development Kit and deployed on Google Cloud Run.
The agent can investigate catalog candidates, previously confirmed mappings, stock, price, and other evidence before recommending the best SKU.
The final decision always returns to the salesperson for explicit human confirmation.
Real example
A customer writes:
cotovelo azul 3/4 s de meia
The deterministic search initially selects:
01202 — JOELHO SOLDAVEL RED 25X20
The match looks lexically plausible, but it is incorrect.
QuoteAgent detects the ambiguity and sends the item to the ADK agent.
After investigating the available evidence, the agent selects:
01426 — JOELHO AZUL B/LATAO 25X1/2
The interface marks the item as selected by AI, explains the recommendation, and waits for the salesperson to confirm it.
How we built it
QuoteAgent uses a hybrid architecture.
The application is built with Python, FastAPI, Uvicorn, HTML, CSS, JavaScript, SQLite, FTS5 and BM25.
For AI and Google Cloud we use:
- Gemini 3.5 Flash
- Google Gen AI SDK
- Google Agent Development Kit
- Google Cloud Run
- Cloud Build
- Artifact Registry
- Secret Manager
The workflow is:
Customer input → Gemini document understanding → deterministic catalog retrieval → confidence gateway → ADK agent when necessary → human confirmation
The ADK agent runs in an isolated Cloud Run service separate from the ERP-connected transactional application.
Agentic behavior
The Google ADK agent has controlled tools for:
- memory lookup
- catalog candidate search
- unmatched-term analysis
- stock lookup
- price lookup
- decision summary
The agent chooses which evidence it needs before making its recommendation.
The agent has no ERP write credentials and cannot create quotations, modify business data, or confirm a product on behalf of a salesperson.
Human-in-the-loop safety
QuoteAgent deliberately keeps humans in control.
The AI can investigate and recommend.
The salesperson must review and explicitly confirm the result.
Only after human confirmation can the normal ERP quotation workflow continue.
Confirmed human decisions can also become trusted memory for future matching, avoiding repeated AI calls for the same known request.
Challenges we ran into
One of the biggest challenges was deciding when not to call AI.
A lexical search result can appear highly relevant while still representing the wrong construction product. We therefore designed an ambiguity threshold that considers both match quality and the margin between top candidates.
Another challenge was safely isolating the autonomous agent from the transactional ERP environment.
We deployed the ADK runtime separately on Cloud Run with a sanitized product catalog snapshot and no ERP write credentials.
We also had to handle real-world handwritten input, construction terminology, dimensions, abbreviations, API quotas, Cloud Run deployment, secrets, and fallback behavior.
Accomplishments that we're proud of
QuoteAgent is based on a real business workflow and a real product catalog containing 8,884 active products.
We successfully demonstrated an end-to-end case where:
- Gemini interpreted a handwritten customer request
- deterministic retrieval initially selected the wrong SKU
- the system detected ambiguity
- the Google ADK agent investigated the problem
- the agent corrected the recommendation
- the salesperson explicitly confirmed the result
The project currently has 193 automated tests.
In early operational tests, quotation preparation time was reduced by approximately 67–73% depending on list size.
For example, a 50-item quotation that could take around 22 minutes manually was completed in approximately 6 minutes with QuoteAgent assistance.
What we learned
Agentic AI is more useful when it is given a clearly defined role rather than control over the entire application.
Deterministic retrieval is excellent at narrowing thousands of products into plausible candidates.
The agent is excellent at investigating ambiguous cases.
The human is best positioned to approve the final business decision.
Combining all three produced a system that is more explainable, safer, and more cost-efficient than relying entirely on an LLM.
What's next
Future improvements include:
- expanding confirmed product memory
- improving ambiguity detection
- richer agent telemetry and evaluation
- additional construction-domain reasoning tools
- broader ERP integrations
- seller feedback analytics
- measuring precision and time savings across a larger production sample
Our principle is simple:
Use deterministic software where it works best, use AI where reasoning adds value, and keep humans in control.
Built With
- artifact-registry
- bm25
- cloud-build
- fastapi
- fts5
- gemini-3.5-flash
- google-adk
- google-cloud
- google-cloud-run
- javascript
- python
- secret-manager
- sqlite
Log in or sign up for Devpost to join the conversation.