Build your SysML v2 model together with your AI agent. SysMLv2 Modeler Early Access Version is a Visual Studio Code (VS Code) extension for MBSE that lets you and your AI agent work on the same model, in text and on diagrams.

This guide uses the included sample, a small delivery robot, to walk you through the basics in three steps: exploring the model, connecting your AI agent, and editing with AI and by hand. The sample contains ten diagrams that cover all eight standard SysML v2 view kinds.


1. Installation

System requirements

Before installing, make sure your computer runs on one of the supported platforms.

Supported platforms Windows (x64), macOS (Apple Silicon), and Linux (x64). Windows on ARM64 and Intel-based Macs are not supported.

Install VS Code

If you don’t have VS Code yet, follow the instructions in Download and install Visual Studio Code.

Install SysMLv2 Modeler Early Access Version

  1. Start VS Code and open the Extensions view from the Activity Bar on the left (the four-squares icon, ⌘/Ctrl+Shift+X).
  2. Click … at the top right of the Extensions view → Install from VSIX…, and select the .vsix file you received.
    The Extensions view with the … menu open and Install from VSIX… highlighted
  1. The first time you open a folder that contains .sysml files (or first use a feature of the extension), you are asked to accept the license agreement. Review it and accept. If you’re asked to reload the window, follow the prompt.
  2. When the SysML v2 icon appears in the Activity Bar, you’re done.
The SysML v2 icon in the Activity Bar, with the SysML v2 Models view open

Disable other SysML v2 extensions. If another SysML v2 or KerML extension (for language support, syntax highlighting, and so on) is installed, it may take over .sysml files, and SysMLv2 Modeler may not work correctly. When SysMLv2 Modeler starts, it tells you the name of any other SysML extension that is enabled.

To fix this, type sysml in the Extensions view search box, disable (or uninstall) every SysML-related extension except SysMLv2 Modeler Early Access Version, and reload the window.


Open the sample model

  1. Copy the entire sample folder included with this guide to a working folder.
  2. In VS Code, choose File → Open Folder… and select the copied sample folder.
  3. When VS Code asks “Do you trust the authors of the files in this folder?”, choose Yes, I trust the authors. The extension doesn’t run in Restricted Mode, which VS Code uses for folders you don’t trust.
  4. Click the SysML v2 icon in the Activity Bar. The sample appears in the Model Tree. The first time, this may take up to a minute while the standard library loads.
The sample folder open in VS Code, with the Model Tree on the left and MiniRobot.sysml in the editor

What’s in the sample A delivery robot simplified to four parts (sensor, controller, drive, and battery), three requirements (Payload, StopForPeople, and Endurance), three behaviors (Deliver, DrivingState, and StopSequence), and a 3D outline. The MiniRobotViews package contains ten diagrams (view declarations).


2. Exploring a model

You can explore the same model in three ways: as text, in the Model Tree, and on diagrams.

As text

Open MiniRobot.sysml from the Explorer or the Model Tree to see the model as SysML v2 text.

MiniRobot.sysml in the editor, with PersonSensor selected in part sensor : PersonSensor
With the cursor on PersonSensor, press F12 to go to its definition.

Use these commands to navigate the text.

TaskHow
Go to a definitionF12 or ⌘/Ctrl+click
Go backCtrl+- (macOS), Alt+← (Windows), Ctrl+Alt+- (Linux)
Find where an element is usedRight-click → Find All References
List all elements in a fileOutline view
Find an element by name and jump to it⌘/Ctrl+Shift+O (Go to Symbol in Editor). A list appears at the top of the window. Type to filter it.
See an element’s descriptionHover over its name

In the Model Tree

The Model Tree shows the model in the open folder, organized by ownership. Double-click an element to open it in the text editor, or right-click it and choose Open Diagram to see it on a diagram.

The Model Tree with the sample expanded to DeliveryRobot, and its right-click menu showing Open in Text Editor and Open Diagram

On diagrams

There are two ways to open a diagram.

A. From a view declaration (a saved diagram)

