ๅค Agent ๅทฅไฝๆต for ่ทจๅขๅบๆตท โ TrendScout โ MarketAnalyst โ ListingCraft โ QualityCheck๏ผ ็จ LangGraph ็ผๆใ
Multi-agent workflow platform for cross-border e-commerce โ TrendScout โ MarketAnalyst โ ListingCraft โ QualityCheck, orchestrated with LangGraph.
BorderPilot ๆฏไธไธช็ซฏๅฐ็ซฏ็่ทจๅข็ตๅ AI Agent ๅไฝๅนณๅฐ๏ผๅฑ็คบไบไธ็ปไธไธๅ LLM Agent ๅฆไฝ่ท้ๆดไธชๅบๆตทไธๅก้พๆก๏ผ
- TrendScout๏ผ่ถๅฟไพฆๅฏ๏ผ โโ ๆ นๆฎ็งๅญ่ฏ๏ผๅฆ "wireless earbuds"๏ผๆๅบๅ้็ๅใ
- MarketAnalyst๏ผๅธๅบๅๆ๏ผ โโ ๅฏนๅคด้จๅ้ๅ go/no-go ๅคๆญ๏ผๅธๅบ่งๆจกใ็ซๅใ้ฃ้ฉ๏ผใ
- ListingCraft๏ผๅค่ฏญ่จ Listing๏ผ โโ ้ๅฏน Amazon / eBay / Shopify ็ญๅคๅนณๅฐใๅค่ฏญ่จ ๏ผen / en-GB / de / ja๏ผๆน้็ๆๅ่ง Listingใ
- QualityCheck๏ผๅ่งๆ ก้ช๏ผ โโ ่ท่งๅ๏ผๆ ้ข้ฟๅบฆใbullet ๆฐ้ใ่ฟ็ฆ่ฏ๏ผ+ LLM ๅ ๅบๅฎกๆ กใ
Orchestrator ็จ LangGraph ็ถๆๆบ็ผๆ๏ผๅๆๅธ่ฟๅ no-go ๆถ่ชๅจ็ญ่ทฏ้ๅบ โโ ่ฟๅฐฑๆฏ
JD ้ๅๅคๆๅฐ็ "Orchestrator๏ผๅๅ่
๏ผ"ๆจกๅผใ
| ่ฆๆฑ | ๆฌ้กน็ฎๅฏนๅบๅฎ็ฐ |
|---|---|
| Python + LangChain/LangGraph | src/border_pilot/orchestrator.py๏ผLangGraph ็ถๆๆบ๏ผ |
| ๅค Agent / Agentic Workflow | src/border_pilot/agents/๏ผ4 ไธช็ฌ็ซ Agent๏ผ |
| Tool-using Agent | ๆฏไธช Agent ้ฝ็จๅทฅๅ ท๏ผ็ฎๅฝๆฃ็ดขใJSON ็บฆๆ LLM ่พๅบใ่งๅๅผๆ |
| ่ทจๅขๅบๆตท/ERP/CRM | ListingCraft ่พๅบๅคๅธๅบๅค่ฏญ่จ Listing๏ผ่ฆ็ Amazon/eBay/Shopify |
| ้จ็ฝฒ + GitHub ้พๆฅ | ๅทฒ้จ็ฝฒ Gradio Demo๏ผๅฏๅฏนๆฅ HF Spaces |
| ๆ่ พๆฌฒ + ่ฐไผ | ๆฏไธช Agent ็ฌ็ซ system prompt + ๆธฉๅบฆ๏ผไพฟไบๅ่็น่ฐไผ |
| ็ๅฎไธๅกๅบๆฏ | "้ๅ โ ๅๆ โ Listing โ ๅ่ง"็ซฏๅฐ็ซฏ่ท้ |
git clone https://github.com/hhdhh/border-pilot
cd border-pilot
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python app.py # ๆต่งๅจๆๅผ http://127.0.0.1:7860ๆ ้ไปปไฝ API Key โโ ้ป่ฎค่ตฐ mock LLM๏ผๅ
จๆต็จๅจๆฌๅฐ / Space ไธ้ฝ่ฝ่ทใ
่ฎพ็ฝฎ ANTHROPIC_API_KEY ๅๅๅฐ Claude๏ผ่ฎพ็ฝฎ HF_TOKEN ๅๅฐ HuggingFace ๅ
่ดนๆจกๅใ
PYTHONPATH=src pytest -q5/5 ๆต่ฏ้่ฟ๏ผๅ ๅซๅฎๆดๅทฅไฝๆต + ๅ่ง่งๅ + CLIใ
A recruiting-grade demo of how a team of specialised LLM agents can run an end-to-end cross-border e-commerce workflow:
- TrendScout surfaces candidate products from a seed query.
- MarketAnalyst turns the top candidate into a go/no-go brief (TAM estimate, sweet spot, competitors, risk flags).
- ListingCraft writes marketplace-ready listings in multiple locales (Amazon US/UK/DE/JP, eBay, Shopify, ...).
- QualityCheck runs rule-based + LLM-assisted compliance checks and emits an approval decision.
The orchestrator is a LangGraph state machine with conditional edges:
when the analyst returns no-go, the pipeline short-circuits to END.
The full workflow runs with the mock LLM and zero API keys, so it
boots cleanly on HuggingFace Spaces and in CI. Set
ANTHROPIC_API_KEY (Claude) or HF_TOKEN (Mistral / Llama) to swap in
a real model at runtime โ no code changes required.
If you came here from the ่ทจๅขๅบๆตท AI Agentๅทฅ็จๅธ posting, here is the explicit trace from this repo to the role:
| Requirement | Where in this repo |
|---|---|
| Python + LangChain/LangGraph | src/border_pilot/orchestrator.py |
| Multi-agent / Agentic Workflow | src/border_pilot/agents/* |
| Tool-using agents | src/border_pilot/tools/*, _parse_json_array in trend_scout |
| RAG / prompt engineering hooks | MockLLM prompts per agent (each agent has its own system prompt + temperature) |
| Cross-border domain | ListingCraft writes per-marketplace drafts in en / en-GB / de / ja with marketplace caps |
| Shipping a live demo | app.py -> HuggingFace Space |
| Open-source hygiene | pyproject.toml, tests, CLI, docs, MIT license |
git clone https://github.com/hhdhh/border-pilot
cd border-pilot
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python app.py # opens Gradio UI on http://127.0.0.1:7860Or run headless:
PYTHONPATH=src BORDER_PILOT_LLM=mock python -m border_pilot.cli demo โโโโโโโโโโโโโโโ ranked trends โโโโโโโโโโโโโโโโโโ decision=go โโโโโโโโโโโโโโโโ
โ TrendScout โ โโโโโโโโโโโโโโบ โ MarketAnalyst โ โโโโโโโโโโโโบ โ ListingCraft โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ watch / no-go โโโบ END โโโโโโโโโโโโโโโโ
โ
โผ per-locale drafts
โโโโโโโโโโโโโโโโ
โ QualityCheck โ โโโบ END (overall_score + recommendation)
โโโโโโโโโโโโโโโโ
- LangGraph wires the nodes; conditional edges branch on analyst decision.
- Typed state (
BorderPilotState) keeps the contract explicit. - Tool-using agents: catalogue retrieval, JSON-constrained LLM output, deterministic compliance rules (title length, bullet count, banned words).
- Pluggable LLM:
make_llm()selectsanthropic/huggingface/mockfrom env vars. The mock keeps the demo fully offline.
Full design notes live in docs/architecture.md.
PYTHONPATH=src pytest -qtests/test_smoke.py exercises the full graph with the mock LLM, plus
focused tests for quality_check (banned words, length rules) and the CLI.
border-pilot/
โโโ app.py # Gradio entrypoint (used by HF Spaces)
โโโ pyproject.toml
โโโ requirements.txt
โโโ src/
โ โโโ border_pilot/
โ โโโ state.py # TypedDict state schema
โ โโโ orchestrator.py # LangGraph wiring + run() helper
โ โโโ cli.py # python -m border_pilot.cli
โ โโโ agents/
โ โ โโโ trend_scout.py
โ โ โโโ market_analyst.py
โ โ โโโ listing_craft.py
โ โ โโโ quality_check.py
โ โโโ tools/
โ โโโ llm.py # Anthropic + HF + Mock providers
โ โโโ data.py # Trend catalogue / live-search hook
โโโ tests/
โ โโโ test_smoke.py
โโโ examples/
โ โโโ demo_run.py
โโโ docs/
โ โโโ architecture.md
โโโ deploy/
โโโ huggingface/
โโโ README.md
| Var | Effect |
|---|---|
BORDER_PILOT_LLM=mock (default) |
Use the deterministic mock provider |
BORDER_PILOT_LLM=anthropic + ANTHROPIC_API_KEY |
Use Claude (claude-3-5-sonnet-latest) |
BORDER_PILOT_LLM=huggingface + HF_TOKEN |
Use HF Inference API (Mistral-7B-Instruct-v0.3) |
BORDER_PILOT_LIVE_SEARCH=1 |
TrendScout will try a live search before falling back to catalogue |
MIT โ see LICENSE.
Built end-to-end in one session with an AI-native workflow: Cursor + Claude + this agent harness. PRs welcome.
ไธไธชไผ่ฏๅ ๅ จๆ ๆญๅบๆฅ๏ผCursor + Claude + ่ฟไธช Agent ่ๆๆถใๆฌข่ฟๆ PRใ