Wilby DocsGet Sandbox Keys

AI Agents on Your Website

Agents like Meta's Muse and ChatGPT's agent shop by browsing your own website and using your normal checkout. With a small addition on your side, Wilby tells you which agent is visiting, applies your rules and the customer's limits at checkout, and records the agent on the order and every payment.

What Wilby Tells You

Search and training crawlers (for example GPTBot or ClaudeBot) are counted apart; they don't shop for anyone.

1. Create a Website Key

Dashboard → AI Agents → Create a Website Key, or POST /v1/website-keys. A website key (wk_…) can only ask Wilby who is visiting. It can't read orders, charge or change anything, so it's safe on a web server or in a Worker. Revoke it any time: POST /v1/website-keys/{id}/revoke.

2. Add One of These

Your Server (Node or PHP)

About ten lines: report pages in the background, and at checkout wait at most 300 ms for the answer. A slow or failed answer means "no sign of an agent", so Wilby can never stop your checkout. Download the Node file · Download the PHP file

// Wilby: AI agents on your website (Node 18+, Express). No packages needed.
// Set WILBY_WEBSITE_KEY to your website key (wk_…). It can only ask Wilby who is visiting.
// If you're behind a proxy or CDN, turn on app.set('trust proxy', true) so req.ip is the visitor's address.
const WILBY_CHECKS = 'https://app.usewilby.com/v1/agent-checks';

function wilbyAgentCheck(req, stage, waitMs) {
  const h = (n) => req.get(n) || undefined;
  const si = h('signature-input');
  // Headers the agent signed (other than the signature headers themselves) are needed to check the signature.
  const signed = si ? [...si.matchAll(/"([a-z0-9-]+)"/g)].map((m) => m[1]).filter((n) => !n.startsWith('signature')) : [];
  const body = {
    stage, method: req.method, host: req.hostname, path: req.path,
    query: req.originalUrl.includes('?') ? req.originalUrl.split('?')[1] : undefined,
    user_agent: h('user-agent'), ip: req.ip,
    signature: h('signature'), signature_input: si, signature_agent: h('signature-agent'), forwarded: h('forwarded'),
    headers: signed.length ? Object.fromEntries(signed.map((n) => [n, h(n) || ''])) : undefined,
    // From Wilby's agent-signals.js on your checkout page (a hidden form field). Needs express.urlencoded() or express.json().
    browser_signals: (req.body && typeof req.body.wilby_signals === 'string') ? req.body.wilby_signals : undefined,
  };
  const ctrl = new AbortController();
  const t = setTimeout(() => ctrl.abort(), waitMs);
  return fetch(WILBY_CHECKS, {
    method: 'POST', signal: ctrl.signal,
    headers: { authorization: 'Bearer ' + process.env.WILBY_WEBSITE_KEY, 'content-type': 'application/json' },
    body: JSON.stringify(body),
  }).then((r) => (r.ok ? r.json() : null)).catch(() => null).finally(() => clearTimeout(t));
}

// 1. Every page: in the background. The page never waits.
app.use((req, res, next) => { if (req.method === 'GET') wilbyAgentCheck(req, 'page', 2000); next(); });

// 2. At checkout: wait at most 300 ms. No answer means "no sign of an agent" and the checkout goes ahead.
app.post('/checkout', async (req, res) => {
  const check = await wilbyAgentCheck(req, 'checkout', 300);
  if (check && check.allowed === false) return res.status(403).send(check.message);
  // 3. Create the order with Wilby as you do today, adding the check id:
  //    POST /v1/orders { …, "agent_check_id": check ? check.id : undefined }
  //    If the answer has customer_approval.url, send it to the customer: they approve the order before you charge.
});

Cloudflare Worker (Sites Already on Cloudflare)

A ready-made Worker you add in your own Cloudflare account (Wilby never changes your Cloudflare settings). It reports every page in the background and, at checkout, adds a Wilby-Agent-Check header with the check id for your server. If you use Cloudflare's bot scores, the Worker sends the score too. Download the Worker

3. Agents Inside the Customer's Browser (Optional, Recommended)

Some agents work inside the customer's own browser. They send the browser's normal name, use the customer's own internet address and don't sign, so step 2 can't see them. They do leave signs on the page: their own page markers and files, fields filled with no key presses, keys pressed faster than a person can, a pointer that jumps straight to each button. Add this line to your checkout page:

<script src="https://app.usewilby.com/agent-signals.js" defer></script>

When the customer sends the checkout form, the script adds a hidden field wilby_signals with a short summary. The Node and PHP snippets and the Worker above already pass it to Wilby as browser_signals. If your checkout sends with JavaScript, add wilby_signals: window.wilbySignals() to what it sends. You can also download the script and serve it from your own site.

4. Pass the Check Id With the Order

When you create the order, add agent_check_id:

POST /v1/orders
{ "merchant_external_ref": "…", "customer": { "external_ref": "…" }, "purpose": "…", "amount_cents": 4200,
  "agent_check_id": "ach_…" }

Wilby then:

A check id lasts 30 minutes, works once, and only for your business. GET /v1/agent-checks/{id} shows what came of it.

5. "Likely" Visits

By default a "likely" visit is recorded only. To ask the customer to confirm "likely" orders above your "customer approves above" amount too: POST /v1/settings {"website_agents": {"likely": "ask_customer"}}.

6. See Who Visits

Dashboard → AI Agents → Agents on Your Website, or GET /v1/agent-checks/report: the last 30 days per agent, visits by level, and how many reached checkout, ordered or were turned away.

Which Agents Wilby Recognizes

Checked November 19, 2026. Agents change often; Wilby checks this list every month and keeps each agent's published keys and networks up to date by itself, so there is nothing to add on your side.

AgentHow It ShopsHow Wilby Recognizes ItBest Level
ChatGPT (agent and cloud browser)Its own browser visits your siteSigned requests checked against ChatGPT's published keys; its name; OpenAI's published network. Its buyer's country, time zone and language are read from Forwarded only when the signature checks out.Verified
Google-Agent (Gemini)Google's servers visit your siteSigned requests (Google signs some) checked against Google's published keys; the name Google-Agent; Google's published network for Google-AgentVerified when signed
Agents registered with card networksSigned requests tagged for browsing or payingSignatures in the card networks' formats, with signed_for: browsing or payingVerified
Perplexity (its servers)Its servers visit your siteThe name Perplexity-User; its published networkNamed Itself
Claude (its servers)Its servers visit your siteThe name Claude-UserNamed Itself
Meta MuseIts servers visit your siteThe name Meta-ExternalFetcherNamed Itself
Claude in ChromeInside the customer's browserIts page markers, plus how fields are filled (step 3)Likely
Perplexity CometInside the customer's browserIts files on the page, plus how fields are filled (step 3)Likely
Gemini in Chrome and other browser agentsInside the customer's browserHow fields are filled and clicked (step 3)Likely

What Is Sent and Kept