The MiniRobotViews package at the end of the sample contains view declarations such as view structure : StandardViewDefinitions::InterconnectionView { expose …; }. A view declaration saves what the diagram shows, so it opens with the same contents every time. To save the layout as well, switch to manual layout (see Saving diagrams).

To open one, click Open Diagram above the declaration in the editor.

MiniRobot.sysml in the editor, with Open Diagram links shown above the MiniRobotViews package and each view declaration

Or double-click the view in the Model Tree. You can also right-click the view and choose Open Diagram.

The views under MiniRobotViews in the Model Tree, with the right-click menu on requirements showing Open in Text Editor and Open Diagram
The views are listed under MiniRobotViews in the Model Tree.

B. From a model element (a temporary diagram)

Place the cursor on an element in the text (for example, part def DeliveryRobot) and press ⌘/Ctrl+Shift+V. Or right-click the element in the Model Tree and choose Open Diagram.

A list appears at the top of the window, in two groups:

  • Existing diagrams (upper group): saved diagrams that already show the element, such as the ones in A. Choose one to open it.
  • Create a new diagram (lower group): diagram kinds, such as InterconnectionView and StateTransitionView. Only the kinds that suit the element are listed. Choose one, and a diagram centered on that element opens right away.
The Open Diagram picker for DeliveryRobot, listing existing diagrams and the diagram kinds InterconnectionView, SequenceView, and GeneralView

This new diagram isn’t saved yet. If you close it without saving, it’s discarded. To keep it, right-click its background and choose Save This Diagram to .sysml (Add View Declaration).
The diagram is saved as a view declaration. (This menu item doesn’t appear on diagrams that are already saved.)

An InterconnectionView of DeliveryRobot with the right-click menu open and Save This Diagram to .sysml (Add View Declaration) highlighted

From a diagram back to the text

Press F12 in a diagram to go back to the text. If an element is selected, you jump to its declaration. If nothing is selected, you jump to the diagram’s view declaration.

Views in the sample

The sample contains ten diagrams that cover all eight standard SysML v2 view kinds. GeneralView is used three times.

requirements GeneralView
requirements GeneralView
Requirement text, constraints, and subject.
robotDefinition GeneralView
robotDefinition GeneralView
Definitions and parts as a general graph.
structure InterconnectionView
structure InterconnectionView
Parts, ports, and flows.
deliveryFlow ActionFlowView
deliveryFlow ActionFlowView
The order of actions.
drivingStates StateTransitionView
drivingStates StateTransitionView
States and transitions.
stopSequence SequenceView
stopSequence SequenceView
Messages exchanged between parts.
traceMatrix GridView
traceMatrix GridView (beta)
Which part takes on which requirement (allocate).
partsTree BrowserView
partsTree BrowserView
The ownership hierarchy as a tree.
outlineShape GeometryView
outlineShape GeometryView
3D shapes and their placement, using the Geometry library.
satisfactionAndAllocation GeneralView
satisfactionAndAllocation GeneralView
The system satisfies the requirements; the parts take them on (allocate).

The system satisfies, the parts take on The subject of the requirements is DeliveryRobot, so the system itself satisfies them (satisfy). Which part takes on a requirement is a design decision, shown with allocate. A requirement can be allocated to several parts.

Zooming and panning

TaskHow
Zoom in or out⌘/Ctrl+wheel or trackpad pinch, ⌘/Ctrl+= / ⌘/Ctrl+-, or + / − on the panel at the bottom left
Reset to 100%⌘/Ctrl+0, or click the zoom percentage on the panel
Fit the diagram to the window⌘/Ctrl+9, or ⛶ on the panel
PanThe wheel scrolls up and down, and Shift+wheel scrolls sideways. You can also drag with Space held down, or with the middle or right mouse button, or drag the frame in the minimap at the bottom right.
Select an areaDrag the background with the left mouse button
A whole diagram with the zoom and layout panel at the bottom left and the minimap at the bottom right
Bottom left: zoom, fit, layout mode (auto or manual), auto layout, and more. Bottom right: minimap. Top right: button to open the palette

3. Connecting your AI agent

