Export an AI bill of materials
Generate a CycloneDX 1.6/1.7 (or SPDX 3.0 AI profile) AI-BOM of your governed agents, their images, frameworks, models, MCP servers and tool pins, A2A peers, memory stores and policies, from the cluster or from YAML files.
flowchart LR K[Cluster objects<br/>Agent, MCPServer, A2APeer,<br/>MemoryStore, ToolPolicy, TrustTier] --> B[maqpna aibom] F[or the same objects<br/>in YAML files: -f] --> B L[Audit ledger<br/>gateway or --ledger:<br/>observed models, tools, A2A] --> B B --> C[CycloneDX 1.6 / 1.7 JSON] B --> S[SPDX 3.0.1 JSON-LD<br/>AI profile] B --> E[evidence pack<br/>aibom.cdx.json]
Goal#
Answer the supply-chain questions of a security questionnaire, an auditor or OWASP ASI04 (Agentic Supply Chain Vulnerabilities): which agents run, from which images and frameworks, which models they call, which MCP servers and tool definitions they trust, which agents they talk to and where they keep memory, in a format AI-BOM tools such as Dependency-Track read.
Prerequisites#
- Live mode: read access to the MAQPNA objects in the cluster, and the gateway URL with an auditor token (or a ledger copy).
- Offline mode: the objects as YAML or JSON (
kubectl get agents,mcpservers,a2apeers,memorystores,toolpolicies,trusttiers -A -o yaml, or your manifests).
Steps#
1. Generate from the cluster#
maqpna aibom --gateway "$MAQPNA_GATEWAY_URL" --system namespace:team-a --out team-a.cdx.json
--system is all (default), an agent (team-a/coder), a namespace (namespace:team-a) or a tenant (tenant:acme). Observed usage comes from the last 30 days of the ledger (--since 30d, --until).
2. Or generate offline#
kubectl get agents,mcpservers,a2apeers,memorystores,toolpolicies,trusttiers,tenants -A -o yaml > objects.yaml
maqpna aibom -f objects.yaml --ledger audit.jsonl --spec-version 1.7 --out aibom.cdx.json
-f takes files or directories and repeats. Objects of other API groups are ignored. With -f, the gateway is used only when --gateway is passed explicitly.
3. Read the BOM#
| MAQPNA object | CycloneDX | Key fields |
|---|---|---|
| Agent | component application (agent:NS/NAME) |
maqpna:agent:framework, trustTier, isolation, policyRef, a2a:exposed |
| Agent image | component container |
purl pkg:oci/... and SHA-256 hash when pinned by digest |
| Framework | component framework |
from the Agent annotation or label maqpna.com/framework |
| Model (spec.model, fallbacks, observed) | component machine-learning-model |
maqpna:model:source (declared, observed, declared+observed), calls, input and output tokens |
| MCPServer | service (mcp:KEY) with one nested service per tool |
trustZone, data classification, maqpna:tool:definitionSha256:pinned / :observed, maqpna:tool:pinCheck |
| A2APeer | service (a2a-peer:NS/NAME) |
trust, jurisdiction, skills, signed-card requirement |
| MemoryStore | component data (dataset) |
backend, jurisdiction, TTL, DLP profile, agents |
| ToolPolicy / gateway bundle | component data (configuration) |
SHA-256 of the spec, version, rules |
| Gateway | service maqpna:gateway |
every agent depends on it |
dependencies links each agent to its image, framework, models, MCP servers, peers, called agents, memory stores and policy. MAQPNA facts are properties in the maqpna: namespace. The BOM carries configuration and counts only: no prompts, arguments, users or secrets, and endpoints are reduced to hosts.
--format spdx writes SPDX 3.0.1 JSON-LD with the Core, Software and AI profiles: agents and models are ai_AIPackage elements, the rest software_Package, linked by dependsOn and contains relationships.
4. Add it to an evidence pack#
maqpna evidence generate --framework owasp-asi --system namespace:team-a --period 2027-Q1 \
--gateway "$MAQPNA_GATEWAY_URL" --key /etc/maqpna/checkpoint.key --aibom --out team-a-asi.zip
The pack then holds aibom.cdx.json, listed and hashed in the signed manifest, and the ai-bom evidence source cites it (for example under OWASP ASI04).
Verify#
The CycloneDX output validates against the official CycloneDX 1.6 and 1.7 JSON schemas (the tests in pkg/aibom run that validation). To check a file yourself:
cyclonedx validate --input-file team-a.cdx.json --input-version v1_6
Troubleshooting#
| Symptom | Fix |
|---|---|
nothing to describe |
Give the cluster, -f FILE or a ledger (--ledger, --gateway). |
no MAQPNA objects ... found in -f |
The files hold no maqpna.com/... objects; export them with kubectl get ... -o yaml. |
| Framework missing | Annotate the Agent: maqpna.com/framework: langgraph. |
| Model provider empty | The model was only observed in the ledger; declare it in spec.model. |