> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baselayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Options

> See what each way of adding Baselayer takes and what it shows you, and which one fits your stack.

For engineers and whoever runs your site's CDN.

## Your Options

| Option | What it takes | What you get | Who does it |
| - | - | - | - |
| Tag on your pages (baselayer.js) | One script on your shared page template, with your application ID and browser key. | Browser agents that load your pages, including ones that act like regular shoppers: where they go and what they do. | Web team |
| Your server (KYA SDK) | Add the middleware to your app once, in Python with FastAPI or in TypeScript. | Every agent request your app or MCP server handles, signed agent identity and KYA credentials. The only way to link purchases. | Backend team |

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](https://docs.baselayer.com/docs/kya-acceptance-quickstart.md#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](https://docs.baselayer.com/docs/kya-acceptance-quickstart.md)). 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](https://docs.baselayer.com/docs/kya-acceptance-configuring.md).

## By Stack

* Any website: [Set Up baselayer.js](https://docs.baselayer.com/docs/kya-acceptance-quickstart.md).
* Python (FastAPI) or TypeScript: [Set Up the KYA SDK](https://docs.baselayer.com/docs/kya-sdk-quickstart.md).
* MCP server: add the KYA SDK to that server the same way. See [Set Up the KYA SDK](https://docs.baselayer.com/docs/kya-sdk-quickstart.md).
* Cloudflare: run the KYA SDK in your own Worker with the TypeScript SDK. See [Set Up the KYA SDK](https://docs.baselayer.com/docs/kya-sdk-quickstart.md).
* 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 `botScoreHeader` in TypeScript or `bot_score_header` in Python. See [Set Up the KYA SDK](https://docs.baselayer.com/docs/kya-sdk-quickstart.md).

## Next Steps

* [Set Up baselayer.js](https://docs.baselayer.com/docs/kya-acceptance-quickstart.md): add the tag to your pages.
* [Set Up the KYA SDK](https://docs.baselayer.com/docs/kya-sdk-quickstart.md): add the middleware to your server.
* [Set Your Rules](https://docs.baselayer.com/docs/kya-acceptance-configuring.md): decide what agents can do at each step.
* [What baselayer.js Reports](https://docs.baselayer.com/docs/kya-acceptance-browser-records.md): see what the tag sends and what it never sends.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.