Connect the AI agent you use through MCP (a standard way to give AI agents access to tools). You’re not tied to any particular AI service. The connected AI can see the open diagram (as an image and as structure), your current selection, and the model structure. It can explain them, and when you ask for a change, it edits the .sysml files directly.

How your design data is handled

  • The model stays in your local .sysml files. It leaves your computer only through features you start yourself, such as AI integration and the @sysml chat.
  • AI agents connect through a local connection that only your own user account on this computer can open. No network port is opened by default.
  • What you show the connected AI is handled according to that AI service’s terms. Connect only AI services approved by your organization.

① Turn on MCP

In Settings (⌘/Ctrl+,), search for sysmlv2-modeler.mcp.enabled and select the checkbox (off by default).

VS Code Settings searched for sysmlv2-modeler.mcp.enabled, with the Mcp: Enabled checkbox selected

② Talk to it in GitHub Copilot Chat

With GitHub Copilot in VS Code, there’s nothing to register. Once you turn on MCP in ①, you can use it right away.

  1. Open Copilot Chat (the chat button in the title bar, or ⌃⌘I / Ctrl+Alt+I).
  2. Below the input box, set the mode to Agent. The SysML tools are available only in Agent mode.
The Copilot Chat input box with the mode set to Agent
  1. Ask “Open the structure diagram.”
  2. The first time a SysML tool is used, Copilot asks Allow tool from SysMLv2 Modeler?. Click Allow in this Session (it asks once for each tool, and again when you start a new conversation).
Copilot Chat asking Allow tool from SysMLv2 Modeler? for the Open Diagram tool, with Allow in this Session highlighted
  1. If the diagram opens, you’re connected.
The structure diagram opened in VS Code, with Copilot Chat confirming that it opened the diagram

Then try asking:

  • “Look at this diagram and explain what the controller does.” — the AI reads the open diagram and explains it.
  • “What have I selected?” (select an element in a diagram first) — the AI reads your selection.

If the AI answers without using the tools Some models try to answer by searching files or running commands instead of calling the SysML tools. If that happens, switch the model below the input box (for example, to Claude Sonnet). If MCP isn’t available with your organization’s account, ask your administrator to check the Copilot MCP settings.

Using other AI agents

To use an AI agent other than Copilot, such as Claude Code or Codex, register it once first. If you use only Copilot, you can skip this section.

  • Claude Code or Codex (in a terminal or as a VS Code extension):
  1. Open the Command Palette (⌘/Ctrl+Shift+P) and run SysML: Show MCP Connection Information.
The Command Palette with SysML: Show MCP Connection Information highlighted
  1. Click Copy Registration…, then choose Claude Code (or Codex). The registration command is copied.
The MCP Connection Information dialog with Copy Registration... highlighted
  1. Open a terminal, then paste and run the command. You only need to do this once; the same registration works for every workspace.
    On Windows, run it in PowerShell or Command Prompt (Git Bash changes the command). If the VS Code installation path contains & or parentheses, choose the registration listed first under Starts VS Code directly (recommended for this path) in Copy Registration… (register again if you move VS Code to another folder).
  • Other agents: follow your agent’s documentation and register the following as an MCP server.
ItemValue
TypeMCP server (stdio)
CommandRun SysML: Show MCP Connection Information and use the command on the Bridge line
NameAny name (for example, sysmlv2)
RequirementThe AI agent must run on this computer

Open the folder in VS Code first, then start the AI agent.

  • Which VS Code window the AI connects to is decided when the AI agent starts. Start the agent in the workspace’s folder (or a subfolder): it connects to the window that has that folder open.
  • If you start the agent somewhere else, it connects to the VS Code window when only one window is open. With several windows open it doesn’t guess, and the tools stay unavailable; start the agent in the folder of the workspace you want.
  • The window doesn’t change until you restart the agent. To work on another workspace, open it in VS Code and start the agent again in that folder.
  • If you started the agent before opening the folder in VS Code, open the folder and then reconnect the MCP server (in Claude Code, use /mcp).

