Skip to main content

Blog / AI security

What is an AI-BOM? A practical guide to AI bills of materials

An SBOM tells you which libraries you ship. An AI-BOM tells you which models, providers, agents and MCP servers your code depends on, and how they connect. Here is what goes in one, which formats to use, and how to keep it current.

Key takeaways

  • An AI bill of materials (AI-BOM) is an inventory of the AI components a system depends on: model providers, models, frameworks, prompts, agents, tools, MCP servers, vector stores and data sources, plus how they relate.
  • It answers questions an SBOM cannot: which repositories call a given model, which agents can run which tools, and what changed in your AI stack since the last release.
  • Two standards cover it: CycloneDX (ML-BOM, with model and data component types) and SPDX 3.0 (AI and Dataset profiles).
  • Some facts can be detected from code (that a model is called, where, through which framework). Others must be declared by a person (supplier, release, license, provenance). A good AI-BOM keeps the two apart.
  • An AI-BOM is only useful if it stays current. Rebuild it from the default branch on every scan, version it, and alert on drift.

What is an AI-BOM?

An AI bill of materials (AI-BOM) is a structured inventory of the AI components a piece of software depends on. Where a software bill of materials (SBOM) lists the libraries and packages you ship, an AI-BOM lists the things that make the software behave as an AI system: the model providers it calls, the specific models, the orchestration frameworks, the prompts, the agents and the tools they can use, the MCP servers it connects to, the vector stores and data sources behind retrieval, and the guardrails in front of all of it.

A useful AI-BOM records three things for each component: what it is (identity and version), where the evidence is (the file and line that shows the dependency), and how it relates to everything else (this agent uses this model through this framework and can call these tools). The relationships matter as much as the list, because most AI risk lives in the connections: untrusted input reaching a prompt, a model's output reaching a tool, a tool reaching your data.

Why teams need an AI-BOM now

Two years ago most codebases had one AI integration, added deliberately. Today AI arrives through many doors: an engineer adds a provider SDK to prototype a feature, a framework pulls in a model by default, a coding assistant writes an agent loop, a teammate commits an MCP configuration for their editor. The result is shadow AI: AI components in production that nobody reviewed or recorded.

An AI-BOM gives you answers to questions that otherwise take days of searching:

  • Incident response. A provider deprecates a model, or an advisory lands for an AI framework version. Which repositories are affected, and where exactly?
  • Security review. Which agents can execute code or call tools that change state? Which MCP servers are configured, and are their versions pinned?
  • Data governance. Which services send data to which external providers? Which retrieval pipelines read from which data sources?
  • Customer and audit questions. Security questionnaires increasingly ask which AI services a vendor uses and where data goes. Frameworks such as the NIST AI Risk Management Framework and regulations such as the EU AI Act emphasise documenting the AI components in a system.
  • Change control. What changed in the AI stack between the last release and this one?

AI-BOM vs SBOM

An AI-BOM extends the SBOM idea rather than replacing it. You want both, and many teams export them side by side.

How an AI-BOM differs from an SBOM
SBOMAI-BOM
Main questionWhich software packages do we ship?Which AI components does this system depend on, and how are they connected?
Typical entriesLibraries, packages, containers, licensesProviders, models, frameworks, prompts, agents, tools, MCP servers, vector stores, data sources, guardrails
Where facts come fromLockfiles and manifests, mostly machine-readableCode, configuration and model references, plus facts a person must declare (supplier, release, provenance)
RelationshipsDependency treeDependency tree plus data and control flow: which agent uses which model and tools
Versioning riskUnpinned package versionsUnpinned packages, plus model identifiers without a revision and remote MCP servers that can change underneath you
Standard formatsCycloneDX, SPDXCycloneDX ML-BOM, SPDX 3.0 AI and Dataset profiles

What goes into an AI-BOM

There is no single required field list, but these are the component types worth recording, and the details that make each entry useful:

