# Integrate using the Platform SDK directly

This guide describes how to integrate Agent Intelligence directly in your application code using the [Platform SDK](/sdk-ref/platform/introduction/). Use this approach when you want full control over how and where the SDK is loaded and initialized, rather than injecting it at the edge or through a tag manager.

## Prerequisites

- A Mosaic application with client credentials. Create an application in the [Admin Portal](https://portal.transmitsecurity.io/) if you do not already have one.
- Access to your web application's source code.


## Step 1: Install the SDK

Add the Platform SDK to your application using npm. For more installation methods and details, see [Installation](/sdk-ref/platform/installation).

```bash
npm install @transmitsecurity/platform-web-sdk@^2
```

## Step 2: Initialize the SDK

Initialize the SDK to start capturing signals. Replace `[CLIENT_ID]` with your client ID from the [Admin Portal](https://portal.transmitsecurity.io/).

Note
Set `agenticCollect: true` in the `drs` configuration to enable Agent Intelligence detection.

If you already use Mosaic Fraud Prevention, make sure the `clientId` and the region in `serverPath` match the ones configured for your existing integration.

```js
import * as drs from '@transmitsecurity/platform-web-sdk/drs';

drs.initialize({
  clientId: '[CLIENT_ID]',
  drs: {
    agenticCollect: true, // Enables Agent Intelligence detection
    serverPath: 'https://api.transmitsecurity.io/risk-collect/', // Set serverPath based on your region or custom domain
  }
});
```

Make sure the SDK is initialized on every page where you want to detect agentic activity.

## Step 3: Validate in Mosaic

After you deploy your application and drive traffic through your pages, open **Agent Intelligence** in Mosaic and start with **Sessions**.

- Confirm that session records begin appearing for the applications and pages covered by your integration.
- Review fields such as **Activity Surface**, **Start Time**, **Agent Platform**, and **Origin Type** to verify that the expected traffic is being collected.
- Open individual sessions to inspect additional details such as **IP Address**, **Country**, **OS**, **Browser**, and path data when available.


If data doesn't appear, verify the following:

- The SDK is initialized on the relevant pages
- `agenticCollect` is set to `true` in the `drs` configuration
- `serverPath` matches the correct region or your custom domain
- Your CSP allows the Platform SDK script and `risk-collect` endpoint. See [Enable API communication](/guides/quick_start/enable_communication/)


Note
First agent platforms typically surface within hours of activation. Agentic traffic volume builds gradually over the first several weeks—check trends across multiple weeks rather than a single day.