AgentRecipes
Recipes › Customer support

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)

Customer supportLangChain / LangGraph + LangSmith✓ Confirmed by source

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

Step-by-step recipe

  1. 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.
  2. Have a planner agent split each ticket into sub-problems (e.g. return policy vs. a front-end issue).
  3. 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.
  4. 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.
  5. Compose the reply from the sub-results so it cites the right protocol and respects the store's refund and return rules.
  6. 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

Prompt template
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

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

Auto-close routine customer SMS replies and flag unhappy customers with Make and OpenAIOnce you send customers booking confirmations, reminders and work-approval requests by SMS, the replies flood in. Most are just "ok" or…Make✓ Confirmed by sourceDraft support replies from your own past tickets and help centre, with a human sending every answer (n8n + Zendesk)Your support team keeps answering questions that were already answered before, sometimes dozens of times, but the good answers are…n8n✓ Confirmed by sourceCategorise incoming tickets with AI and auto-assign them by workload and availability (Zapier + Zendesk)A small team shares a helpdesk with other departments, and every morning someone spends the better part of an hour reading new tickets,…Zapier✓ Confirmed by source

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.