sysml2kit
API-first Python tooling for building, querying, validating, and automating SysML v2 models.
Status: pre-alpha. The 0.4.x line covers the full loop: model, writer, interchange, queries, validation, diff, mermaid views, parse backend, MCP server, API client with a live-server harness, and multi-fidelity verification execution. The API may still move between minor versions; pin an exact version if you depend on it. Changes: CHANGELOG.md.
sysml2kit is the requirements/architecture/traceability layer for
engineering automation stacks: build a system model in Python, emit standard
SysML v2 textual notation and Systems Modeling API JSON, run traceability
queries (which requirements are unsatisfied? unverified? allocated where?),
validate, diff, and execute verification: analyses bound to registered
engines run for real, and their metrics check the model's requirements. It
targets the OMG SysML v2 standard, not any vendor tool. Docs:
https://jman4162.github.io/sysml2kit/
What it does
- Object model: a documented subset of SysML v2 (packages, parts, ports, attributes with units, requirements, satisfy/verify/derive/allocate, analysis cases) as pydantic models, with an opaque passthrough for elements outside the subset so richer models survive a round trip.
- Textual notation writer: deterministic
.sysmloutput. Parsing is delegated to a pluggable backend (pip install sysml2kit[parse]installs sysmlpy); the kit itself does not reimplement the grammar. - JSON interchange: read/write the Systems Modeling API serialization, the format the standard REST API speaks.
- Traceability queries: unsatisfied/unverified requirements, allocation tables, requirement-to-part trace matrices.
- Validation and diff: rule-based model checks and element-level diffs.
- Verification execution:
verificationBindingmetadata binds an analysis case to an engine from thesysml2kit.enginesentry-point group;sysml2kit verifyruns it and checks each requirement with margins, and can write results back into the model with provenance. Sibling bindings labeled withfidelity/costSecondsform a fidelity ladder:--policy allreports the cross-rung spread as an error bar,--policy escalate --budget-s Nspends a compute budget on the thinnest margins first, and every run records measured seconds per rung. The whole loop — bindings, verify links, policies — works from.sysmltext as well as JSON. - Mermaid views: ownership-tree and requirement-trace diagrams.
- MCP server: nine tools for agents (
sysml2kit mcp serve). - API client: a thin HTTP client for the OMG Systems Modeling API and Services endpoints, plus a docker compose harness running the pilot implementation for live round-trip testing.
Install
pip install sysml2kit # core: build, write, query, validate, diff
pip install "sysml2kit[parse]" # + read .sysml files (sysmlpy backend)
pip install "sysml2kit[graph]" # + NetworkX export
pip install "sysml2kit[mcp]" # + MCP server for agents
pip install "sysml2kit[verify]" # + YAML verification-binding configs
Quick start
from sysml2kit import Model, builder
model = Model()
pkg = builder.pkg(model, "Vehicle")
battery = builder.part(model, "battery", owner=pkg)
range_req = builder.req(
model,
"REQ-001",
"Range",
owner=pkg,
text="The vehicle shall travel at least 400 km on one charge.",
)
builder.satisfy(model, source=battery, target=range_req)
from sysml2kit.text import write_model
print(write_model(model)) # standard SysML v2 textual notation
from sysml2kit.query import unverified_requirements
print(unverified_requirements(model)) # [REQ-001] — no verify link yet
Architecture
sysml2kit
├── model # element classes, Model container, builder API
├── text # SysML v2 textual notation writer
├── interchange # Systems Modeling API JSON reader/writer
├── query # traceability queries
├── validation # rule-based checks (S2K001...)
├── diff # element-level model diff
├── views # mermaid diagrams (trace, tree)
├── verify # verification bindings, engine registry, runner
├── api # Systems Modeling API HTTP client
├── backends # parser backends (sysmlpy behind the [parse] extra)
├── interop # tool-agnostic requirement extraction
├── mcp # MCP server (behind the [mcp] extra)
├── graph, units, workspace # NetworkX export, pint helpers, path safety
└── cli # `sysml2kit` command line
The spec pin, element subset, and known deviations are documented in
SPEC.md. Reference spec release: OMG SysML-v2-Release tag
2026-05.
Domain content lives outside the kit. For antenna/RF systems engineering, see
sysml2kit-rf-library, a
SysML v2 model library consumed through this package. Downstream bridges are
merged in phased-array-systems
(interop.sysml: requirement sets and the phased-array-systems verification
engine) and aedl
(aedl.interop: bound-form requirements).
For agents
An MCP server ships behind the mcp extra with nine tools: model_show,
model_validate, model_diff, model_export, model_diagram,
requirements_trace, requirements_extract, requirements_verify, library_load. Artifacts are
returned as file paths, not payloads.
pip install "sysml2kit[mcp,parse]"
sysml2kit mcp serve # stdio; --transport http also supported
{"mcpServers": {"sysml2kit": {"command": "sysml2kit", "args": ["mcp", "serve"]}}}
The CLI covers the same operations for shell use:
sysml2kit show | validate | diff | export | fmt | verify | api | mcp serve
(export --to mermaid renders diagrams).
Development
uv sync --all-extras --group dev
uv run pytest # core suite (no extras needed)
uv run pytest -m parse # round-trip tests against sysmlpy
uv run ruff check . && uv run ruff format --check .
uv run mypy
scripts/slopcheck.sh # prose lint, advisory
uv run mkdocs serve # docs preview
Citation
@software{hodge2026sysml2kit,
author = {Hodge, John},
title = {sysml2kit: API-first Python tooling for SysML v2 models},
year = {2026},
url = {https://github.com/jman4162/sysml2kit},
license = {Apache-2.0}
}
License
Apache-2.0. See LICENSE and NOTICE. This project contains no code or model text from the EPL-2.0 OMG pilot implementation; conformance checks run it out of process only.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sysml2kit-0.4.0.tar.gz.
File metadata
- Download URL: sysml2kit-0.4.0.tar.gz
- Upload date:
- Size: 229.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26019265ae3461ea2ad94f3e1bf2f89c11e4af87971d834cb25bfa5a1e77123b
|
|
| MD5 |
0108dc0dae0572a1111990b8c13804a8
|
|
| BLAKE2b-256 |
fe3158ced041bd99997a252b3eb09bcd99ff0e7c4106c4a4660e86ecb15ddde5
|
Provenance
The following attestation bundles were made for sysml2kit-0.4.0.tar.gz:
Publisher:
release.yml on jman4162/sysml2kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sysml2kit-0.4.0.tar.gz -
Subject digest:
26019265ae3461ea2ad94f3e1bf2f89c11e4af87971d834cb25bfa5a1e77123b - Sigstore transparency entry: 2554240988
- Sigstore integration time:
-
Permalink:
jman4162/sysml2kit@6b08a91b07226c48e22cf80239b38b8b5d5dd0b2 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/jman4162
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6b08a91b07226c48e22cf80239b38b8b5d5dd0b2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sysml2kit-0.4.0-py3-none-any.whl.
File metadata
- Download URL: sysml2kit-0.4.0-py3-none-any.whl
- Upload date:
- Size: 74.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
505c7f820b9aa67cab91ef3095c62001be5960719a3c6682cb41695d9fae49c1
|
|
| MD5 |
b473fc1b5338ef37bb3eb7ead827bd19
|
|
| BLAKE2b-256 |
4d3bbb693dd9e439a6062b9a3361d1b097ea1ed5fb739c49f510919841b0e5bd
|
Provenance
The following attestation bundles were made for sysml2kit-0.4.0-py3-none-any.whl:
Publisher:
release.yml on jman4162/sysml2kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sysml2kit-0.4.0-py3-none-any.whl -
Subject digest:
505c7f820b9aa67cab91ef3095c62001be5960719a3c6682cb41695d9fae49c1 - Sigstore transparency entry: 2554241137
- Sigstore integration time:
-
Permalink:
jman4162/sysml2kit@6b08a91b07226c48e22cf80239b38b8b5d5dd0b2 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/jman4162
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6b08a91b07226c48e22cf80239b38b8b5d5dd0b2 -
Trigger Event:
push
-
Statement type: