Applied software
Black Swan Commerce
Black Swan Commerce is an API-first commerce engine. It turns a plain-text shopping list into a reviewable set of product selections, then pushes the confirmed picks into a real merchant cart or hands off to a merchant's checkout. Every search, ranking, and selection decision is recorded so selection quality can be measured rather than guessed.
Problem
Purchase intent is trapped inside retailer-specific search boxes. Customers restate the same requirements while every seller represents products, availability, pricing, and carts differently.
Thesis
A purchase request should be written once, remain under the customer's control, and work across whichever seller or interface responds best.
Intended user
Households and technically sophisticated shoppers first, then small businesses, purchasing agents, and AI agents acting under user-defined constraints.
What it does
One engine, three front doors
A command line, an MCP server for assistants, and a versioned REST API sit on one engine. The engine never learns a supplier's name; retailer logic lives behind adapters.
Sessions as a state machine
Open, resolving, resolved, confirmed, cart built, closed. Resolution runs on an asynchronous job queue, editing an item reopens the session, and an invalid transition is rejected rather than silently applied.
Replaceable selection
A deterministic ranking heuristic, a locally hosted language model, or a chain that falls back between them, behind a provider-neutral inference interface. Hard constraints such as a price ceiling are applied before any strategy sees the candidates.
Preference memory
Preferences are built from imported order history and from the picks a user accepted or overrode, not from a hand-written profile.
Instrument before you optimize
Every supplier request and response and every per-candidate score is kept. A scored bake-off harness compares selection engines on the same candidates, so a tuned ranker is measured against today's baseline rather than intuition.
Paper in, data out
A butcher's scanned price list is photographed and read page by page through the shared Kit capture pipeline into structured lines with sections and codes, so suppliers without an API still join the same model.
Request flow
- 01Plain-text shopping list
- 02Commerce session (canonical, schema-validated items)
- 03Resolve: supplier search, ranking, and selection (asynchronous)
- 04Review and confirm the selection document
- 05Cart build through the merchant adapter, or checkout handoff
Architecture
Hexagonal: a canonical, schema-validated request model is the single representation every interface compiles down to, and supplier adapters translate a merchant's API into the same typed request and result shapes.
The service is Python today, with a Rust core exposed through PyO3 and also built to WebAssembly. A Rust front door began on 2026-10-30 and is taking over routes one at a time, so the move happens behind stable interfaces rather than as a rewrite.
Kroger is integrated through authentication, search, and cart-add and verified by a real grocery run into a live cart. Additional merchant types are reached through open agent-commerce protocols, and the service publishes its own agent profile.
A restock-alert bot delivers notifications over chat platforms; everything runs self-hosted on the studio's infrastructure behind the passkey portal.
- Python
- Rust (PyO3, WebAssembly)
- PostgreSQL
- MCP
- REST / OpenAPI
- React
- Local LLM via the model arbiter
Evidence
- Canonical request model shared across CLI, MCP, and REST interfacesImplemented
- Stateful commerce sessions (resolve, review, confirm, cart) on an asynchronous job queueImplemented
- Kroger authentication, search, and cart-add, verified by a real grocery run into a live cartImplemented
- Checkout handoff to additional merchant types through open commerce protocolsWorking prototype
- Self-hosted model selection with a scored bake-off harness comparing strategiesImplemented
- Scanned supplier price lists captured by camera through the shared Kit pipelineImplemented
- Rust front door taking over routes from the Python service one at a timeIn progress
- Selection-accuracy analysis over the recorded decision trailPlanned
Open questions
- Whether the supplier contract generalizes to a second full-cart merchant with a materially different API shape.
- Whether merchants grant production API access beyond developer tiers.
- How much value remains when a merchant's API ends at the cart, so curation has to finish inside the session.
- Which business model the evidence supports: a consumer app, a commerce API, or licensed retailer normalization.
Next milestone
Use the recorded decision trail to measure selection accuracy before tuning ranking, and continue the route-by-route move to Rust.
Future direction
A second bounded context for selling owned inventory, sharing the listings, price observations, and comparables that purchasing already uses, inside the same deployable service. This is direction, not a committed plan.
Work with us
Black Swan Group is interested in merchants and API partners willing to support a second integration, and in early users willing to run real shopping lists through the API or command line.