Inspiration
Sales operations teams lose hours on every RFQ by manually re-entering line items, cross-referencing pricing sheets, assessing buyer risk, and chasing approvals across scattered email threads. I wanted to build something that doesn't just assist with parts of this process but takes ownership of the entire workflow from start to finish, while still keeping humans in control of any risky or uncertain decisions. Instead of blind automation, the goal is accountable automation, where every number the system generates is backed by a complete audit trail. The Global AI Hackathon Series with Qwen Cloud, specifically Track 4: Autopilot Agent, provided the perfect opportunity to turn that idea into a production-oriented system.
What it does
QuoteFlow AI takes a raw inbound RFQ, whether it's an email, a pasted document, or any other buyer submission, and carries it through six stages: structured data extraction, deterministic pricing calculation, AI-driven risk and fraud assessment, negotiation, an optional human approval checkpoint, and finally the generation of a branded PDF quote. Every score, routing decision, reasoning summary, and latency measurement is recorded in a live, auditable database as the workflow progresses. A real-time operations dashboard allows reviewers to monitor the entire pipeline and step in only when human intervention is actually needed.
How I built it
I orchestrated the entire pipeline as a LangGraph StateGraph, with checkpointing that allows execution to pause and resume naturally instead of relying on polling loops. I made a deliberate architectural decision to separate reasoning from control flow. Qwen2.5 models, using qwen-plus for intake parsing and qwen-max for risk assessment and negotiation through DashScope's OpenAI-compatible API, are used solely as reasoning engines. Each Qwen call returns a structured JSON object containing a decision, a confidence score, and a reasoning summary. LangGraph's conditional edges are the only component that reads these outputs and determines the next step in the workflow, keeping the routing logic deterministic, testable, and auditable regardless of the LLM's behavior.
Pricing is fully deterministic, using a SQL lookup against a pricing_rules table with no LLM involvement, making every quote reproducible and explainable. FastAPI exposes the pipeline as a serverless-ready REST API, while SQLite in WAL mode serves as the single source of truth for workflow state and the audit log. A custom Streamlit dashboard reads directly from the database to display live KPIs, pipeline status, risk trends, and pending approvals. Final quotes are generated as branded PDFs with ReportLab, including QR codes and SHA-256 fingerprints for verification. QuoteFlow AI integrates with Alibaba Cloud OSS for cloud storage and is designed for deployment on Alibaba Cloud Function Compute, with graceful fallback mechanisms ensuring uninterrupted execution if cloud services are unavailable. Every pipeline action is also exposed as an MCP tool, allowing any MCP-compatible client to interact with the system.
Challenges I ran into
One of the biggest challenges was maintaining a strict separation between LLM reasoning and workflow control. Instead of allowing model outputs to directly influence routing, every agent returns only structured, validated data, while LangGraph alone decides the next step. This keeps the workflow deterministic, testable, and easy to audit. Implementing LangGraph's interrupt_before as a true pause and resume checkpoint also required careful state management to ensure execution continued seamlessly after human approval. To make the system production-ready, I added retries with backoff for Qwen calls, safety checks to prevent pricing errors, and graceful fallbacks for external services so no single dependency could interrupt the entire pipeline.
Accomplishments that I'm proud of
I'm especially proud that the routing logic is fully testable in isolation, with unit tests covering every conditional edge without relying on the database or an LLM. I'm also proud of the complete audit trail, where every node execution, confidence score, risk score, and routing decision is recorded so the entire history of any quote can be reconstructed and explained. Finally, the real-time dashboard reads directly from SQLite with no hardcoded data, and the pipeline visualizer accurately reflects the live LangGraph execution rather than a simulated workflow.
What I learned
Building this project reinforced how much stronger multi-agent systems become when intelligence and control are clearly separated. Letting the LLM provide structured reasoning while a deterministic engine handles all routing made the system easier to test, debug, and trust. It also gave me a deeper appreciation for what production-ready AI requires beyond a working demo, including comprehensive audit trails, graceful failure handling, reliable state management, and a true human-in-the-loop pause and resume workflow.
What's next for QuoteFlow AI
For the next version of QuoteFlow AI, I plan to extend the negotiation agent to support true multi-round conversations with buyers instead of a single negotiation step. I also want to add configurable client-specific pricing rules and approval policies, along with richer analytics built on the audit log, such as win rates by risk tier, negotiation efficiency, and reviewer response times. Finally, I aim to expand the MCP server so other agent frameworks can integrate QuoteFlow AI as a reusable tool within their own workflows.
Log in or sign up for Devpost to join the conversation.