AI-BOM component types and what to record
ComponentExamplesRecord
Model providerHosted APIs, cloud AI platforms, self-hosted runtimesProvider, SDK and version, where it is called, what data is sent
ModelA specific model identifier, an embedding model, a fine-tuned modelIdentifier, revision or version pin, supplier, license, model card link
FrameworkOrchestration, agent and retrieval librariesPackage and version (also in the SBOM), which models it wraps
PromptSystem prompts, templatesLocation, which model it feeds, whether user input is interpolated
Agent and toolAgent definitions, function or tool registrationsWhich model drives it, which tools it can call, whether execution needs approval
MCP serverServers declared in client configuration files, servers your repository buildsPackage or URL, pinned version, transport, credentials passed, tools exposed
Data source and vector storeRetrieval indexes, embedding stores, training or evaluation datasetsStore, collections, tenant isolation, dataset type and provenance
GuardrailInput and output filters, moderation callsWhat it protects and where it runs
EndpointRoutes that expose AI featuresURL, authentication, which agent or model serves it

Two kinds of metadata deserve special care:

  • Evidence. Every entry should point to the file and line that proves it. An inventory without evidence cannot be verified or kept current.
  • Declared facts. Supplier, release date, download location, license and provenance often cannot be inferred from code. They have to be declared by someone who checked the source. Mark which facts were detected and which were declared, and never fill a gap with a guess (for example, a scan date standing in for a model release date).

AI-BOM formats: CycloneDX and SPDX

You do not need a new format. Both major SBOM standards now model AI components:

  • CycloneDX added machine learning support (often called ML-BOM) in version 1.5. Models are components of type machine-learning-model, datasets and similar assets are components of type data, and model details can be described with a model card. Relationships use the normal dependency graph.
  • SPDX 3.0 added an AI profile and a Dataset profile. They are stricter about provenance: the AI profile expects facts such as the supplier, release time, download location and version of each model, which is why they usually need human declaration.
A trimmed CycloneDX AI-BOM: one framework, one model, and the link between them
{
  "bomFormat": "CycloneDX",
  "specVersion": "1.7",
  "components": [
    {
      "type": "library",
      "bom-ref": "pkg:pypi/example-agent-framework@0.9.2",
      "name": "example-agent-framework",
      "version": "0.9.2",
      "purl": "pkg:pypi/example-agent-framework@0.9.2"
    },
    {
      "type": "machine-learning-model",
      "bom-ref": "model:example-provider/example-model-2025-06",
      "name": "example-model-2025-06",
      "supplier": { "name": "Example Provider" }
    }
  ],
  "dependencies": [
    {
      "ref": "pkg:pypi/example-agent-framework@0.9.2",
      "dependsOn": ["model:example-provider/example-model-2025-06"]
    }
  ]
}

Pick the format your consumers ask for. CycloneDX is common in security tooling and can be produced from detection alone; SPDX AI profile output is a good fit when you need declared provenance for audit or procurement.

How to build an AI-BOM

By hand, for a first look

For a single repository you can get a rough inventory in an afternoon:

  1. Search dependency manifests and lockfiles for AI provider SDKs, orchestration frameworks, vector store clients and MCP SDKs.
  2. Search code for model identifiers (model names passed to SDK calls) and for prompt templates.
  3. Find agent definitions and every tool or function registered with them.
  4. Collect MCP client configuration files: .mcp.json, claude_desktop_config.json, .vscode/mcp.json, .cursor/mcp.json and the MCP sections of other editors' settings.
  5. Record the file and line for each item, the version where there is one, and how the items connect.
A starting search across a repository (adjust the patterns to your stack)
# AI SDKs and frameworks in manifests
git ls-files | grep -E '(package\.json|requirements.*\.txt|pyproject\.toml|go\.mod|pom\.xml)$' \
  | xargs grep -nEi 'openai|anthropic|gemini|bedrock|mistral|cohere|langchain|llama.?index|mcp'

# MCP client configuration files
git ls-files | grep -E '(^|/)(\.mcp\.json|claude_desktop_config\.json|mcp\.json)$'

