Skip to content

LLM & AI Agents2025

An LLM Agent That Runs the Entire Sales Flow, From Browsing to Payment

A multi-agent system built on LangChain and LangGraph that handles product discovery, cart operations, shipping quotes, order creation and payment inside one conversation. 60% faster than the standard checkout flow.

Stack
LangChain · LangGraph · OpenAI API · Qdrant · FastAPI · Python · Payment Gateway API

Context

Most sales chatbots stop at recommending a product and then hand the customer back to a form. The drop-off happens exactly at that handover. I wanted to find out whether an agent could carry a buyer all the way to a paid order without leaving the chat.

Problem

Running a real transaction through an LLM raises problems a Q&A bot never has to solve:

  • The agent has to hold state. A cart edited three turns ago has to still be correct now.

  • Search has to be fast and grounded. Ten thousand SKUs cannot fit in a prompt, and a hallucinated product is a broken order.

  • Money is unforgiving. A payment call fired twice is a real financial error, not a bad answer.

Approach

I split responsibilities across specialised agents coordinated through a LangGraph state machine: product discovery, cart management, shipping and cost calculation, and order and payment. Each agent owns a narrow set of tools, which keeps prompts short and makes wrong behaviour traceable to a single node instead of a monolithic prompt.

Product retrieval runs on Qdrant vector search over the full catalogue, so recommendations are grounded in real inventory. Transactional steps go through explicit tool calls with validation and confirmation before execution, so the model proposes and the code decides.

Results

  • 95% intent recognition accuracy

  • 80% conversation completion rate

  • 100ms Qdrant retrieval across 10,000+ inventory items

  • 99.9% payment transaction success rate

  • 60% reduction in average sales workflow time compared to a traditional e-commerce flow

Notes

The design decision that mattered most was keeping the model out of the transaction itself. The agent decides what to do; deterministic code decides whether it is allowed. That boundary is what took the payment success rate to a number an operations team can live with.

All projects