After registering, start a new AI conversation. Many AI agents load MCP registrations when a conversation starts, so a conversation that was already open can’t use the new connection. In Claude Code, type /mcp in a new conversation. When sysmlv2 shows as connected, you’re ready.

Environments that can’t connect The MCP server accepts connections only from this computer, so AI agents that run only on another computer or in the cloud (such as an AI you use only in a browser) can’t connect. Other users of this computer can’t connect: the connection can be opened only by your own user account.


4. Editing a model

You can create a new model, or edit an existing one in three ways: ask AI, edit the text, or edit the diagram. All three change the same .sysml text.

Create a new model (.sysml)

When there is no model (.sysml) yet

  1. Open an empty folder, then click the New Model or Diagram button (the file icon with ⊕, shown when you hover over the tree) at the top of the Model Tree.
  2. In “What do you want to start from?”, pick a starting point. GeneralView starts blank; the other four (InterconnectionView, ActionFlowView, StateTransitionView, SequenceView) start with a template.
The New Model or Diagram button at the top of the Model Tree and the list of starting points: GeneralView, InterconnectionView, ActionFlowView, StateTransitionView, and SequenceView
  1. Choose a file name. The .sysml file is created and its diagram opens. From there, open the palette with the button at the top right of the diagram and place elements.
A new model.sysml file and its empty diagram, with the palette open showing the Place, Attach, and Connect groups

Adding a diagram to an existing .sysml

  1. In the Model Tree, select the package that should hold the diagram.
  2. Click New Model or Diagram at the top of the tree (or right-click the package → New SysML Diagram…) and choose the kind and a name.
  3. A container element (for a SequenceView, an occurrence def) and a view declaration are added to the package, and a diagram with a template opens.

You can also ask AI. Ask something like “Create a structure diagram of a cleaning robot from scratch,” and the AI writes the .sysml and the view declaration for you.

Ask AI

The easiest way to edit is to describe the change to the AI (set up in Connecting your AI agent). The AI edits the .sysml file, and open diagrams update immediately.

  • “If the required run time in Endurance (R3) were 10 hours, would the current battery be enough?”
  • “Add motor and brake parts to the drive, and show them in the structure diagram.”
  • “Add a charging state to DrivingState with transitions to and from idle.”

Check the result. After the AI makes a change, ask “Check for problems.” The AI reads the editor’s diagnostics (the same errors shown as red squiggles) and reports them.

Work back and forth with the AI. This is how the tool is meant to be used. For example, ask the AI to “add a motor and a brake to the drive,” tidy up the layout and names on the open diagram yourself, and then ask the AI, “Look at the structure diagram. Are any connections missing?” Whoever makes the changes, and in whatever order, the same .sysml keeps growing.

Edit the text

These features help you as you edit models in text:

  • Completion: suggestions appear as you type (press Ctrl+Space if they don’t). For example, type battery. to see its ports.
  • Checks as you type: errors show as red squiggles and are listed in the Problems panel (⌘/Ctrl+Shift+M).
  • Rename: put the cursor on a name and press F2. The declaration and every reference to it change together.
  • Formatting: right-click anywhere in the text editor and choose Format Document.
// Example: add a brake inside DeliveryRobot
part brake : DriveUnit;

Your edits appear in open diagrams right away (you don’t need to save).

Edit the diagram

InterconnectionView with the palette open
The palette, opened with the button at the top right. Items are grouped into Quick, Place, Attach, and Connect.
TaskHow
Add an elementDrag a palette item onto the diagram (or select it, then click the diagram). Dropping it inside a part creates it inside that part.
Draw a relationshipChoose a kind under Connect, then click the source and the target. Flows between ports work too.
Change a name or valueSelect it and press F2 (or double-click the label). References in the text change too.
Add quicklyWhen you select an element, a small command bar (the quick palette) appears nearby, with shortcuts for relationships, navigation, and other commands.
DeleteDelete. It is removed from the text as well.
Move and alignDrag (alignment guides appear and snap). Select several and press Alt+Shift+arrow keys to align.

