Agentic XMI/UML to SDC4 data model converter
Project description
XMI2SDC
Agentic XMI/UML to SDC4 data model converter.
XMI2SDC converts enterprise UML models exported from Sparx Enterprise Architect, MagicDraw, and other tools into SDC4-compliant data models. It uses a multi-agent pipeline to parse, analyze, map, and assemble models via the SDCStudio Assembly API.
Built for air-gapped, self-hosted environments. No cloud dependencies required.
Agents
| Agent | Tools | LLM | Description |
|---|---|---|---|
| parser | 3 | No | Parse XMI files, auto-detect dialect, normalize to intermediate model |
| analyzer | 3 | Yes | Semantic analysis of class intent, inheritance, associations |
| mapper | 3 | Edge cases | Apply UML-to-SDC4 type mapping rules, produce mapping plan |
| reviewer | 2 | Yes | Review mapping completeness, generate conversion report |
| assembler | 3 | No | Execute mapping plan via SDCStudio Assembly API |
| orchestrator | -- | Yes | Multi-agent coordinator: parse, analyze, map, review, assemble |
Type Mapping
| UML Type | SDC4 Type | Notes |
|---|---|---|
| Boolean | XdBoolean | |
| Integer (non-negative) | XdCount | |
| Integer (signed) | XdQuantity | Integer restriction |
| Real / Float / Double | XdQuantity | |
| String | XdString | |
| Enumeration | XdString | Literals become enumerations |
| Date / DateTime / Time | XdTemporal | |
| Class (composite) | Cluster | |
| Composition association | Cluster containment |
Requirements
- Python 3.11+
- An LLM endpoint reachable via litellm, a frontier-model API key or a local model, for the LLM-assisted analysis and edge-case mapping steps.
- For
assembleonly: a reachable SDCStudio Assembly API (the hosted sdcstudio.axius-sdc.com or a self-hosted instance) plus an API key viaSDCSTUDIO_API_KEY(or--api-key).
convert (parse + map to a mapping plan) runs fully standalone; only assemble needs SDCStudio access.
Installation
# Install the package and its dependencies
pip install -e .
# Development (tests, linters)
pip install -e ".[dev]"
A requirements.txt mirroring the runtime dependencies is provided to build an environment directly: pip install -r requirements.txt.
Quick Start
Convert an XMI file
# Configure
cp xmi2sdc.example.yaml xmi2sdc.yaml
# Parse and map (produces JSON mapping plan)
xmi2sdc convert model.xmi
# Specify output path
xmi2sdc convert model.xmi -o mapping_plan.json
MCP Mode
Expose toolsets as MCP servers for LLM clients (Claude Code, Cursor, etc.):
xmi2sdc serve --mcp parser
xmi2sdc serve --mcp mapper
ADK Agent Mode
For standalone agent orchestration, a local LLM is required:
ollama pull qwen2.5:7b-instruct
# Agents use ollama/qwen2.5:7b-instruct by default via LiteLLM
CLI Commands
xmi2sdc convert FILE # Parse XMI and produce SDC4 mapping plan
xmi2sdc serve --mcp AGENT # Start MCP stdio server for an agent toolset
xmi2sdc info # Display config summary and agent inventory
xmi2sdc validate-config # Validate configuration file
xmi2sdc audit show # Display audit log with filters
Configuration
Create xmi2sdc.yaml:
sdcstudio:
base_url: "http://localhost:8000"
api_key: "${SDC_API_KEY}"
cache:
root: ".xmi2sdc-cache"
audit:
path: ".xmi2sdc-cache/audit.jsonl"
log_level: "standard" # or "verbose"
output:
directory: "./output"
Environment variables in ${VAR} syntax are substituted at load time. Missing variables cause an immediate error (fail closed).
Supported Dialects
- Generic XMI 2.x -- Standard OMG XMI exports
- Sparx Enterprise Architect -- Auto-detected via
sparxsystems.comnamespace - MagicDraw / Cameo -- Auto-detected via
nomagic.comnamespace
Dialect is detected automatically from namespace declarations in the XMI file. All dialects normalize to the same ParsedXmiModel intermediate representation.
Docker
docker build -t xmi2sdc .
# MCP server mode
docker run -v $(pwd)/xmi2sdc.yaml:/home/sdc/xmi2sdc.yaml:ro \
-e XMI2SDC_AGENT=parser \
xmi2sdc
# CLI mode
docker run -v $(pwd)/xmi2sdc.yaml:/home/sdc/xmi2sdc.yaml:ro \
xmi2sdc info
Development
Branch Workflow
main: Production code (protected, PR required)dev: Active development
All work happens on dev. Create a Pull Request to merge into main.
Testing
pip install -e ".[dev]"
pytest
# With coverage
pytest --cov=xmi2sdc --cov-report=term-missing
Linting
ruff check src/ tests/
black --check src/ tests/
Architecture
XMI File ──> Parser Agent ──> ParsedXmiModel ──> Mapper Agent ──> Mapping Plan JSON
|
v
Conversion Report <── Reviewer <── Assembler ──> SDCStudio API
The pipeline separates deterministic operations (parsing, type mapping) from LLM-assisted operations (semantic analysis, edge-case resolution). If any stage fails, earlier results are cached and the pipeline can resume without re-processing.
Contributing
See CONTRIBUTING.md for development guidelines and contribution workflow.
Security
See SECURITY.md for the security policy and vulnerability reporting process.
Related Projects
- SDCStudio — the SDC4 data model platform and Assembly API provider that XMI2SDC targets.
- SDC repositories — the open-source SDC ecosystem (validators, agents, and tooling).
License
Apache License 2.0. Copyright 2026 Axius SDC, Inc. See LICENSE and NOTICE.
Project details
Release history Release notifications | RSS feed
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 xmi2sdc-4.0.0.tar.gz.
File metadata
- Download URL: xmi2sdc-4.0.0.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
596dcaab1673625174b65dcaf5f2f0c5710c54eed98510423481b7f1f32365aa
|
|
| MD5 |
14e1d9778eaf8a63559572bedcc42551
|
|
| BLAKE2b-256 |
96244313060d182c3e4becea52b9e58d3d83e5e9237bfdd35080cfa145d84af3
|
Provenance
The following attestation bundles were made for xmi2sdc-4.0.0.tar.gz:
Publisher:
release.yml on SemanticDataCharter/XMI2SDC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xmi2sdc-4.0.0.tar.gz -
Subject digest:
596dcaab1673625174b65dcaf5f2f0c5710c54eed98510423481b7f1f32365aa - Sigstore transparency entry: 1972970160
- Sigstore integration time:
-
Permalink:
SemanticDataCharter/XMI2SDC@d90f1d2879bcef4c55709badcbdd8f6cdea96f64 -
Branch / Tag:
refs/tags/v4.0.0 - Owner: https://github.com/SemanticDataCharter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d90f1d2879bcef4c55709badcbdd8f6cdea96f64 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xmi2sdc-4.0.0-py3-none-any.whl.
File metadata
- Download URL: xmi2sdc-4.0.0-py3-none-any.whl
- Upload date:
- Size: 39.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdf39556501878ea2693a53168490f2aed8b4f3914620da8f62c9c26d3a21bfd
|
|
| MD5 |
8f6be194bf8c9336b603aef54b9ed165
|
|
| BLAKE2b-256 |
ea26222d08e5daf4473d28450a4a0723db44f1d563a94f275a5b78e24078947a
|
Provenance
The following attestation bundles were made for xmi2sdc-4.0.0-py3-none-any.whl:
Publisher:
release.yml on SemanticDataCharter/XMI2SDC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xmi2sdc-4.0.0-py3-none-any.whl -
Subject digest:
cdf39556501878ea2693a53168490f2aed8b4f3914620da8f62c9c26d3a21bfd - Sigstore transparency entry: 1972970279
- Sigstore integration time:
-
Permalink:
SemanticDataCharter/XMI2SDC@d90f1d2879bcef4c55709badcbdd8f6cdea96f64 -
Branch / Tag:
refs/tags/v4.0.0 - Owner: https://github.com/SemanticDataCharter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d90f1d2879bcef4c55709badcbdd8f6cdea96f64 -
Trigger Event:
push
-
Statement type: