feat(examples): add Chinese text ecommerce customer service demo - #260
Conversation
ralf0131
left a comment
There was a problem hiding this comment.
Summary
This PR adds a well-structured text-only e-commerce customer service example using LangGraph. The workflow correctly implements intent routing, specialist ReAct agents, and a final review step. Tests provide good coverage with deterministic mock models for offline execution.
Verdict: APPROVED — Clean example code, good test coverage, proper error handling.
Observations (non-blocking)
- workflow.py:_route_intent — The bare
except Exceptionis intentional (fail-open), which is appropriate for an example. In production code, consider logging the exception for debugging. - tools.py — Clean separation of PRESALES_TOOLS and AFTERSALES_TOOLS. The synthetic data is well-structured and clearly fictional.
- tests/ — The
DeterministicToolModelandFixedClassifierpatterns are excellent for deterministic testing without external dependencies.
Automated review by github-manager-bot
ralf0131
left a comment
There was a problem hiding this comment.
Re-approved after new commit (localization to Chinese). The changes look good:
- Clean localization of prompts, tool descriptions, fictional data, and CLI output to Simplified Chinese
- Python identifiers, graph node names, and route enums remain in English (good practice)
- All CI checks passing, CLA signed
Automated review by github-manager-bot
ralf0131
left a comment
There was a problem hiding this comment.
Summary
This PR adds a well-structured Chinese e-commerce customer service demo using LangGraph, showcasing intent routing, specialist ReAct agents with isolated tool sets, and a review step before responding. Code quality is high with solid error handling, comprehensive tests, and clear documentation.
LGTM — nice example that demonstrates the LoongSuite instrumentation capabilities end-to-end.
Automated review by github-manager-bot
Description
This PR adds a text-only Chinese-language LangGraph e-commerce customer-service example. It targets LangGraph 1.2+ and uses the supported LangChain 1.x
create_agentAPI. An LLM intent router selects a presales or aftersales ReAct agent, each specialist uses a separate synthetic tool set, and a final LLM reviews the response before it is returned.All customer-facing runtime content is Simplified Chinese, including prompts, fictional product/order/policy values, tool descriptions and errors, CLI output, example questions, and fail-open responses. Stable Python identifiers, graph node names, route enum values, and JSON schema keys remain in English. The Chinese README includes a ready-to-use training walkthrough for the scenario and trace structure.
The example is CLI-only and contains no image input, file upload, browser UI, customer data, or production commerce integration. All products, orders, policies, and tool results are fictional fixtures.
Fixes # (N/A)
Type of change
How Has This Been Tested?
cd examples/ecommerce-customer-service && uv run --isolated --no-project --with-requirements requirements-dev.txt pytest tests -qcd examples/ecommerce-customer-service && uv run --isolated --no-project --with-requirements requirements-dev.txt --with 'langgraph==1.2.10' --with 'langchain==1.3.14' --with 'langchain-openai==1.4.1' pytest tests -qtox -e precommitpython3 .github/scripts/detect_loongsuite_changes.pywith the pull-request changed-file setDoes This PR Require a Core Repo Change?
Checklist:
Skip Changelog)Validation Evidence
Spec and Scope
examples/ecommerce-customer-serviceLocal Checks
tox -e precommitBusiness Isolation
Real E2E Matrix
test_concurrent_invocations_keep_routes_and_answers_isolatedtest_specialist_and_reviewer_fail_openandtest_cli_reports_a_chinese_error_for_a_blank_questionTelemetry and Weaver
CI
Skip Changeloglabel; subsequent PR events see the label