MAQPNADocs

maqpna aibom

Export the AI bill of materials (CycloneDX or SPDX) of agents, models and tools

Observe-o json | yaml

Synopsis#

maqpna aibom [--system all|NS/AGENT|namespace:NS|tenant:NAME] [--format cyclonedx|spdx] [--spec-version 1.6|1.7]
                   [-f FILE|DIR]... [--ledger FILE | --gateway URL] [--since 30d|RFC3339] [--until RFC3339] [--no-cluster] [--out FILE]

Description#

Builds the AI-BOM of a governed AI system:

  agents        Agent: image (digest -> purl and SHA-256), framework (annotation
                or label maqpna.com/framework), trust tier, isolation, policy
  models        spec.model and its fallbacks, plus models observed in the
                ledger's metered usage (calls, input and output tokens)
  MCP servers   MCPServer: host, trust, jurisdiction, data class, tool pins
                (SHA-256 of each tool definition) and observed definitions
  A2A peers     A2APeer (and peers called in the ledger)
  memory        MemoryStore: backend, jurisdiction, TTL, DLP, agents
  policies      ToolPolicy (spec SHA-256) and the gateway policy bundle

and their dependencies. MAQPNA facts are CycloneDX properties named maqpna:*.

Live mode reads the cluster (as 'maqpna evidence generate' does) and the ledger from the gateway (--gateway or the context) or --ledger. Offline mode (-f) reads the same objects from YAML or JSON files or directories (kubectl get -o yaml output or manifests) and, with --ledger, a ledger file; the gateway is only used offline when --gateway is passed explicitly. The output has configuration and counts only: no prompts, arguments or user identities.

Flags#

FlagTypeDescriptionDefault
--allow-gateway-mismatchswitchsend the context's login token to a gateway other than the one it was issued for (env MAQPNA_ALLOW_GATEWAY_MISMATCH=1)none
-f, --filenamestringYAML/JSON file or directory with MAQPNA objects (repeatable; offline mode)none
--formatstringcyclonedx | spdx (SPDX 3.0.1 JSON-LD, AI profile)cyclonedx
--gatewaystringgateway base URL (env MAQPNA_GATEWAY_URL; default: the context's gateway)none
--ledgerstringaudit ledger file for observed models, tools and A2A callsnone
--no-clusterswitchdo not read the cluster (with neither -f nor the cluster, components come from the ledger only)none
--oidc-token-filestringfile holding an OIDC access token for the admin API (env MAQPNA_OIDC_TOKEN_FILE); wins over --tokennone
--outstringoutput file (default stdout)none
--sincestringobserved usage from: a duration ago (720h; 30d) or an RFC3339 time30d
--spec-versionstringCycloneDX spec version: 1.6 | 1.71.6
--systemstringall, NS/AGENT (agent), namespace:NS or tenant:NAMEall
--tokenstringstatic admin token (env MAQPNA_ADMIN_TOKEN; dev/break-glass)none
--untilstringobserved usage until (RFC3339; default now)none

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna aibom --gateway "$GW" --system namespace:team-a --out team-a.cdx.json
maqpna aibom -f objects.yaml --ledger audit.jsonl --spec-version 1.7 --out aibom.cdx.json
maqpna aibom -f manifests/ --format spdx --no-cluster

What happens when you run it#

  • Talks to the gateway: --gateway, else MAQPNA_GATEWAY_URL, else the current context's gateway (maqpna context).
  • Authenticates to the admin API with the token stored by maqpna login, --oidc-token-file, or a static --token (MAQPNA_ADMIN_TOKEN).
  • Reads the audit ledger offline with --ledger FILE: audit ledger file for observed models, tools and A2A calls.
  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)