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:

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]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

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
“design these architectures using graphs, nodes, and edges while managing a shared state that each node could write to.”article, stated
“This setup maintained input flexibility (voice, text, images, documents) while producing accurate, personalized client quotes.”article, stated
“LangSmith tracing was integrated directly into their workflow, making it easy to review and evaluate each run.”article, stated

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
“LangGraph's intuitive framework gave them the control needed to design reasoning and memory flows tailored to their users' needs.”article, stated
“As a lean team, they needed a platform that could handle deployment, monitoring, and submitting revisions with ease.”article, stated
“Human-in-the-loop interventions also played a vital role in Tradestack’s UX. When edge cases arose—such as users requesting materials unavailable in the UK—the system would trigger manual intervention.”article, stated

Models used: gpt-4-0125-preview · gpt-4o

Scale

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.

“Tradestack's top priority was to test their value proposition by experimenting with different levels of guidance across cognitive architectures.”article, stated
“This setup maintained input flexibility (voice, text, images, documents) while producing accurate, personalized client quotes.”article, stated

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.

“They didn’t want to overwhelm users with unnecessary intermediate steps, so they used LangGraph’s flexible streaming options to only display key messages from selected nodes.”article, stated

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.

“When edge cases arose—such as users requesting materials unavailable in the UK—the system would trigger manual intervention.”article, stated

Patterns

multi-agent-orchestration (agent-architecture)

Tradestack started from a hierarchical multi-agent system with a supervisor node and subgraphs for task-specific pathways.

“adopting a hierarchical multi-agent system with a supervisor node that expanded on user queries and created plans based on the task's goals.”article, stated

tool-use-orchestration (workflow)

LangGraph modeled the assistant as a graph of nodes and edges that shared state across multimodal quote-generation steps.

“design these architectures using graphs, nodes, and edges while managing a shared state that each node could write to.”article, stated

human-in-the-loop-gate (operations)

The system escalated edge cases to staff through Slack or LangGraph Studio.

“Tradestack’s team could then step in via Slack or directly in LangGraph Studio to adjust the conversation.”article, stated

eval-driven-development (evaluation)

LangSmith node-level and end-to-end evaluations guided model choice and performance improvement.

“By setting up node-level and end-to-end evaluations in LangSmith, Tradestack could experiment with different models for the planning node”article, stated

observability-tracing (observability)

LangSmith tracing made every run reviewable during iteration.

“LangSmith tracing was integrated directly into their workflow, making it easy to review and evaluate each run.”article, stated

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.

“Given the widespread adoption of WhatsApp, especially among non-tech-savvy users, Tradestack chose it as their primary interface.”article, stated
“they needed to reliably process a wide range of inputs sent via WhatsApp.”article, stated

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.

“As a lean team, they needed a platform that could handle deployment, monitoring, and submitting revisions with ease.”article, stated
“allowing them to focus on refining their AI agent rather than infrastructure concerns.”article, stated

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.

“used LangGraph’s flexible streaming options to only display key messages from selected nodes.”article, stated

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
“There were multiple points of failure in designing such a system, including:”article, stated
“Variety or ambiguity in the user input”article, stated
“when needed, asking users or experts for clarification.”article, stated

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.

“Inconsistent or inaccurate parts of planning or routing done by an LLM node”article, stated
“they found that gpt-4-0125-preview performed better than gpt-4o for the planning node”article, stated

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.

“They didn’t want to overwhelm users with unnecessary intermediate steps”article, stated
“An aggregator node was added to combine outputs from various intermediate steps, providing a consistent tone of voice”article, stated

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
“Improved end-to-end performance from 36% to 85% via rapid iteration and new multimodal inputs and automation tools”article, stated
“By setting up node-level and end-to-end evaluations in LangSmith, Tradestack could experiment with different models for the planning node”article, stated
“Their team could talk to the assistant and record the feedback in parallel with development, saving two weeks of internal testing time.”article, stated

Outcomes

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.

3 supporting quotes
“Built and launched an MVP in 6 weeks to a community of 28,000+ users”article, stated
“Secured their first paying customers”article, stated
“Improved end-to-end performance from 36% to 85% via rapid iteration and new multimodal inputs and automation tools”article, stated