docs

Mumm gateway SDK

Serve AI agents from your own data.

Put the gateway in front of your website. Agents get clean markdown from your sources. People and search crawlers get your pages unchanged.

Start the quickstart API reference

$npm install @rebilder/gateway

Every page, by task.

What the gateway is

@rebilder/gateway connects your existing website to AI agents using content-negotiation middleware. It classifies every request as AI agent, human, search crawler, or protocol client, and serves agents a clean markdown transformation of the canonical page, rendered from your source of truth. Humans and crawlers pass through untouched, as if the gateway weren’t there.

Mumm gateway

One connection.

The right response.

Incoming request → matching format

AI request Markdown from your sources

People and crawlers Your original website

Protocol request Your endpoint

Activity is recorded through your configured event handler.

In the captured demo, the same product request dropped from 91,226 bytes of PDP HTML to 1,315 bytes of markdown, a 98.6% reduction, with the price moving from character offset 23,185 to line 4. The capture includes the source page and both responses.

Install and verify the gateway

Connect your business sources and event reporting, then verify serving and reporting separately. The scope depends on your website and the available sources:

  1. Install @rebilder/gateway, which has zero external runtime dependencies by policy. Our packages are published on npm under @rebilder, the company behind Mumm.
  2. Wire your source of truth: up to five optional resolver functions from URL to your own data. Three are commerce shaped (product, policies, catalog). Two are universal: document for any other page, such as a guide or a service, and collection for an index of them. Wire only the ones you have.
  3. Mount the adapter for your stack: Next.js middleware, Shopify app proxy, Express/Fastify, a Cloudflare Worker, or the fetch middleware for SvelteKit, Nuxt, Astro, React Router, Hono, Bun, Deno, Netlify and Vercel.
  4. Connect event reporting with your site-scoped key and the event sink. Use the runtime-specific flush or waitUntil instructions so events reach your Console.
  5. Verify with curl: same URL, markdown for agents, unchanged HTML for everyone else. Then confirm that the request appears in Console → AI visits.

For WordPress, use the free plugin. For a custom integration, start with Quickstart: Next.js end to end. On another stack? Jump straight to the Shopify, Node, Cloudflare, framework or runtime pages; the config object is identical everywhere.

Built for production stacks

Guarantees

Key pages

Page What it covers
Quickstart Next.js end to end: install, wiring, a complete catalog example, curl verification.
Next.js adapter proxy.ts / middleware.ts integration, the dedicated markdown route, matcher scope.
Shopify adapter App-proxy setup in Partners, the HMAC security model, response semantics.
Node adapter Express middleware, Fastify via @fastify/middie or an onRequest hook, structural types.
Cloudflare & edge The worker fetch handler, origin pass-through, Vercel Edge and other WinterCG runtimes.
Frameworks The /fetch middleware, with recipes for SvelteKit, Nuxt, Astro, React Router, Remix and Hono.
Runtimes Bun, Deno, Netlify Edge Functions and Vercel Routing Middleware.
Sources The GatewaySources contract: field-by-field types, resolution order, error containment.
Classification How requests are detected: the five checks, the crawler guardrail, confidence semantics.
Events RebilderEventV0 field reference, the wire protocol, the HTTP and console sinks.
llms.txt Generate an llms.txt directory from your source configuration.
Troubleshooting Real failure modes with fixes.
API reference Every public export of @rebilder/gateway and @rebilder/events, with signatures.

Last updated October 30, 2026.