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.
Ordered checklist
Section titled “Ordered checklist”- Install the CLI —
npm install -D endlesstesting(ornpx endlesstesting@latestfor one-off use). - Authenticate — ask the user for an API key from app.endlesstesting.ai/settings, then run
npx endlesstesting auth <api-key>. Never fabricate a key. - Register the domain —
npx endlesstesting initprompts for the site URL, registers the domain, extracts brand context via AI, and prints the<script>snippet. - Install the snippet — paste the CLI-printed snippet into the site’s
<head>via its shared layout/template (Next.jsapp/layout.tsx, AstroBaseLayout, Nuxtapp.vue, etc.). KeepblockUntilVariants: falsefor public pages. - Verify — after redeploy,
curl -s https://<domain>/ | grep -E "AB_CONFIG|api/sdk\.js". If nothing matches, the install failed. - Start a run —
npx endlesstesting run https://<domain>/creates 5 AI-generated tests. - Monitor —
npx endlesstesting statuslists runs;npx endlesstesting resultsshows per-variant uplift. - Kill switch —
npx endlesstesting stopto pause a test, or--all-domainto halt everything on the domain.
MCP integration
Section titled “MCP integration”The CLI doubles as an MCP server. Add it to your agent once and use native tools instead of shelling out.
Claude Code
Section titled “Claude Code”.claude/settings.json:
{ "mcpServers": { "endlesstesting": { "command": "npx", "args": ["endlesstesting", "mcp"] } }}Cursor
Section titled “Cursor”.cursor/mcp.json:
{ "mcpServers": { "endlesstesting": { "command": "npx", "args": ["endlesstesting", "mcp"] } }}Rules for agents
Section titled “Rules for agents”- 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.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
endlesstesting: command not found | CLI not on PATH | Use npx endlesstesting |
Not authenticated | No API key stored | Run endlesstesting auth <api-key> |
CORS: origin '...' not allowed | Domain not in backend allowlist | Re-run endlesstesting init — or email support to whitelist |
| SDK snippet not in deployed HTML | Paste didn’t land in prod layout | Check SSG/SSR output, not local source |
| Variants never allocate | weight: 0 on all variants | This was a v0 bug — upgrade backend to latest |