Layer 1: Zero-Touch Runtime AI-BOM Auto-Discovery & Zero-Knowledge Prompt Hashing
Automated AI-BOM (4 Layers)
#ai-bom#automation#prompt_hash_version#weights_hash#zero-knowledge#sha256#runtime#model_provenance
Automatically populate your AI Bill of Materials (AI-BOM) from live production AI calls without manually typing model versions or prompt hashes.
How It Works Under the Hood
- •When your wrapped AI client makes a call, @shdwsdk/sdk inspects the request's system instructions (OpenAI system/developer messages, Anthropic system field, or Gemini systemInstruction) in memory.
- •It computes a deterministic SHA-256 digest (prompt_hash_version) locally in ~0.04ms using Web Crypto. Your actual prompt text never leaves your server.
- •The prompt_hash_version and exact model snapshot (e.g., claude-sonnet-5-5) piggyback on the existing telemetry ping (0 extra network requests). The ingest-telemetry Edge Function upserts your AI-BOM inventory. A weights_hash is recorded only if you send one for weights you host; hosted API vendors do not publish weight digests, so none are inferred.
How to Use It Step-by-Step
- 1No extra code is required beyond shdw.wrapClient(client).
- 2Optionally pass defaultWorkloadName and defaultEuAiRiskTier in ShdwTelemetryClient config to label the workload in your AI-BOM.
- 3Open the 'AI-BOM & Governance' tab in your Dashboard to view auto-discovered models and prompt version hashes.
Zero-Knowledge System Prompt Fingerprinting
// When your app calls openai.chat.completions.create():
const response = await openai.chat.completions.create({
model: "gpt-5.4-mini",
messages: [
{ role: "system", content: "You are a SOC2 security compliance assistant." },
{ role: "user", content: userQuestion },
],
});
// @shdwsdk/sdk hashes the system prompt in memory -> "sha256:8f41c9..."
// and auto-upserts (gpt-5.4-mini, sha256:8f41c9...) into your AI-BOM!Related guides
- Layer 2: RAG & Vector Database Auto-Instrumentation (shdw.wrapVectorStore)
- Layer 3: Static Manifest & CI/CD Auto-Scanner (@shdwsdk/sdk/scanner)
- Layer 4: Model Integrity & CycloneDX / SPDX Exporters
- Interactive CLI Setup Wizard (npx @shdwsdk/sdk init / npx shdw-init)
- Non-Blocking Client Wrapper (shdw.wrapClient) & Fail-Silent Guarantee
- Scope 3 Energy & Carbon Formula + 22 Global & European Data Center Regions
- EU AI Act Risk Classification & US NIST AI RMF 1.0 Assessment Matrix
- Buyer-Facing Public Trust Center (/trust/[slug]) & Embeddable HTML Badge
