PURISTA API / @purista/ai / createScopedSessionId
Function: createScopedSessionId()
createScopedSessionId(
input):string
Defined in: packages/ai/src/runtime/sessionIdentity.ts:29
Returns a stable scoped session id that keeps tenant/principal/agent histories isolated.
Parameters
input
Returns
string
Example
ts
const scoped = createScopedSessionId({
agentName: 'supportAgent',
agentVersion: '1',
baseSessionId: 'msg-1',
tenantId: 'tenant-a',
principalId: 'user-42',
})
// supportAgent:1:tenant-a:user-42:msg-1