Building a Reliable AI Quote Generation Assistant with LangGraph
tradestack · Finance · 2024 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.4 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Trades quote generation assistant
Tradestack wanted a WhatsApp-based assistant that could reduce construction and real-estate quote creation from hours to minutes while handling diverse multimodal inputs, routing/planning errors, user clarification, and production deployment for an early MVP.
Constraints:
- Quotes require floor plans, project images, labor estimates, material prices, and client-facing documents
- Users send voice, text, images, and documents through WhatsApp
- Different users have different starting and ending points
- LLM planning and routing nodes can be inconsistent or inaccurate
- The startup needed to launch quickly without owning all infrastructure work
Architecture
Tradestack built a LangGraph Cloud WhatsApp assistant for painting and decoration quotes. WhatsApp messages enter a graph-based workflow with shared state, nodes, edges, subgraphs, and a supervisor node that plans tasks. The system handles voice, text, images, and documents, asks users or experts for clarification, uses middleware for double-texting and message queues, streams only selected node messages, aggregates intermediate outputs into a consistent voice, traces and evaluates runs with LangSmith, and escalates edge cases to humans through Slack or LangGraph Studio.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR whatsapp-user[WhatsApp User] --> whatsapp-assistant[WhatsApp Assistant] whatsapp-assistant[WhatsApp Assistant] --> message-queue-middleware[Message Queue Middleware] message-queue-middleware[Message Queue Middleware] --> langgraph-workflow[LangGraph Workflow] langgraph-workflow[LangGraph Workflow] --> supervisor-node[Supervisor Node] supervisor-node[Supervisor Node] --> subgraphs[Subgraphs] subgraphs[Subgraphs] --> aggregator-node[Aggregator Node] langgraph-workflow[LangGraph Workflow] --> langgraph-cloud[LangGraph Cloud] langgraph-workflow[LangGraph Workflow] --> langsmith[LangSmith] whatsapp-assistant[WhatsApp Assistant] --> human-operator[Human Operator] human-operator[Human Operator] --> langgraph-workflow[LangGraph Workflow]
Components
| Component | Role | Interacts with |
|---|---|---|
WhatsApp User |
Trades business user sending job details, images, documents, or clarifications. | WhatsApp Assistant |
WhatsApp Assistant |
User-facing quote-generation assistant for painting and decorating projects. | WhatsApp User, LangGraph Workflow, Message Queue Middleware |
Message Queue Middleware |
Custom middleware for double-texting and orderly message handling. | WhatsApp Assistant, LangGraph Workflow |
LangGraph Workflow |
Graph architecture with nodes, edges, shared state, subgraphs, and configurable pathways. | Message Queue Middleware, Supervisor Node, Subgraphs, Aggregator Node, LangGraph Cloud, LangSmith |
Supervisor Node |
Expands user queries and creates plans based on task goals. | LangGraph Workflow, Subgraphs |
Subgraphs |
Use-case-specific reasoning pathways chosen by configuration variables. | LangGraph Workflow, Aggregator Node |
Aggregator Node |
Combines intermediate outputs into a consistent tone of voice for user-facing communication. | LangGraph Workflow, Subgraphs |
LangGraph Cloud |
Deployment and operations platform for the agent workflow. | LangGraph Workflow |
LangSmith |
Tracing and node/end-to-end evaluation system for performance iteration. | LangGraph Workflow |
Human Operator |
Tradestack staff member who handles edge cases through Slack or LangGraph Studio. | WhatsApp Assistant, LangGraph Workflow |
Data flow
A trades user sends project material through WhatsApp. The assistant routes the multimodal input into a LangGraph workflow, where graph nodes update shared state, a supervisor expands the query and plans work, subgraphs handle use-case-specific pathways, selected node messages stream back to the user, an aggregator combines intermediate outputs, LangSmith traces and evaluates runs, and humans intervene through Slack or LangGraph Studio when edge cases require clarification.
3 supporting quotes
Why this architecture
Tradestack chose LangGraph because quote generation needed graph control over reasoning, memory, routing, and multimodal state rather than a single prompt. LangGraph Cloud reduced deployment burden for a lean team, LangSmith made node-level performance iteration possible, and human intervention preserved UX for edge cases the assistant could not handle reliably.
3 supporting quotes
Models used: gpt-4-0125-preview · gpt-4o
Scale
- Tradestack launched an MVP in 6 weeks.“* Built and launched an MVP in 6 weeks to a community of 28,000+ users * Secured their first paying customers * Improved end-to-end performance from 36% to 85% via rapid iteration and new multimodal inputs and automation tools ## The Problem: Creating Quotation for Trades Businesses”article, stated
- The launch targeted a community of more than 28,000 users.“* Built and launched an MVP in 6 weeks to a community of 28,000+ users * Secured their first paying customers * Improved end-to-end performance from 36% to 85% via rapid iteration and new multimodal inputs and automation tools ## The Problem: Creating Quotation for Trades Businesses”article, stated
- Quote creation normally took 3.5 to 10 hours.“This process typically consumes 3.5 to 10 hours for a single project quote. Tradestack's vision was to reduce this time to under 15 minutes. ## MVP: WhatsApp assistant to automate quotes for painting and decoration projects”article, stated
- Tradestack wanted quote generation under 15 minutes.“This process typically consumes 3.5 to 10 hours for a single project quote. Tradestack's vision was to reduce this time to under 15 minutes. ## MVP: WhatsApp assistant to automate quotes for painting and decoration projects”article, stated
- End-to-end performance improved from 36% to 85%.“Improved end-to-end performance from 36% to 85% via rapid iteration and new multimodal inputs and automation tools”article, stated
- Stakeholder use of LangGraph Studio saved two weeks of internal testing time.“Their team could talk to the assistant and record the feedback in parallel with development, saving two weeks of internal testing time.”article, stated
Alternatives considered (roads not taken)
Build a one-shot quote generator
Rejected because: The product needed flexible cognitive architectures, multimodal state, clarification, and reliable routing rather than simple content generation.
Expose all intermediate agent steps to users
Rejected because: Too much intermediate detail would overwhelm WhatsApp users, so Tradestack streamed only key messages from selected nodes.
Rely only on autonomous resolution for edge cases
Rejected because: Material availability and other edge cases still required manual intervention to preserve the user experience.
Patterns
multi-agent-orchestration (agent-architecture)
Tradestack started from a hierarchical multi-agent system with a supervisor node and subgraphs for task-specific pathways.
tool-use-orchestration (workflow)
LangGraph modeled the assistant as a graph of nodes and edges that shared state across multimodal quote-generation steps.
human-in-the-loop-gate (operations)
The system escalated edge cases to staff through Slack or LangGraph Studio.
eval-driven-development (evaluation)
LangSmith node-level and end-to-end evaluations guided model choice and performance improvement.
observability-tracing (observability)
LangSmith tracing made every run reviewable during iteration.
Tradeoffs
Use WhatsApp as the primary interface
Chose WhatsApp over A new standalone app or more technical UI.
Rationale: WhatsApp was already widely adopted among non-technical users, but it required robust handling of varied message types.
Use LangGraph Cloud for deployment
Chose Managed LangGraph Cloud deployment over Owning deployment and monitoring infrastructure directly.
Rationale: A lean team could focus on refining the assistant instead of deployment, monitoring, and revision infrastructure.
Control user-facing streaming
Chose Show key messages from selected nodes over Streaming all intermediate agent steps.
Rationale: Selective streaming preserved clarity for WhatsApp users while the graph continued doing multi-step work.
Gotchas (what bit them)
Diverse WhatsApp inputs created many failure points.
Root cause: Users could start and end in different places and send ambiguous voice, text, image, or document inputs.
Resolution: Tradestack used graph routing, subgraphs, shared state, clarification, and human escalation.
3 supporting quotes
LLM planning and routing could be inconsistent.
Root cause: Planning and routing were done by LLM nodes in a multi-step workflow.
Resolution: Tradestack used LangGraph Studio feedback, LangSmith evaluations, and node-level model optimization.
Streaming every intermediate step would degrade WhatsApp UX.
Root cause: Agent workflows can expose noisy intermediate reasoning or tool messages.
Resolution: Tradestack streamed only key messages and used an aggregator node for a consistent tone.
Evaluation
Tradestack used LangSmith tracing, node-level tests, end-to-end evaluations, and stakeholder feedback through LangGraph Studio to iterate the workflow and compare planning-node models.
Metrics: end-to-end performance from 36% to 85% · node-level evaluations · end-to-end evaluations · two weeks of internal testing time saved
3 supporting quotes
Outcomes
- Tradestack launched an MVP in 6 weeks
- The MVP reached a community of 28,000+ users
- The startup secured its first paying customers
- End-to-end performance improved from 36% to 85%
The vendor case reports a 6-week MVP launch, 28,000+ community users, first paying customers, and a target of reducing 3.5-10 hour quote creation to under 15 minutes.