Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
import { createRandomUuid } from '#/lib/browser-crypto'
// Persist ownership in the session ID: the generic session API has no source field.
// Legacy IDs are accepted only from the identity-scoped Filesystem Agent history.
const WEB_SESSION_PREFIX = 'vikingbot-web-'
const WEB_SESSION_PATTERN =
/^vikingbot-web-[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i
export function createVikingBotWebSessionId() {
return `${WEB_SESSION_PREFIX}${createRandomUuid()}`
}
export function isVikingBotWebSession(
session: { session_id: string },
legacyFilesystemIds: readonly string[] = [],
) {
return (
WEB_SESSION_PATTERN.test(session.session_id) ||
legacyFilesystemIds.includes(session.session_id)
)
}