The manual approach breaks down quickly. It misses components that are configured rather than imported, it has no evidence trail once code moves, and it is stale the day after you finish. Most importantly, it cannot tell you what changed.

Automatically, on every scan

The reliable approach is to generate the AI-BOM from static analysis of each repository, at an exact commit, every time the default branch is scanned. That gives you an inventory with evidence for every entry, a version history you can compare, and alerts when something new appears.

This is how CodeStax's AI security scanning works. Each complete scan of a repository's default branch produces a new, immutable generation of the AI-BOM for that commit, covering providers, models, frameworks, prompts, agents, tools, MCP servers, vector stores, guardrails and AI-facing routes, each with its source evidence. Generations export as CycloneDX 1.7 or SPDX 3.0.1 AI profile JSON, and repeated exports of the same generation are byte-identical, so a digest means something. Facts that code cannot prove, such as a model's supplier, release time and download location, are added as verified declarations by an admin, recorded in the audit log, and never filled in with guesses.

Keep the AI-BOM current: versions and drift

An AI-BOM is a snapshot, so its value comes from comparing snapshots. Build it from the default branch, keep every version, and watch for these changes between versions:

  • A new AI provider or model appears (often the first sign of shadow AI).
  • A model identifier loses its revision pin.
  • A new MCP server is declared, or a server's version changes.
  • An AI framework or SDK version gains a known vulnerability.
  • An agent gains a tool that can execute code or change state.

Route high-severity changes to the people who own them (a webhook or an email to the security owner works), and review the rest weekly. CodeStax records added and removed assets, providers and models, models that lose their pin, version changes, new MCP servers and newly vulnerable AI dependencies on the AI attack surface Changes tab (Growth plan and above), and delivers high and critical changes to your webhooks and organization admins automatically.

AI-BOM checklist

What a useful AI-BOM includes
CheckWhy it matters
One AI-BOM per repository, tied to an exact commitYou can say precisely what shipped
Every entry has file-and-line evidenceEntries can be verified and traced when code moves
Models record a version or revision pinUnpinned models can change behaviour without a code change
Relationships between agents, models, tools and data are capturedMost AI risk sits in the connections
MCP servers record package, version, transport and credentials passedServers are third-party code with your privileges
Detected and declared facts are kept apartGuesses are never mistaken for verified provenance
Exports in CycloneDX or SPDXConsumers can process it with standard tooling
Versions are kept and compared; drift raises alertsChange is what you actually need to review

If you are also securing the MCP servers your AI-BOM turns up, our MCP server security guide covers the threat model and a checklist for each server.

Common questions

What does AI-BOM stand for?

AI-BOM stands for AI bill of materials: an inventory of the AI components a system depends on, such as model providers, models, frameworks, prompts, agents, tools, MCP servers and data sources, with how they connect.

What is the difference between an AI-BOM and an SBOM?

An SBOM lists software packages and their versions. An AI-BOM lists AI components and their relationships, including models and prompts that are not packages, and it needs declared facts such as model supplier and provenance that cannot be read from a lockfile. Most teams keep both.

Which format should an AI-BOM use?

Use CycloneDX (version 1.5 or later, with machine-learning-model and data components) or SPDX 3.0 with the AI and Dataset profiles. CycloneDX is common in security tooling; SPDX AI profile output suits audits that need declared provenance.

Can an AI-BOM be generated automatically?

Mostly. Static analysis can detect providers, models, frameworks, prompts, agents, tools and MCP servers with evidence. Facts such as a model's supplier, release date and license usually need a person to declare and verify them.

What is shadow AI?

Shadow AI is AI usage that nobody reviewed or recorded: a provider SDK added for a prototype, a model pulled in by a framework default, or an MCP server configured in an editor. A continuously rebuilt AI-BOM with drift alerts is the practical way to find it.

Your next step

Generate an AI-BOM for one of your repositories.

Connect a repository on the Free plan. The AI BOM tab builds from its first complete scan, with evidence for every entry.

Get started free