BetterData Logo
MIT Licensed

Build conversational commerce. Free.

The LLM Gateway is an MIT-licensed open source reference for the Gateway + Registry pattern. Connect any catalog to any AI agent—no vendor lock-in, no hidden fees.

TypeScript
MIT License
Zero deps

Everything you need for multi-LLM commerce.

Universal Tool Registry

Define commerce tools once. Automatically adapt for Claude (MCP), ChatGPT, and Grok.

Federated Hub

Open source routing and discovery for multi-merchant networks.

Native LLM Adapters

First-class support for OpenAI, Grok, and Anthropic (via MCP) out of the box.

Ingestion CLI

Powerful CLI to sync your catalog from CSV, JSON, Shopify, or Square.

Merchant Registry

Pluggable backends for local or file-based merchant registration.

Session Management

Redis-backed sessions with support for cross-platform intent transfer.

Shared with MIT Core

MIT-Licensed Core Capabilities

The same operational engine that powers our platform is available as open source for the community.

Trusted Inventory Core

Atomic reservations, multi-location lot and expiry tracking, and server-side invariants.

Lot & Expiry Tracking
FEFO Enforcement
Atomic Reservations

Governed Workflows

Explicit authority matrices and approval-gated actions for inventory movements.

Approval Matrices
Explicit States
RBAC Enforcement

Fulfillment Operations

Wave, batch, and cluster picking with channel-aware SLAs and routing.

Wave Picking
Batching & Clustering
Dynamic Routing

Product Intelligence

Multi-taxonomy support (GS1, GMC, Amazon) and AI-assisted classification.

Universal Taxonomy
Cross-Mapping
AI Enrichment
Want the full operating loop with Demand Forecasting and Multi-Vendor Federation? Explore the Commercial Platform →

Quickstart

Get started in under 5 minutes.

1Install the package
# npm
npm install @betterdata/llm-gateway

# pnpm
pnpm add @betterdata/llm-gateway
2Create providers
import { createBaselineProviders } from '@betterdata/llm-gateway';

const providers = createBaselineProviders({
  getProduct: async (id) => myProductCatalog.findById(id),
  shippingOptions: [
    { method: 'Standard', price: 5.99, transitDays: 5 },
    { method: 'Express', price: 14.99, transitDays: 2 },
  ],
});
3Use with any LLM
// Check availability
const result = await providers.availability.check({
  productId: 'my-product',
  quantity: 1,
});

console.log(result);
// {
//   productId: 'my-product',
//   available: true,
//   message: 'In stock',
//   confidence: 'medium'
// }

OSS for builders. Cloud for scale.

Start free with `@repo/llm-gateway`. Upgrade to Better Data Cloud for managed infrastructure and intelligence.

FeatureOSSCloud
Core Gateway & Adapters
Federation Hub (Routing)
Merchant DiscoveryTag-basedML-Ranked
Billing & ProvisioningBuild yourself
Real-time AnalyticsEvents logsDashboards
Automated VerificationManual

Swipe horizontally to view full comparison →

Join the community

Star us on GitHub, ask questions, contribute code, or just say hi.