Find the insights and best practices about our product.
Bill of Materials JSON Import Format

Importing a Bill of Materials from a JSON File

Import replaces the contents of an existing Bill of Materials (BOM) with the contents of a JSON file. Use it when you or a vendor have built or corrected a BOM outside the platform and need to load that version into an existing BOM. This article describes the file the Import button accepts, what each field means and how to fix a file that fails validation. For an overview of the Bill of Materials page and its tabs, see the Bill of Materials Overview article.

An import makes the following changes:

  • Every technology, model, dataset, infrastructure item and agentic system on the BOM is removed and replaced with the contents of the file.
  • The BOM's name and description are replaced with the values in the file's Details object.
  • The BOM's VCS integration and repository references are cleared, and the BOM becomes self-attested. A BOM created with CodeSensor can no longer be rescanned after an import.
  • The import counts as a normal update. Prior versions remain in Version History, and the import becomes the newest version.
  • A new vulnerability assessment starts automatically against the imported items.

Import follows these rules:

  • You need permission to update BOMs.
  • Import is unavailable while a scan of the BOM is queued or running. Wait for the scan to finish before you import.
  • The file must be a single .json file that holds one BOM and is 5 MB or smaller.
  • Validation is all or nothing. The file is checked before anything is saved. If any error is found, nothing is saved and every problem is listed with its location in the file.
  • Import accepts JSON only. CycloneDX and SPDX files are not supported.
  • Import works only on an existing BOM. The Bill of Materials Wizard cannot create a new BOM from a JSON file.

Building an Import File

Import reads the same format that the JSON export writes, so the simplest way to build a file is to start from an export.

  1. Open any BOM and select Export to json. The export menu also lists CycloneDX, SPDX and XLSX formats, but only the JSON export can be imported.
  2. Edit the file. Add, change or remove entries in Technologies, Infrastructure, Data, Models and AgenticSystems, and update Details.Name and Details.Description.
  3. Open the BOM you want to replace and select Import.
  4. In the Import BOM from JSON dialog, review the warning, then click or drag the file into the drop area and select Import.

The file is checked first. If it passes, the contents are replaced and the page refreshes to show the new data.

Two rules make an exported file easier to reuse:

  • Field names are not case-sensitive. Technologies and technologies both work.
  • Fields the import does not use can stay in the file. Ids, dates, owner, repository details and scan status are ignored.

File Structure

The file is a single JSON object with the following top-level fields.

Field

Type

What it holds

Details (required)

object

The BOM's name and description.

Technologies

list of components

Libraries, packages and frameworks.

Infrastructure

list of components

Platforms and services the system runs on.

Data

list of components

Datasets and data sources.

Models

list of components

AI and ML models. Models can also carry system prompts.

AgenticSystems

list of agentic systems

Agentic systems, their agents and how they connect.

Any list can be left out or set to []. A list set to null or to a value that is not a list is rejected.

Details and Component Fields

Details

The Details object sets the name and description of the BOM you import into.

Field

Type

Max length

Notes

Name (required)

string

1,000

Becomes the BOM's name.

Description

string

2,000

Becomes the BOM's description. The description is empty if this field is left out.

An export also writes owner, repository, branch, statuses and dates into Details. Import ignores these fields because they describe the BOM the file came from, not the BOM you import into.

Component

Technologies, Infrastructure, Data and Models all use the same component object.

Field

Type

Max length

Notes

Name (required)

string

500

Component name, for example langchain or gpt-4o.

Version

string

2,000

Must be text in quotes: "2.0", not 2.0. An empty string clears the version.

Description

string

2,000

Free text.

FilePath

list of strings

2,000 total

Where the component was found. The limit applies to all paths joined with commas.

Language

list of strings

300 each

Programming languages, for example ["python"]. Use plain ASCII only, with no repeats in any casing.

Attributes

object

500 per key, 2,000 per value

Extra key and value text pairs.

SystemPrompts

list of objects

None

Models only. Each entry is { "systemPrompt": "..." }.

DepGroup

string

128

Dependency group from the package manifest, for example dev.

Components follow these rules:

  • No duplicates within a list. Two components in the same list with the same name and version (ignoring case) are rejected. The same package at two different versions is accepted, and the same name on two different lists is accepted.
  • Ids are not reused. Every imported component gets a new id, so ids in an exported file are ignored.
  • Imported components are self-attested. They are treated the same as components added by hand, and their names and descriptions can be edited later in the BOM editor.
  • Version wins over Attributes. If Version and Attributes.version disagree, the value in Version is used.

Agentic System Fields

Each entry in AgenticSystems describes one agentic system, the agents in it and the links between them.

Agentic System

Field

Type

Max length

Notes

name

(required)

string

500

Name of the agentic system.

framework

string

200

