Docs / AI Agents / Model Schema

Model Schema

The canonical JSON Schema defining the structure of a Modellus model file. Use this schema for validation, code generation, and as the authoritative reference when building or interpreting models.

View the full Model Schema JSON — JSON Schema (Draft-07), 1686 lines.

Top-Level Structure

A model file is a JSON object with two required fields and several optional ones:

FieldTypeDescription
propertiesModelPropertiesSimulation settings: independent variable, initial values, cases, angle unit, metadata
boardBoardArray of shapes placed on the canvas
preloadedDataPreloadedDataExternal CSV data loaded into calculator terms
outlierIterationsOutlierIterationsIterations flagged as outliers during analysis
regressionTermsRegressionTermsRegression results computed from table selections

ModelProperties

PropertyTypeDescription
namestringModel title
descriptionstringBrief description of the model's purpose
instructionsstringMarkdown instructions shown to users
independentobject{ name, start, end, step } — the simulation variable and its range
angleUnit"radians" | "degrees"Unit for all trigonometric functions
casesCountintegerNumber of independent simulation cases
initialValuesByCaseobjectMap of case number → { termName: initialValue } for differential terms

Board & Shapes

The board field is an array of shape objects. Each shape has:

FieldDescription
typeShape class name (e.g., "ExpressionShape", "ChartShape")
idUUID uniquely identifying the shape
propertiesShape-specific configuration (position, terms, display settings)
parentParent shape ID (for children of ReferentialShape)

Agent Guidance Sections

The schema includes documentation-only sections under agentGuidance that provide step-by-step instructions for AI agents:

SectionPurpose
readingAModel8-step walkthrough for interpreting an existing model file
identifyingTheSciencePattern-matching guide to infer scientific principles from ODE structure
buildingAModel7-step procedure for constructing a new model from a science intent
stepSizeGuidanceHow to choose the integration step for numerical stability

Shape Roles

The shapeRoles section documents the semantic purpose and configuration of each shape type — what properties to set and how they interact with the calculator system.

Model Templates

The modelTemplates section provides complete specifications for common STEM problems (free fall, projectile motion, SHM, Lotka-Volterra, SIR model, etc.) that agents can use as construction blueprints.