Your Options
You load baselayer.js straight from Baselayer with one script tag, so there’s nothing to install.
Test the tag on staging with a staging application ID and browser key. See Test Against Staging.
What You Need
For the tag, an application ID from your Baselayer team and a browser key (see Set Up baselayer.js). For your server, your API key.Which Should I Pick
- Start with any one option. Each works on its own.
- Use the tag and your server together for the full view.
- Use your server if you want to link agent visits to purchases.
- Start watch-only. Your rules record what they would decide without applying it until you turn on
enforce. See Set Your Rules.
By Stack
- Any website: Set Up baselayer.js.
- Python (FastAPI) or TypeScript: Set Up the KYA SDK.
- MCP server: add the KYA SDK to that server the same way. See Set Up the KYA SDK.
- Cloudflare: run the KYA SDK in your own Worker with the TypeScript SDK. See Set Up the KYA SDK.
- Akamai or another CDN: talk to your Baselayer team.
- Bot detection already on your CDN: forward its score in a request header, and the KYA SDK records it next to the visit. Set
botScoreHeaderin TypeScript orbot_score_headerin Python. See Set Up the KYA SDK.
Next Steps
- Set Up baselayer.js: add the tag to your pages.
- Set Up the KYA SDK: add the middleware to your server.
- Set Your Rules: decide what agents can do at each step.
- What baselayer.js Reports: see what the tag sends and what it never sends.