Wholesale TradeTransportation & Logistics
Whitespace
AI operating system for wholesale distribution
Built the demand forecasting and order-optimization pipeline, the Claude-based agents and their tool guardrails, hybrid retrieval and the evaluation gates behind Whitespace, an AI operations platform for wholesale distributors.
Whitespace: the AI operating system for wholesale distribution
85–90%+
Recommendation lines accepted unchanged
50–80%
Order emails turned into no-edit drafts
20–50%
Fewer stockouts
1–2 min
To review an order, vs 5–15 by hand
Stack
Overview
Whitespace is an AI-powered operations platform for wholesale distributors. It works alongside the ERP and email inboxes, turning fragmented operational data into a structured view of the business, and its AI agents handle replenishment, order entry, customer service, supplier follow-up and invoice matching, requesting approval for anything consequential.
The central idea: the agent proposes, business rules validate, an authorized user approves, and the execution service commits and verifies.
The problem
A single customer order can depend on information spread across the ERP, email, spreadsheets and the heads of experienced employees.
- Fragmented information: employees search several systems to learn whether an order can be fulfilled.
- Manual, repetitive work: buyers re-check stock, sales history, open POs and lead times before every purchase order.
- Generic AI is not enough: a language model cannot be trusted with stock quantities or ERP transactions.
My role
I worked with the Whitespace founding team as an AI engineer and built three parts of the platform: the forecasting and replenishment pipeline, the AI agents, and their retrieval and evaluation. The overview and problem above describe Whitespace's platform as a whole; the sections below cover only my own work.
What I built
Forecasting and replenishment
- Forecasting pipelines that pick, per SKU-warehouse series, the model (AutoETS, AutoARIMA, Croston, LightGBM) that wins a backtest and beats a SeasonalNaive baseline.
- Stockout-corrected training data, so the model does not learn "no sales" from "nothing to sell".
- An OR-Tools CP-SAT model that sets order quantities under supplier MOQ and pack-multiple constraints.
AI agents
- The Inventory Planning agent on the Claude Agent SDK, which explains recommendation lines and re-runs the optimizer but never creates purchase orders.
- Order Processing, Customer Service, Ask AI, supplier-monitoring and invoice-matching agents, with Claude Haiku 4.5 for extraction and Claude Sonnet 4.5 for reasoning and drafting.
- A versioned semantic layer shared by every agent; Ask AI maps questions to its approved metrics, so the model never writes SQL.
Retrieval and evaluation
- Weaviate hybrid search over emails and documents, with every hit re-read through the tenant-scoped tool API.
- Braintrust release gates: deterministic scorers check every quantity, date and PO number against tool outputs, and an LLM judge grades tone.
Results
- Recommendation lines: buyers accepted 50–70% without changes at first, and 85–90% or more once the models matured.
- Order emails: 50–80% became drafts that needed no edits.
- Extraction accuracy: 97–99% on header fields and 90–97% on SKU matching.
- Forecast error: WAPE of 30–50% at SKU–warehouse–week level, 10–25% better than the SeasonalNaive baseline.
- Fill rate: 95–98%.
- Stock levels: stockouts down 20–50% and inventory down 10–30%.
- Order entry: 5–15 minutes per order by hand, against 1–2 minutes to review a draft.
- LLM cost: $0.005–0.02 per order document.
Tech stack
| Layer | Technologies |
|---|---|
| Frontend | React, Inertia.js, TypeScript, Vite, Tailwind CSS, shadcn/ui, TanStack Table, Apache ECharts |
| Backend | PHP 8.3, Laravel, Laravel Horizon, Python 3.12, FastAPI, Pydantic v2 |
| AI | Claude Agent SDK, LiteLLM, Claude Sonnet 4.5, Claude Haiku 4.5, OpenAI text-embedding-3-small, PyMuPDF, Amazon Textract, Braintrust |
| Forecasting and optimization | Dagster, StatsForecast, MLForecast (LightGBM), Google OR-Tools CP-SAT, Evidently |
| Data | MySQL 8, Weaviate, Redis, Amazon S3 |
| Infrastructure | AWS ECS (Fargate), Amazon RDS for MySQL, Terraform, Bitbucket Pipelines, OpenTelemetry, Sentry |
Related case studies