Elements keep moving? In auto layout mode (the default), the diagram rearranges itself every time you add an element. Click Pause Auto Layout (⏸) on the panel at the bottom left to stop this, and click it again to resume.

The panel at the bottom left of a diagram, with the Pause Auto Layout button highlighted

Save from the text tab. Edits made on a diagram go first into the (unsaved) .sysml text. Press ⌘/Ctrl+S in the text tab to save them.


5. Good to know

.sysml files and the model

  • The text is the source of truth: the model is the text of the .sysml files (the standard SysML v2 textual notation). Diagrams draw that text, and diagram layout is also stored inside the view declarations.
  • One folder, one model: all .sysml files in the opened folder are loaded together and can refer to each other. .project.json marks the folder as a project.
  • Standard library: packages such as ISQ::* (quantities) and SI::* (units) come from the bundled standard library.
  • It’s plain text: diffs, reviews and history in git work just as they do for source code.

When in doubt, ask AI

If you’re unsure how to write something in SysML v2, asking AI is the shortcut: “What’s the difference between satisfy and verify?”, “Write a test case that verifies this requirement”, “Which parts are not on this diagram?”. The AI reads the model structure and the diagram on screen, and can confirm its edits against the editor’s diagnostics.

Auto and manual layout

Switch the layout mode on the panel at the bottom left of a diagram.

ModeBehaviorGood for
Auto (default)Rearranges the whole diagram whenever elements are added or removed. Layout is not written back to the .sysml.Building up a model; checking its structure
ManualExisting elements never move automatically; only newly added elements are placed. Positions are saved in the view declaration, so the diagram opens the same way next time.Finishing diagrams for documents

In either mode, Auto Layout on the panel (⌘/Ctrl+Shift+L) rearranges once. Click the Auto layout and display settings button on the panel to choose the layout algorithm, direction, spacing, and edge routing (Orthogonal, Polyline, or Splines) for each diagram.

The Auto layout and display settings button on the panel at the bottom left, with its settings open: algorithm, direction, spacing, port labels, and edge routing

View declarations and expose

Diagrams are written as view declarations in the .sysml. The expose lines decide which elements appear.

view structure : StandardViewDefinitions::InterconnectionView {
    expose MiniRobot::DeliveryRobot;      // show this element (and its contents)
}
view requirements : StandardViewDefinitions::GeneralView {
    expose MiniRobot::Payload;            // you can list elements one by one
    expose MiniRobot::StopForPeople;
}
view everything : StandardViewDefinitions::GeneralView {
    expose MiniRobot::*;                  // everything directly in the package
}
  • The : …View part is the kind of diagram. There are eight kinds: GeneralView, InterconnectionView, ActionFlowView, StateTransitionView, SequenceView, GridView, BrowserView, and GeometryView.
  • The label at the top left of a diagram’s frame shows the view’s name and kind. The box at the top right lists its exposes.
The frame label «view» MiniRobotViews::requirements : GeneralView at the top left, and the box listing three expose lines at the top right
  • To add a new diagram, see Create a new model (.sysml).
  • Put view declarations in a package of their own (like MiniRobotViews in the sample) to keep the model tidy.

Saving diagrams

You can save a diagram at two levels:

What is savedHowNext time you open it
Declaration only
(what the diagram shows)
On a diagram opened from a model element (see On diagrams), right-click the background → Save This Diagram to .sysml (Add View Declaration). A view with its exposes is written.It opens with the same elements. The layout is computed by auto layout each time.
With layout
(positions, sizes, edge shapes)
Switch the view’s diagram to manual layout, arrange it, then press ⌘/Ctrl+S in the text tab. Layout is written inside the view declaration.It opens exactly as you arranged it.

Positions moved in auto layout are not saved. In auto layout mode, moving elements changes only the screen, not the .sysml. When you reopen the diagram, the auto layout returns. To keep a layout, switch to manual layout first.

Switching from manual to auto layout deletes the saved layout. You’re asked to confirm first, and you can undo it with ⌘/Ctrl+Z.

Compartments

The sections separated by horizontal lines inside an element are compartments. They group an element’s contents by kind, such as attributes, parts, ports, doc, and require constraints (see Views in the sample).

