Any Platform
This guide covers two universal integration methods that work with any website, regardless of tech stack: a Cloudflare DNS proxy (full functionality) or a JavaScript snippet (lightweight, partial functionality). Use this guide if your platform does not have a dedicated integration (Shopify, Vercel, Cloudflare Worker, Express, WordPress).
What to Expect
After setup, agent detection and tracking begin immediately. Content optimization behavior depends on which method you choose:
| Timeframe | DNS Proxy | JavaScript Snippet |
|---|---|---|
| Immediate | Full agent detection, llms.txt, agent.json are live | Client-side agent detection and referral tracking begin |
| 1-6 hours | Origin content analyzed. Structured data gaps identified. | Beacon data populates dashboard. |
| 6-24 hours | Content variants generated. JSON-LD enrichment active. | llms.txt redirect active (if configured). |
| 24-48 hours | Agent referral attribution in dashboard. | Referral attribution in dashboard. |
| 1 week+ | Learning engine adapts content per platform. | Manual JSON-LD injection can be refined based on dashboard data. |
Prerequisites
- An Inception Agents API key (sign up, then find it in Settings > API Keys)
- Your Tenant ID (found in Settings > API Keys)
- Option A only: A Cloudflare account (free tier is sufficient)
- Option B only: Ability to add a
<script>tag to your site’s<head>
Option A: Cloudflare DNS Proxy (Recommended)
This method routes all traffic through a Cloudflare Worker. It provides the full feature set: edge-level agent detection, content optimization, llms.txt generation, JSON-LD enrichment, and referral tracking. Human visitors are proxied to your origin with zero modification.
Step 1: Add Your Domain to Cloudflare
If your domain is not already on Cloudflare, add it and update your nameservers.
Step 2: Create a DNS Record
You have two options:
Option 2a: Worker Route
If your domain already has DNS records pointing to your origin, add a Worker Route:
- Deploy the Inception Agents Worker (see the Cloudflare Worker guide for full setup)
- In the Cloudflare dashboard, go to Workers & Pages > your worker > Triggers
- Add a route:
your-domain.com/*
Option 2b: CNAME (for subdomains)
If you want to proxy a subdomain through Inception Agents:
- In the Cloudflare dashboard, go to DNS > Records
- Add a CNAME record pointing to the Inception Agents edge:
| Type | Name | Target | Proxy |
|---|---|---|---|
| CNAME | www | proxy.inceptionagents.com | Proxied (orange cloud) |
Contact support to configure the proxy target for your account.
Step 3: Verify
# Check llms.txt
curl -s https://your-domain.com/llms.txt
# Check agent detection
curl -s -D - \
-H "User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.0" \
https://your-domain.com/ | head -20
# Check agent card
curl -s https://your-domain.com/.well-known/agent.json
Expected: llms.txt returns a markdown document, agent requests include the X-Inception-Agent: detected header, and agent.json returns your agent capability card.
Option B: JavaScript Snippet
This method requires no server-side changes. Add a single script tag to your site’s HTML. It runs client-side detection, tracks agent referrals, and can redirect AI agents to Inception Agents-hosted endpoints.
Step 1: Add the Beacon Script
Add this tag to your site’s <head> on every page:
<script
src="https://cdn.inceptionagents.com/beacon.js"
data-api-key="YOUR_API_KEY"
data-tenant-id="YOUR_TENANT_ID"
defer
></script>
Replace YOUR_API_KEY and YOUR_TENANT_ID with values from your dashboard.
Step 2: Configure llms.txt Redirect
AI agents that request /llms.txt will get a 404 unless your server can serve this file. Add a redirect rule on your server or CDN to point llms.txt requests to the Inception Agents-hosted version:
Apache (.htaccess)
RewriteEngine On
RewriteRule ^llms\.txt$ https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/llms.txt [R=301,L]
Nginx
location = /llms.txt {
return 301 https://api.inceptionagents.com/v1/serve/$tenant_id/llms.txt;
}
Netlify (_redirects)
/llms.txt https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/llms.txt 301
Vercel (vercel.json)
{
"redirects": [
{
"source": "/llms.txt",
"destination": "https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/llms.txt",
"permanent": true
}
]
}
Step 3: Configure Agent Card Redirect
Add a similar redirect for the agent card:
Apache (.htaccess)
RewriteRule ^\.well-known/agent\.json$ https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/agent.json [R=301,L]
Nginx
location = /.well-known/agent.json {
return 301 https://api.inceptionagents.com/v1/serve/$tenant_id/agent.json;
}
Netlify (_redirects)
/.well-known/agent.json https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/agent.json 301
Vercel (vercel.json)
{
"redirects": [
{
"source": "/.well-known/agent.json",
"destination": "https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/agent.json",
"permanent": true
}
]
}
Step 4: Add JSON-LD Structured Data (Optional)
The beacon script can inject JSON-LD structured data into your pages for AI agent consumption. You can embed it statically in your HTML or use the beacon’s dynamic injection.
Static JSON-LD (in your page HTML)
Add a <script type="application/ld+json"> block to your page templates:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Your Company",
"url": "https://your-domain.com",
"description": "A concise description of your company and what you offer.",
"sameAs": [
"https://twitter.com/yourcompany",
"https://linkedin.com/company/yourcompany"
]
}
</script>
For product pages:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Your Product",
"description": "Product description optimized for AI agent consumption.",
"offers": {
"@type": "Offer",
"price": "29.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.6",
"reviewCount": "142"
}
}
</script>
Dynamic JSON-LD (via the beacon)
The beacon can inject JSON-LD dynamically when an AI agent is detected. Add a data-jsonld attribute with a URL that returns your structured data:
<script
src="https://cdn.inceptionagents.com/beacon.js"
data-api-key="YOUR_API_KEY"
data-tenant-id="YOUR_TENANT_ID"
data-jsonld="https://api.inceptionagents.com/v1/serve/YOUR_TENANT_ID/jsonld"
defer
></script>
The beacon fetches the JSON-LD from the URL and injects it into the page DOM when an agent is detected. For human visitors, no additional markup is added.
Step 5: Verify
# Check beacon loading
curl -s https://your-domain.com/ | grep "beacon.js"
# Check llms.txt redirect
curl -sI https://your-domain.com/llms.txt
# Check agent card redirect
curl -sI https://your-domain.com/.well-known/agent.json
Expected: the beacon script tag is present in the HTML, and the llms.txt and agent.json paths return 301 redirects to the Inception Agents API.
Limitations: JavaScript Snippet vs. DNS Proxy
| Capability | DNS Proxy | JavaScript Snippet |
|---|---|---|
| Agent detection | Server-side, all requests | Client-side only (requires JS execution) |
llms.txt generation | Auto-generated, served at edge | Requires manual redirect setup |
Agent card (agent.json) | Auto-generated, served at edge | Requires manual redirect setup |
| Content optimization | Full edge-level optimization | No server-side content modification |
| JSON-LD enrichment | Automatic, per-page | Manual static or beacon-injected dynamic |
| Referral tracking | Full, server-side | Client-side only |
| AI agents that do not execute JS | Detected (server-side) | Not detected (most AI crawlers do not execute JS) |
| Latency impact on humans | Zero (passthrough at edge) | ~5KB script load (async, non-blocking) |
X-Inception-Agent header | Yes | No (client-side only) |
/agent/* endpoints | Yes (auto-generated) | No (requires DNS Proxy or server-side integration) |
Key limitation: Most AI agent crawlers (GPTBot, PerplexityBot, ClaudeBot, etc.) do not execute JavaScript. The JavaScript snippet primarily tracks referral traffic from users who clicked AI-generated links and provides client-side detection for AI browsing agents that do execute JS (e.g., ChatGPT browsing mode). For full agent interception, use the DNS Proxy or a server-side integration.
Upgrading to a Full Integration
If you start with the JavaScript Snippet and want to upgrade:
| Current Stack | Recommended Upgrade |
|---|---|
| Shopify | Shopify App |
| Next.js on Vercel | Vercel Middleware |
| Express / Node.js | Express Middleware |
| WordPress | WordPress Plugin |
| Any stack on Cloudflare | Cloudflare Worker |
| Any other stack | Cloudflare DNS Proxy (Option A in this guide) |
When upgrading, remove the JavaScript snippet from your site’s <head> and any manual redirect rules you configured. The new integration handles everything at the server/edge level.
Configuration Options
Beacon Script Attributes
| Attribute | Required | Description |
|---|---|---|
data-api-key | Yes | Your Inception Agents API key |
data-tenant-id | Yes | Your Inception Agents tenant ID |
data-jsonld | No | URL to fetch dynamic JSON-LD for agent injection |
data-exclude-paths | No | Comma-separated path prefixes to skip (e.g., /admin,/api) |
data-debug | No | Set to true to log detection decisions to the browser console |
Troubleshooting
Beacon Not Loading
- Confirm the script tag is in the
<head>section, not the<body>. - Check the browser console for errors loading
beacon.js. - Verify that your Content Security Policy (CSP) allows scripts from
cdn.inceptionagents.com.
llms.txt Returns 404
- For DNS Proxy: confirm the Worker is deployed and the route is configured.
- For JavaScript Snippet: you must configure a redirect rule manually. See Step 2.
- Test the redirect:
curl -sI https://your-domain.com/llms.txtshould return a301to the Inception Agents API.
No Agent Traffic in Dashboard
- Agent traffic depends on AI platforms crawling your site. Verify detection with the
curlcommands in the appropriate verification section. - For JavaScript Snippet: most AI crawlers do not execute JS. Client-side detection only works for browsing agents. Check the Limitations table.
- For DNS Proxy: enable
debug: truein the Worker config and check logs withnpx wrangler tail.
JSON-LD Not Appearing
- For static JSON-LD: view page source and confirm the
<script type="application/ld+json">block is present. - For dynamic JSON-LD via the beacon: the beacon only injects JSON-LD when it detects an AI agent. Test by checking the dashboard for beacon events, not by viewing the page as a human.
- Validate your JSON-LD syntax at validator.schema.org.
CSP (Content Security Policy) Errors
If your site has a Content Security Policy, add these to your allowed sources:
script-src: cdn.inceptionagents.com
connect-src: api.inceptionagents.com
Uninstall
DNS Proxy
- Remove the Worker Route or CNAME record from Cloudflare DNS
- Delete the Worker if it was created solely for Inception Agents
- See the full Cloudflare Worker uninstall instructions
JavaScript Snippet
- Remove the
<script>tag from your site’s<head> - Remove any redirect rules you added for
llms.txtandagent.json - Remove any static
<script type="application/ld+json">blocks that were added specifically for Inception Agents (keep your existing structured data)
Your site reverts to its default behavior immediately. No residual code runs.
Inception Agents