How to answer complex e-commerce support tickets with a planner agent, knowledge-base research agents and a tool agent that can refund or change orders (LangGraph + LangSmith, Minimal)
Confirmed by source: Production support system for paying Dutch e-commerce clients documented in a LangChain blog case study (20 Jan 2025): planner/research/tool-calling agent split, helpdesk and Shopify integrations, LangSmith testing, with the 80%+ efficiency gain as stated result (the 90% autonomy figure is labelled as an expectation). Page checked live (HTTP 200) on 2026-11-27. Not run by BranoLabs. (checked 2026-11-27)
The problem
Online shops get many support tickets that are not simple FAQs: a customer wants a refund under a specific return rule, a changed delivery address, or help with a site problem, often several at once. One big prompt mixed these tasks up, made errors and got expensive.
Tools needed
- Helpdesk integration (Zendesk, Front or Gorgias)
- LangGraph planner agent, research sub-agents and a tool-calling agent
- Store knowledge base / training center with return, shipping and refund protocols
- Shop and fulfilment connectors (Shopify, Monta warehouse management, Firmhouse subscriptions)
- LangSmith for traces, prompt comparisons and regression tests
Step-by-step recipe
- Connect the agent to the shop's helpdesk so tickets arrive and replies go back in the same place, and start in draft (co-pilot) mode before switching to fully automatic replies.
- Have a planner agent split each ticket into sub-problems (e.g. return policy vs. a front-end issue).
- Send each sub-problem to a research agent that retrieves and re-ranks the relevant passages from the store's own protocols and returns them to the planner.
- Let the planner hand a final tool plan to a separate tool-calling agent that performs the actions (refund an order in Shopify, update an address) and logs every step in one place.
- Compose the reply from the sub-results so it cites the right protocol and respects the store's refund and return rules.
- Trace every sub-agent in LangSmith, compare prompt variants side by side, and turn each found mistake into a new test, extra few-shot example or a further split of the sub-problem.
Copyable prompt
You are the planner for [STORE_NAME]'s support agent.
Ticket: [TICKET_TEXT]
Order data: [ORDER_SUMMARY]
1. List the separate sub-problems in this ticket (max [N]).
2. For each, name the protocol topic to research (e.g. returns, shipping, refunds, technical).
3. After research results arrive ([RESEARCH_RESULTS]), output a tool plan as JSON: [{"action": "refund|update_address|cancel|none", "order_id": "...", "reason": "protocol section ..."}].
Only propose actions the store's rules allow: [ALLOWED_ACTIONS_AND_LIMITS]. If a rule is unclear or the amount exceeds [LIMIT], set action to "escalate".
Then draft the customer reply in [LANGUAGE], citing the policy in plain words.Original template written by our AI agent for AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.
What the builder reported
Minimal's agents deliver 80%+ efficiency gains across a broad range of e-commerce stores while improving customer satisfaction, according to the case study; Minimal expected 90% of its customers' tickets to be handled autonomously, with 10% escalated to humans. Splitting the work across agents reduced prompt complexity and improved reliability compared with one monolithic prompt. Source: LangChain blog case study.
These are the source author's own claims. AgentRecipes has not run this recipe itself.
Watch out for
- Give the tool agent hard limits (refund amounts, which order states can be changed) and keep a full action log.
- Start in draft mode so staff see the replies before full automation.
- The 90% autonomous-handling figure in the source is Minimal's expectation, not a measured result.
- Vendor-hosted case study written by the LangChain team (January 2025); the efficiency figure is not broken down by store or method.
Source
Original write-up: LangChain blog (customer case study) (2025-01-20) ↗
Found via LangChain customer stories: “How Minimal built a multi-agent customer support system with LangGraph & LangSmith”. This recipe summarises the source in words written by our AI agent; read the original for the full details. Link last checked 2026-11-27.
More customer support recipes
New agent recipes in your inbox
A short email with the newest automation recipes, each linked to its real-world source. No spam. Every email has a one-click unsubscribe link.