Skip to content

Agent Onboarding

Drop this page (or link to it) in any project so an AI coding agent can onboard Endless Testing end-to-end. The canonical copy lives in the CLI repo as AGENTS.md.

  1. Install the CLInpm install -D endlesstesting (or npx endlesstesting@latest for one-off use).
  2. Authenticate — ask the user for an API key from app.endlesstesting.ai/settings, then run npx endlesstesting auth <api-key>. Never fabricate a key.
  3. Register the domainnpx endlesstesting init prompts for the site URL, registers the domain, extracts brand context via AI, and prints the <script> snippet.
  4. Install the snippet — paste the CLI-printed snippet into the site’s <head> via its shared layout/template (Next.js app/layout.tsx, Astro BaseLayout, Nuxt app.vue, etc.). Keep blockUntilVariants: false for public pages.
  5. Verify — after redeploy, curl -s https://<domain>/ | grep -E "AB_CONFIG|api/sdk\.js". If nothing matches, the install failed.
  6. Start a runnpx endlesstesting run https://<domain>/ creates 5 AI-generated tests.
  7. Monitornpx endlesstesting status lists runs; npx endlesstesting results shows per-variant uplift.
  8. Kill switchnpx endlesstesting stop to pause a test, or --all-domain to halt everything on the domain.

The CLI doubles as an MCP server. Add it to your agent once and use native tools instead of shelling out.

.claude/settings.json:

{
"mcpServers": {
"endlesstesting": {
"command": "npx",
"args": ["endlesstesting", "mcp"]
}
}
}

.cursor/mcp.json:

{
"mcpServers": {
"endlesstesting": {
"command": "npx",
"args": ["endlesstesting", "mcp"]
}
}
}
  • Do not fabricate test results. Winners need real traffic. Wait for data before reporting lift.
  • Do not install on auth pages, admin panels, or iframes. Only on public pages that drive conversion.
  • Do not bypass init. It also triggers brand-context extraction — skipping it degrades variant quality.
  • Do not commit the API key. The CLI writes it to ~/.config/endlesstesting/auth.json.
  • Prefer CLI → MCP → REST. The REST API is the last resort for custom integrations.
SymptomCauseFix
endlesstesting: command not foundCLI not on PATHUse npx endlesstesting
Not authenticatedNo API key storedRun endlesstesting auth <api-key>
CORS: origin '...' not allowedDomain not in backend allowlistRe-run endlesstesting init — or email support to whitelist
SDK snippet not in deployed HTMLPaste didn’t land in prod layoutCheck SSG/SSR output, not local source
Variants never allocateweight: 0 on all variantsThis was a v0 bug — upgrade backend to latest