The Admin Portal provides dashboards that present Agent Intelligence session data for analysts and security teams (see Explore sessions). To get a machine-readable result, query the visibility endpoint as described in this guide. Your backend receives the current session as data: who is in the session, which agent is acting, and the session context. The endpoint returns data only–it does not allow, deny, or challenge the request.
To have Mosaic evaluate a policy and return an outcome your application enforces, see Integrate Governance with Agent Intelligence.
- An agent loads the page. The SDK initializes with
agenticCollect: trueandenableSessionToken: true, and writes the session token to a cookie on your domain. - The agent browses pages and performs actions while Agent Intelligence monitors this activity and writes it to the session.
- When your backend needs the session, such as at login, payment, or another sensitive request, it calls the visibility endpoint with the session token.
- The endpoint maps the token to the device's current Agent Intelligence session and returns the actor, context, and risk signals.
- Your backend uses that data in its own logic.
- A Mosaic application with client credentials. Create an application in the Admin Portal if you do not already have one.
- Agent Intelligence integration. If you already use Mosaic Fraud Prevention, keep the same
clientIdand the same region inserverPath.
Modify your Agent Intelligence integration to enable session token generation. Set enableSessionToken: true in the same SDK configuration that enables Agent Intelligence. The SDK then writes the session token to the ts_asc cookie on your site's parent domain, so a backend on another subdomain of that site receives the cookie with the request.
Add the flag inside drs, next to agenticCollect:
drs: {
agenticCollect: true, // Enables Agent Intelligence detection
enableSessionToken: true, // Writes the session token cookie for your backend
serverPath: 'https://api.transmitsecurity.io/risk-collect/', // Set serverPath based on your region or custom domain
}If your API is on a different site, the browser does not send the cookie. Read the token in the page and pass it to your backend in a header or field your API accepts. With the Platform SDK in your application code, you can read it with getSessionToken().
Call the visibility endpoint from your backend when you want the session data. Authorize the call with a client access token generated from your client credentials.
On each sensitive request, read ts_asc and send POST /risk/v1/agent-intelligence/session with session_token. The token identifies the device, and Mosaic maps it to that device's current Agent Intelligence session. The context fields are optional. They come back in the response. Send claimed_user_id hashed. Do not send an email address, phone number, or other plain-text personal data.
// Update the API host to match your region or custom domain
const resp = await fetch(
'https://api.transmitsecurity.io/risk/v1/agent-intelligence/session',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer [ACCESS_TOKEN]', // Generated with your client ID and secret
},
body: JSON.stringify({
session_token: '[SESSION_TOKEN]', // Value of the ts_asc cookie
action_type: 'transaction',
correlation_id: '[CORRELATION_ID]',
claimed_user_id: '[HASHED_USER_ID]',
claimed_user_id_type: 'account_id',
auth_context: {
user_id: '[USER_ID]',
auth_method: 'webauthn',
failed_attempts: 0,
},
}),
}
);The response includes the following fields. For the full response schema, see the API reference.
| Field | What it tells you |
|---|---|
actor.classification_status | CLASSIFIED once an agent or bot has been detected. PENDING until then. Pending is not human. |
actor.session_actors | Every actor seen in the session, such as HUMAN, AGENT, or BOT. |
actor.initiated_by | Who started the session. |
actor.current_actor | Who is acting at the time of the call. |
actor.current_platform_id | The agent platform acting now, when the current actor is an agent. |
actor.detected | Each platform seen in the session, including its type and origin. |
context | Session details, such as the session ID, entry page, current page, and the context fields you sent. Device, browser, and IP data are included when available. |
risk_signals | Device and network signals for the session, such as tampering or an anonymizing network. |
Errors:
401means the token is missing or invalid.403means the token belongs to another tenant.404means there is no current session for the device, the visibility endpoint is not enabled for the tenant, or the session ended from inactivity.410means the session reached its maximum duration.429means the tenant exceeded its rate limit.503means the session could not be read.
404, 410, and 503 should be treated as unknown. Do not treat them as a human session or as an allow.
A token can cover more than one session on the same device. Each response is about the device's current session, and context.session_id identifies that session.