The Payload requirement with four compartments: doc, attributes, subject, and require constraints
  • To choose which compartments an element shows, select it and use the compartment button in the quick palette, or right-click it and choose Compartments….
  • To edit a compartment row directly, select it and press F2 (for example, the battery’s capacity = 880 [W * h] in the structure diagram).

GridView (trace matrix) (beta)

A GridView shows model elements and relationships as a table. The sample’s view traceMatrix is a matrix of requirements (rows) and the parts and behaviors (columns) that take them on (allocate).

  1. Open the traceMatrix view (under MiniRobotViews in the Model Tree). It opens as a matrix.
  2. Double-click an empty cell to add that allocation. It’s added inside DeliveryRobot as an allocation. You can also write it in the text, such as allocate Payload to battery;, or ask AI: “Also allocate R1 to the battery.”
  3. Double-clicking a marked cell removes that allocation from the text.
  4. To see the data as a list (a table with attributes as columns), switch views on the panel at the bottom left.
  5. Click the table to select it, press ⌘/Ctrl+C, and paste it into Excel or another spreadsheet.

Why it opens as a matrix A view opens as a matrix when its declaration includes render ChangeVisionRenderings::asMatrix;. The rows, columns, and relationship types are set by GridSettings in the same view declaration.

Copying and exporting diagrams

TaskHow
Copy the whole diagram as an imageWith nothing selected, ⌘/Ctrl+C → paste into slides or documents
Copy part of itSelect elements, then ⌘/Ctrl+C (only the area around them)
Export an SVG or PNG fileRight-click the diagram → Export as SVG or Export as PNG. You can also use … at the top right of the diagram tab → Diagram, or SysML Diagram: Export as SVG in the Command Palette. SVG stays sharp at any size.
Black and white for documents◐ on the panel (diagram theme: dark → light → mono), or the sysmlv2-modeler.diagramTheme setting

Learning more about SysML v2

This extension follows the official SysML v2 release 2026-09.1 (SysML 2.1 Beta 2).

ResourceWhere
Specification (OMG)omg.org/spec/SysML
Specification PDFs (the version this extension follows)The doc folder of the official release
Official sample modelssysml/src/examples (examples by topic)
Training examplessysml/src/training (short examples, one notation at a time)

Open an official sample folder with this extension to view it as diagrams or have your AI explain it.


Troubleshooting

SymptomWhat to check
Opening a .sysml file shows no “Open Diagram”, the Model Tree is empty, or completion doesn’t workIs another SysML v2 extension active? Search for sysml in the Extensions view, disable everything except SysMLv2 Modeler Early Access Version, and reload (see the note under Installation). You can also click the language mode in the status bar (bottom right) to see which extension’s language is in use.
No SysML v2 icon in the Activity BarDid you trust the folder? (If “Restricted Mode” appears at the top of the window, click it and choose Trust.) Did you accept the license agreement (and reload the window if you were asked to)? Did you open a folder (Open Folder…, not a single file)?
The AI can’t see the modelDid you turn on MCP in Settings? In Copilot: is the mode Agent, did you allow the tools, and if the AI doesn’t use them, did you switch the model? (Talk to it in GitHub Copilot Chat) With other AI agents: did you register it, and did you open the folder in VS Code before starting the agent? (Using other AI agents)

If that doesn’t help, contact us.

Contact, feedback, requests and bug reports

Impressions, feature requests (“I wish it did…”), questions about how to use it, and bug reports all go to the same place. Good news and pain points are equally welcome.

Send them using the feedback form on the Early Access page.

From inside VS Code, you can also use SysML: Send Feedback / SysML: Report a Problem in the Command Palette (⌘/Ctrl+Shift+P).

When reporting a bug, besides what happened, what you expected and the steps, a small .sysml that reproduces it or an image of the diagram (copy with ⌘/Ctrl+C) makes the investigation much faster.

Read the license agreement any time with SysML: Show License Agreement in the Command Palette. Diagram images were drawn from the sample model by the actual extension.