For example langgraph or openai-agents.

type

string

None

Type of the agentic system.

components

(required)

list of agents

None

The agents in the system. Use [] if there are none.

relations

(required)

list of relations

None

Links between agents and other nodes. Use [] if there are none.

Agent

Field

Type

Max length

Notes

id

GUID

None

Used only to connect relations to this agent. It must be unique within the system. A new id is assigned on import.

name (required)

string

500

Name of the agent.

model

string

200

Model the agent uses.

description

string

2,000

Free text.

source

string

100

Source of the agent.

language

string

100

Programming language of the agent.

instructions

string

None

The agent's instructions.

tools,

handoffs,

input_guardrails,

output_guardrails,

mcp_servers,

filepath

list of strings

None

Lists of names or paths.

Relation

A relation links a source node to a destination node. To link two agents, set each node's type to component_node and its content to the id of an agent in the same system.

Field

Type

Max length

Notes

type

(required)

string

100

Kind of link, for example handoff or uses_tool.

source

(required)

node

None

Where the link starts.

destination (required)

node

None

Where the link ends.

node.type (required)

string

100

Use component_node to point at an agent in this system.

node.content

string

500

For component_node, the id of an agent in the same system. For other node types, the node's name.

Example Import File

The following file is a complete, valid import. It sets the BOM's name and description, adds two technologies, one infrastructure item, one dataset and one model with a system prompt, and defines an agentic system in which an intake agent hands off to a routing agent. Copy it as a starting point, edit it, then import it.

{
"Details": {
"Name": "Claims Triage Assistant",
"Description": "LLM-assisted triage for inbound insurance claims."
},
"Technologies": [
{ "Name": "langchain", "Version": "0.3.7", "Language": ["python"],
"FilePath": ["requirements.txt"] },
{ "Name": "transformers", "Version": "4.46.2", "Language": ["python"] }
],
"Infrastructure": [
{ "Name": "Azure OpenAI", "Description": "Hosted model endpoint" }
],
"Data": [
{ "Name": "Historical claims 2019-2024", "Description": "Internal, de-identified" }
],
"Models": [
{ "Name": "gpt-4o", "Version": "2024-08-06",
"SystemPrompts": [ { "systemPrompt": "You are a claims triage assistant." } ] }
],
"AgenticSystems": [
{
"name": "Triage workflow",
"framework": "langgraph",
"components": [
{ "id": "6f1c2a3e-0b7d-4c55-9a51-2d8e4f6a7b10", "name": "Intake agent", "model": "gpt-4o" },
{ "id": "a9e4d2c1-5f38-4b0e-8c27-71d3b6e9f402", "name": "Routing agent", "model": "gpt-4o" }
],
"relations": [
{ "type": "handoff",
"source": { "type": "component_node", "content": "6f1c2a3e-0b7d-4c55-9a51-2d8e4f6a7b10" },
"destination": { "type": "component_node", "content": "a9e4d2c1-5f38-4b0e-8c27-71d3b6e9f402" } }
]
}
]
}

Fixing Import Errors

The file is checked before anything is saved, and every problem is listed at once. If any error is found, nothing is saved. Fix every listed problem and import the file again.

Each error names its location using the file's structure. For example, Technologies[2].Name is the name of the third technology, because list positions start at 0.

[SCREENSHOT: Import BOM from JSON dialog after a failed validation, showing the list of errors with their file locations]

Message

How to fix it

The file is larger than the 5MB limit.

Remove components or descriptions you do not need.

The file is empty.

Check that you selected the right file.

The file is not valid JSON (line, position).

Fix the syntax at that spot. The cause is usually a missing comma, quote or bracket.

The file must contain a single bill of materials...

The top level must be one object { ... }, not a list.

... has a value of the wrong type

A value has the wrong type, for example text where a list belongs. Wrap single values in [ ].

... is required.

Add the missing field, for example a component's Name.

... must be N characters or fewer.

Shorten the value.

... must be a list. Use [] if there are none.

Replace null with [].

... is empty.

Remove the nullentry from the list.

... lists the same item more than once

Keep one of each name and version in that list. An unedited export can cause this error when a component was both added by hand and found by a scan.

... must be text in quotes, for example "2.0".

Put the version in quotes.

... lists the same language more than once

Remove repeated languages, including ones that differ only by case.

... must use only plain English letters, numbers and symbols

Use ASCII language names, for example python.

... has more than one component with the id ...

Give each agent in the system its own id.

... must be the id of one of this agentic system's components.

Point the component_node at an agent id in the same system.

The BOM is being scanned.

Wait for the scan to finish, then import again.

The BOM was imported, but some follow-up work did not finish...

The contents were replaced. Check the BOM, and start a vulnerability assessment if one did not begin. Do not import the file again.