Modern retail planning isn’t a spreadsheet; it’s a loop. A new supply‑chain agent framework—deployed at JD.com’s scale—treats planning as a closed‑loop system: gather data → generate plans → execute → diagnose → correct → repeat. That shift from “one‑and‑done forecasting” to continuous replanning is the core idea worth copying.

What’s actually new here

  • Agentic decomposition around business intents. Instead of dumping a vague prompt into a model, the system classifies the operator’s request into three intent families: (1) inventory turnover & diagnostics, (2) in‑stock monitoring, (3) sales/inventory/procurement recommendations. Each intent triggers a structured task list rather than ad‑hoc code.
  • Atomic analytics, not monoliths. The execution agent generates workflows as chains of four primitives—Filter → Transform → Groupby → Sort—and stitches them with function calls to vetted business logic. This keeps code inspectable, traceable, and reusable.
  • Dynamic reconfiguration. After every sub‑task, observations feed back into the planner, which prunes, reorders, or adds steps. The output isn’t a static report; it’s a plan that learns while it runs.

Why it matters for operators (not just researchers)

Traditional MIP‑heavy or rule‑based planning works well when the world is stationary and well‑specified. Retail isn’t. Promotions, seasonality, logistics bottlenecks, supplier constraints—these create moving objective functions. The agentic design here bakes in:

  • Interpretability by construction. Atomic steps + SOP‑aware prompts yield artifacts planners can audit and tweak.
  • On‑ramp for legacy assets. Function calling lets you reuse battle‑tested forecasting and replenishment routines instead of reinventing them in prompts.
  • SOP alignment. Injecting department SOPs (via RAG) means the planner speaks the organization’s dialect, not just generic data science.

The loop, concretely

  1. Data acquisition (text‑to‑SQL over PSI, sales, traffic, capacity).

  2. Plan formulation (translate goals into SKU/warehouse targets; value‑based and quantity‑based inventory flow; supplier/logistics capacity considered).

  3. Execution hooks (replenishment parameters updated under plan & in‑stock constraints).

  4. Diagnosis & early warning (variance vs plan, attributions to traffic, promo, competitor, etc.).

  5. Plan correction (revise targets; re‑simulate alternatives around promos, allocations, and inbound pacing).

A quick mapping from agent modules to business wins

Layer What it does What you get
Intent Classification Route ask → diagnostic / in‑stock / recommendation Predictable paths; less prompt roulette
Task Orchestration Build/refresh a sub‑task DAG from SOPs Consistency with how your org already plans
Task Execution (Atomic Ops + Function Calls) Deterministic, traceable code; call vetted models Faster iterations; easier audits
Iterative Replanning Use observations to prune/reorder tasks Plans that adapt during the month
Plan Correction Detect deviation causes; propose corrections Earlier course‑correction, fewer painful month‑ends

Evidence from deployment

At JD.com scale (10M+ SKUs, thousands of sites), the framework reports:

  • ~40% less weekly analysis time per planning cycle (planners spend time deciding, not wrangling).
  • Plan accuracy uplift measured as a higher share of plans within 5% deviation.
  • +2–3% in‑stock/fulfillment improvement, reflecting better inventory availability.

These aren’t vanity metrics; they map directly to service levels, cash conversion, and OPEX.

What to copy if you’re not JD.com

  • Codify your SOPs first. Even a lightweight SOP (e.g., how a category plans Singles’ Day or back‑to‑school) dramatically improves agent behavior.
  • Wrap your best models as callable tools. Expose forecasting/replenishment functions with tight I/O contracts so the agent can orchestrate rather than re‑generate them.
  • Enforce atomic analytics. Prohibit “mystery notebooks.” Every step should be one of: Filter, Transform, Groupby, Sort—strung into a pipeline with a visible result_df.
  • Close the loop. Don’t end with a deck. Wire alerts, attributions, and “next best action” into the runbook so plans actually change mid‑cycle.

Mini‑example: turning a vague ask into a plan

Operator: “Generate November sales and inbound plans for Laptops.” Agent path: Intent → pull SOP → task list → (A) analyze YoY/Recent trends, (B) assess promo calendar + competitor signals, (C) compute inventory‑sales ratios & min stock for in‑stock SLOs, (D) propose inbound pacing under DC capacity. Output: SKU/DC targets with a promotion‑aware inbound curve, plus watch‑items and deviation triggers.

Where it can break—and how to harden it

  • Data heterogeneity & lag. Put freshness checks and anomaly flags at the very first Filter step; fail closed, not open.
  • Over‑eager codegen. Prefer function calls for anything with compliance or finance impact; keep generation for glue.
  • Silent drift. Track agent suggestions vs actual KPI movement; bake a monthly “agent post‑mortem” into SOPs.

The strategic takeaway

Agentic planning isn’t about making a smarter forecast; it’s about shortening the feedback distance between plan and correction. If your teams can see, attribute, and fix deviations inside the cycle, you ship fewer apologies and more orders.


Cognaptus: Automate the Present, Incubate the Future