← Back to Autonomy
Monograph · Agentic AI × Simulation Engineering

The Physics Sandbox:
Grounding Agentic AI in Executable Reality

An architecture for connecting high-fidelity physics simulation to LLM agents over MCP — so that hypotheses are tested, not hallucinated.

By · Majid Mazouchi Domain · VHM, diagnostics & prognostics, propulsion Stack · MCP · FMI/FMU · Simscape · GT-SUITE · Python Format · Interactive figures, practical notes, references
01 · Motivation

Why agents need a physics oracle

Large language models reason by predicting plausible text. Engineering decisions, however, are judged by physics — and plausibility is not correctness. A torque ripple estimate, a thermal derating threshold, or a fault signature can sound right while being quantitatively wrong.

The physics sandbox closes this gap by giving the agent a verification oracle: a simulation backend it can call as a tool. Instead of asserting "reducing the cooling flow 20% keeps winding temperature within limits," the agent proposes the hypothesis, runs the experiment, reads a structured verdict, and only then commits to a decision. The pattern echoes what made search-plus-evaluation systems like AlphaGo effective: cheap, trustworthy rollouts of candidate ideas [10], and what NVIDIA's Eureka demonstrated for LLMs specifically — language-model proposals scored inside a physics simulator outperformed human-engineered designs [9].

The loop is deliberately simple:

The core loop Hypothesize → Configure → Simulate → Interpret → Decide. The LLM owns steps 1 and 5. The sandbox owns steps 2–4. Every claim that crosses back into the agent's reasoning carries a number and a pass/fail verdict, not vibes.

For Vehicle Health Management this is unusually well-matched: diagnosis is hypothesis testing. "Is this current signature consistent with bearing wear or with a winding short?" is a question a plant model with fault injection can answer in seconds — long before a test cell is booked.

02 · Architecture

Three layers, one protocol

The Model Context Protocol (MCP) [1] is the natural seam: the agent (VS Code Copilot, Claude Code, or any MCP client) sees a small vocabulary of experiment-level tools; the MCP server translates them into solver-level operations; the backends do physics. The agent never touches a solver API directly.

FIG. 1Sandbox architecture over MCPtap a block
REASONING PROTOCOL PHYSICS LLM Agent · VS Code Copilot / Claude Code plans experiments · interprets verdicts · escalates fidelity MCP tools / results (JSON) Sandbox MCP Server run_doe() · inject_fault() · check_constraints() · linearize() · compare_baseline() model registry · result post-processing · budget & license governor Tier 1 · Fast FMU / FMPy · CasADi SciPy · MuJoCo Tier 2 · System Simscape · OpenModelica Dymola Tier 3 · High-fidelity GT-SUITE · PyAnsys COMSOL · CFD
Tap any block in the diagram to see what it owns, and what it must never own.
The protocol layer is where most of the engineering value lives. Tool names define the agent's vocabulary — and therefore the granularity of its thinking.
Design rule Expose experiments, not solver primitives. If the tool list reads set_param / run / get_signal, the agent will flail through low-level plumbing. If it reads run_doe / inject_fault / check_constraints, the agent reasons at the level where engineering judgment actually happens. The tool schema is the agent's epistemology.
03 · The Conversation, Concretely

Copilot ↔ MCP server ↔ MATLAB/Simscape

Figure 2 makes the abstraction concrete: one complete experiment, message by message, between the agentic framework inside VS Code Copilot, the sandbox MCP server (a Python process speaking JSON-RPC over stdio), and a persistent MATLAB Engine session running a Simscape harness model. Step through it — each hop shows the actual payload that crosses that boundary, which is exactly what you would show an audience to make the idea tangible.

FIG. 2One experiment, end to end — sequence of messagesstep through it
Copilot Agent VS Code · agent mode Sandbox MCP Server Python · JSON-RPC / stdio MATLAB Engine persistent session · Simscape 1· initialize + tools/list (handshake) 2· advertise experiment vocabulary 3· plan: bisection over I 4· tools/call: run_experiment(...) 5· validate · budget · registry 6· Engine API: parameterize + sim() 7· Simscape solves the network 8· simlog → post-process → verdict 9· structured result (JSON) 10· interpret → next experiment, or memo
step 0 / 10
READYPress Step to walk one experiment across all three layers.
// payloads appear here, hop by hop
Each hop below shows the real artifact that crosses that boundary: JSON-RPC on the left seam, MATLAB Engine calls on the right seam, physics in the middle of nowhere visible — which is the point.
Two seams, two languages. Copilot–server speaks MCP JSON-RPC; server–MATLAB speaks the Engine API. The agent never sees MATLAB, and MATLAB never sees the LLM — the server owns translation, validation, budget, and provenance on every crossing.
Why a persistent engine session matters MATLAB startup costs ~10–30 s; matlab.engine.start_matlab() once at server boot, then keep the harness model loaded with fast restart enabled. Subsequent sim() calls skip compilation, dropping per-experiment latency from tens of seconds to roughly the solver time itself — the difference between an agent that explores and one that waits.
04 · The Economics of a Run

Tiered fidelity: explore cheap, verify expensive

Agents iterate fast; high-fidelity solvers do not. A single CFD or stiff electro-thermal run can cost minutes to hours, while an agent's inner loop wants hundreds of evaluations. The resolution is a fidelity ladder: reduced-order and FMU surrogates for exploration, full-fidelity runs reserved for the shortlisted candidates — the same pattern as a neural-network flux-map surrogate standing in for FEA during calibration.

FIG. 3Fidelity ladder explorerdrag the slider
screening

Tier 1 · Surrogate

FMU via FMPy, CasADi/SciPy ODEs, MuJoCo. License-free, in-process. latency ≈ ms–s · ~10³–10⁴ runs/hr role: hypothesis screening, DOE sweeps

Tier 2 · System model

Simscape / Modelica acausal networks. Faithful dynamics, stiff solvers. latency ≈ s–min · ~10¹–10² runs/hr role: candidate validation, fault studies

Tier 3 · High fidelity

GT-SUITE, PyAnsys FEA/CFD, COMSOL. Geometry-resolved truth. latency ≈ min–hrs · ~10⁰–10¹ runs/hr role: final verification, sign-off evidence
Make the budget explicit: every MCP tool should accept a fidelity and max_runtime argument, and the server should refuse Tier-3 calls until a Tier-1 screen exists. The agent learns the economics because the API enforces them.
05 · Reference Implementation

A minimal server you could run on Monday

Everything in Figures 1–2 reduces to surprisingly little code. Listing 1 is a working skeleton of the sandbox MCP server — FastMCP for the protocol, the MATLAB Engine API for the physics seam, a budget governor, and provenance hashing. Listing 2 is the one file that makes it appear inside VS Code Copilot as native tooling.

LISTING 1sandbox_server.py — FastMCP + MATLAB Engine, ~60 lines
# sandbox_server.py — reference skeleton (FastMCP + MATLAB Engine API)
import json, time, hashlib
import matlab.engine
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("physics-sandbox")

# --- persistent session: pay MATLAB startup once, at server boot ---
eng = matlab.engine.start_matlab()
eng.load_system("pmsm_thermal_hrn", nargout=0)
eng.set_param("pmsm_thermal_hrn", "FastRestart", "on", nargout=0)

# --- curated model registry: agents configure, never construct ---
REGISTRY = {
    "pmsm_thermal": {
        "harness": "pmsm_thermal_hrn",
        "rev": "a41f9c",
        "constraints": {"T_ss_C": 140.0},
    }
}
BUDGET = {"tier1": 2000, "tier2": 50, "tier3": 4}   # the governor

def _provenance(spec, args):
    blob = json.dumps({"rev": spec["rev"], "args": args}, sort_keys=True)
    return hashlib.sha256(blob.encode()).hexdigest()[:12]

@mcp.tool()
def run_experiment(model: str, I_amps: float, cooling_health: float,
                   fidelity: str = "tier2", max_runtime_s: float = 60.0) -> str:
    """Run one thermal experiment. Returns steady-state temperature,
    constraint margin, PASS/FAIL verdict, runtime, and provenance hash."""
    spec = REGISTRY[model]
    if BUDGET[fidelity] <= 0:
        return json.dumps({"error": "budget_exhausted", "tier": fidelity})
    BUDGET[fidelity] -= 1

    t0 = time.time()
    eng.workspace["I_phase"] = float(I_amps)         # typed inputs only —
    eng.workspace["h_cool"]  = float(cooling_health) # never model-written code
    eng.eval("out = sim('pmsm_thermal_hrn');", nargout=0)
    T_ss = eng.eval("out.logsout.get('T_wind').Values.Data(end);")

    limit  = spec["constraints"]["T_ss_C"]
    margin = limit - T_ss
    return json.dumps({                              # verdicts, not waveforms
        "T_ss_C": round(T_ss, 1), "limit_C": limit,
        "margin_C": round(margin, 1),
        "verdict": "PASS" if margin >= 0 else "FAIL",
        "runtime_s": round(time.time() - t0, 1),
        "provenance": _provenance(spec, [I_amps, cooling_health]),
    })

@mcp.tool()
def inject_fault(model: str, fault: str, severity: float, t_onset_s: float) -> str:
    """Arm a fault (winding_resistance | cooling_blockage | sensor_bias)
    for the next run; returns the armed configuration."""
    ...  # maps to a fault subsystem + variant control in the harness

if __name__ == "__main__":
    mcp.run()   # stdio transport — VS Code launches and owns this process
LISTING 2.vscode/mcp.json — how Copilot discovers the sandbox
{
  "servers": {
    "physics-sandbox": {
      "type": "stdio",
      "command": "python",
      "args": ["sandbox_server.py"]
    }
  }
}
What production adds to this skeleton Input schemas bounded to physical envelopes (no 10 kA currents), an async run queue with license-aware concurrency, structured experiment logging to a database, run_doe batching with parallel FMU workers, and a get_trace tool gated behind explicit justification so raw waveforms stay out of the context window by default.
06 · Live Demonstration

A working sandbox, in your browser

Below is a miniature but honest version of the whole idea. The plant is a single-node motor thermal model with temperature-dependent winding resistance — solved by RK4, right here in the page:

C·dT/dt = I²·R₀·(1+α(T−20)) − (T−T_amb)/R_th(h)

The health parameter h degrades the cooling path (clogged channel, failing pump). The engineering question — a real VHM-flavored one — is: given this cooling health, what is the maximum continuous current that keeps the winding below 140 °C? You can experiment manually, or hand the controls to a toy agent that runs a bisection search using only the sandbox's verdicts.

FIG. 4Thermal derating sandbox — manual or agent-driven
110 A
100 %
no run yet
The agent never sees the ODE. It sees run_experiment(I, h) → {T_ss, verdict} and reasons over verdicts — exactly the contract the real MCP server would offer, with Simscape behind it instead of forty lines of JavaScript. Degrade the cooling health and re-run the agent: the derating threshold it finds shifts down, which is the prognostic insight.
What scales from this toy The agent's transcript below the plot is the artifact that matters. In production, every entry becomes a logged, replayable experiment record: hypothesis, configuration hash, solver settings, verdict. That audit trail is what turns "the AI said so" into defensible engineering evidence.

The single-run loop above generalizes to the sandbox’s most valuable verb: run_doe. Figure 5 maps the entire derating envelope over the (current × cooling-health) plane — and contrasts two strategies an agent could choose: brute-force the grid on Tier-1 surrogates, or hunt the pass/fail boundary directly and spend an order of magnitude fewer runs.

FIG. 5run_doe — mapping the derating envelope
0 runs
PASS (margin to 140°C) FAIL (exceedance) analytic envelope I_max(h) agent probe
Both strategies converge on the same envelope — the curve every derating table is secretly an approximation of — but the boundary hunt gets there in roughly a tenth of the runs. Budget-awareness is agent intelligence, and the server’s job is to make the budget visible.
07 · The Inverse Problem

Diagnosis as physics-refereed hypothesis testing

Everything so far ran the model forward: parameters in, behavior out. Diagnosis is the inverse problem — behavior observed, cause unknown — and it is where the sandbox earns its keep for VHM. The agent’s move is abduction: enumerate candidate faults, simulate each, and rank them by how well they reproduce the field signature.

Figure 6 stages the full exercise. Generate a field signature secretly draws one of four ground truths — healthy, cooling degradation, winding resistance growth, or temperature-sensor bias — with random severity and measurement noise. Run agent diagnosis then sweeps each fault family through the sandbox, fits severity by residual, and commits to a diagnosis. Only then is the truth revealed.

FIG. 6Abductive diagnosis — which fault explains the data?
no signature yet
Gray dots: noisy “field” measurement at I = 120 A. Colored curves: best-fit simulation per fault family — cooling, winding, sensor bias, gray dashed: healthy. The families separate because they bend the physics differently: cooling faults stretch the time constant, winding faults steepen the initial slope, sensor bias shifts the whole curve. The agent doesn’t know that — the residuals do.
Scaling this up Replace the four families with your FMEA’s fault catalog, the RC model with the Simscape plant, and RMS residual with a proper likelihood (or a learned residual metric), and this loop becomes a field-return triage assistant: signature in, ranked fault hypotheses with severity estimates and replayable evidence out.
08 · Design Patterns

Patterns and anti-patterns

Three decisions dominate whether the sandbox produces insight or noise.

1 · Curated model library, not freeform model building

Programmatic diagram construction (add_block/add_line) is brittle, and an agent will burn its budget on connection errors. Instead, engineers curate parameterized template models — PMSM drive, battery pack, gear train, thermal network — and the agent configures, swaps components, and injects faults. The search space stays physically meaningful by construction.

2 · Verdicts, not waveforms

LLMs are good at proposing experiments and unreliable at honestly reading raw traces — they will confabulate trends in noisy data. Post-process inside the server: return steady-state values, constraint margins, rise times, FFT peak tables, and an explicit pass/fail per requirement. Raw signals stay available behind a separate tool for when the agent genuinely needs them.

3 · Fault injection as a first-class tool

For diagnostics work, the killer primitive is inject_fault(model, fault_type, severity, t_onset) — winding resistance step, bearing friction ramp, sensor bias, coolant blockage. It turns the sandbox into a hypothesis tester for diagnosis ("which fault best explains this signature?") and a data factory for training and validating detection algorithms before any test-cell time.

✕ Anti-pattern
✓ Pattern
set_param("Rw","0.31")run() → 10⁶-sample trace dumped into context
run_doe(factors={Rw, h}, screen=tier1) → ranked table of constraint margins
Agent free-draws a Simulink diagram block by block
Agent composes from a validated subsystem library with typed ports
Agent eyeballs a plot and says "the ripple looks acceptable"
Server returns {ripple_pk: 4.2 Nm, limit: 5.0, verdict: PASS}
Unlimited parallel Tier-3 calls on a license-server toolbox
Budget governor: Tier-3 requires a Tier-1 screen + explicit runtime cap
09 · The Backend Landscape

Choosing the physics engines

No single tool spans the ladder. The practical strategy is one authoring environment you trust, with FMU export as the universal currency — models authored anywhere, executed license-free in the agent's inner loop, escalated to the source tool only for verification.

FIG. 7Backend selectorfilter by category
Acausal

Simscape (MATLAB)$

Component-based physical networks; scriptable end-to-end; MATLAB Engine API for Python wraps cleanly into an MCP server.
Sandbox fit · Tier-2 workhorse; FMU export; license serializes parallel calls.
Acausal

OpenModelicafree

Open-source Modelica compiler; OMPython scripting; no license server, so concurrency is free.
Sandbox fit · Best free Tier-2; great for parallel agent fan-out.
Acausal

Dymola / Modelon Impact$

Commercial Modelica; Modelon is cloud-native with a REST API — nearly a sandbox out of the box.
Sandbox fit · Strong libraries (thermal, EV); API-first deployment.
FMI / FMU

FMPy · PyFMIfree

Python runtimes for the FMI standard. Execute co-simulation or model-exchange FMUs exported from almost any tool.
Sandbox fit · The Tier-1 currency: fast, license-free, tool-agnostic.
0D–1D System

GT-SUITE$

Automotive-standard system simulation: propulsion, thermal, batteries, lubrication. Python automation available; deeply embedded at GM.
Sandbox fit · Tier-2/3 for vehicle-level studies; FMU export/import.
0D–1D System

Simcenter Amesim · AVL Cruise$

Peer system-simulation suites with scripting APIs and strong powertrain libraries.
Sandbox fit · Tier-2/3 alternatives where they're already licensed.
FEA / CFD

PyAnsys$

Official Python ecosystem (PyMAPDL, PyFluent, PyAEDT) over gRPC — effectively MCP-ready by design.
Sandbox fit · Cleanest Tier-3 automation story in commercial FEA/CFD.
FEA / CFD

COMSOL · OpenFOAM$

COMSOL exposes a Java/Python API; OpenFOAM is free but case-file automation is rough.
Sandbox fit · Tier-3 when multiphysics or CFD detail is the question.
Fast 3D

MuJoCo · PyBulletfree

Contact-rich rigid-body physics at thousands of steps per second; MuJoCo has community MCP servers already.
Sandbox fit · Tier-1 for mechanism, actuation, and RL-style rollouts.
Fast 3D

Drakefree

Toyota Research's toolkit: multibody dynamics plus serious optimization (trajectory, MPC) in one Python API.
Sandbox fit · When the experiment is itself an optimization problem.
Python-native

CasADi · do-mpc · SciPyfree

Symbolic/numeric ODE-DAE modeling with autodiff; trivially sandboxed in-process.
Sandbox fit · The agent's scratchpad physics before anything heavier.
FMI / FMU

FMI 3.0 standardfree

Tool-neutral packaging of simulation models (model exchange, co-simulation, scheduled execution); 100+ exporting tools.
Sandbox fit · The architectural keystone: author anywhere, execute anywhere.
License markers: free open / no license server · $ commercial. The free column is what makes wide agent fan-out economically possible.
10 · Field Notes

Practical notes before you build

Licensing under concurrency

A single MATLAB Engine session serializes runs; Parallel Computing Toolbox workers each draw licenses from the corporate server. Before designing for agent fan-out, measure what the license pool tolerates — or route the inner loop through exported FMUs and keep MATLAB for authoring and verification only.

Latency budgets are part of the prompt

Expose max_runtime on every tool and return partial results with a budget_exceeded flag rather than hanging the agent. Stiff electro-thermal models benefit from local solvers and fixed-step configurations in the exploratory loop; reserve variable-step accuracy for verification.

Determinism and provenance

Hash the model version, parameter set, and solver settings into every result. Agent-driven experimentation produces hundreds of runs per session; without provenance you cannot reproduce the one that mattered. Treat the experiment log like a lab notebook, because legally and organizationally, it is one.

Guard the interpretation boundary

The most common failure is not a wrong simulation — it's a right simulation read wrongly. Keep numeric judgment (margins, statistics, trend tests) inside the server, and have the agent justify decisions by citing returned verdicts. If a conclusion in the agent's prose has no corresponding verdict in the log, that's a red flag the review process should catch automatically.

Security posture: the server is an execution surface

An MCP server that executes solver commands is an arbitrary-execution surface — the engineering-simulation cousin of handing an agent a shell. Whitelist tool actions, run backends in containers or on dedicated machines, and never let a model-generated string reach a shell or a MATLAB eval. Standard agentic-AI security guidance applies with extra force when the backend can drive licensed engineering infrastructure [11], [13].

Keep the warden outside the cell. The budget governor, model registry, and provenance log are the harness — and the harness must not share an execution context with the code that runs model-influenced experiments. If the process that enforces the Tier-3 gate and writes the audit trail is the same process a compromised run can reach, that run can quietly rewrite its own evidence. The governor passes typed inputs in and reads verdicts and exit codes back out; it never executes inside the sandbox it polices.

FIG. 8The isolation spectrum — security vs. startup latency
licensed solvers MATLAB · Simscape GT-SUITE · FEA too heavy to spin up per call: isolate at host/VM + typed-input contract startup latency per call → isolation strength → µs ms ~100s ms seconds Monty (Rust) blocks fs/env/net · sub-µs · Python subset RestrictedPython parse-time limits · not for untrusted code Docker (plain) good ergonomics · shares host kernel Firecracker µVM own kernel · ~150 ms · E2B / Lambda Docker + gVisor userspace syscalls · ~15% overhead Pyodide / Wasm memory-boundary · 1–3 s init
Every isolation choice trades security against the latency the agent's inner loop has to absorb. Position is qualitative, not benchmarked. The practical move is to put Tier-1 surrogate code (SciPy/CasADi ODEs, FMUs) somewhere on this curve and leave the licensed solvers out of it — they are isolated at the host or VM boundary and protected by the typed-input contract instead.

Match isolation to what actually runs. The physics complicates the generic sandboxing story, so split the backend in two. Tier-1 surrogates are ordinary code and belong in strong, cheap isolation: a parse-time-restricted interpreter, a Rust micro-interpreter such as Monty that denies filesystem, environment, and network access by default, a Wasm runtime, or a per-call microVM — Firecracker boots in roughly 150 ms and is the production standard for hosted coding agents [14]. Heavyweight licensed solvers cannot spin up per call, so they are isolated at the host or VM boundary and protected by the discipline this monograph already insists on: configure, never construct, and no model-generated string ever reaches eval or a shell.

Network egress is the overlooked surface. Allowlist, do not blocklist. The solver loop rarely needs the open internet, so pin outbound traffic to the package indices, your model registry, and the license server, and deny everything else by default — far more defensible than chasing malicious domains. In a cloud deployment, block the instance-metadata endpoint at 169.254.169.254 and require token-authenticated IMDSv2, or a prompt-injected agent can mint cloud IAM credentials through an SSRF and walk straight out of the sandbox [13].

Bound the blast radius. The budget governor already counts runs for cost; extend it to cap resources for safety. Set conservative memory and CPU ceilings, a process limit to stop fork bombs, and a disk quota on the mounted workspace, and wrap every backend call in a hard timeout that returns a budget_exceeded flag rather than hanging the agent. The same governor that makes the economics visible can make the blast radius finite.

Gate the irreversible by hand. Some actions should never proceed on sandbox isolation alone — writing to the shared model registry, pushing results into a PLM system or database, installing a new solver toolbox, or any run that consumes scarce Tier-3 licenses. Intercept them at the server with the same human-approval hook the Tier-3 sign-off already uses, so a person confirms before the backend ever sees the command; the agent simply receives a result or a timeout, and never learns the gate exists.

Threat model, made concrete In late 2024 a researcher showed that prompt injection hidden in a browsed web page could drive an AI computer-use agent to download and run a command-and-control framework — turning it into a remotely controlled host with no malicious intent from the user who launched it [15]. The simulation analogue is a payload smuggled through a field-data file, a third-party model artifact, or a returned trace the agent then acts on. Treat every simulation input and result as untrusted data, not instructions — the verdicts-not-waveforms contract and typed inputs are exactly what blunt the equivalent attack here.
Organizational note The sandbox is also a persuasion instrument. A pitch that says "the agent proposed 40 derating strategies overnight, screened them on FMUs, and verified the best three in Simscape — here is the audit log" lands very differently from "we connected an LLM to MATLAB." Frame the deliverable as verified experiments per engineer-day.
11 · Application

Where this bites in VHM

Diagnostic hypothesis testing. Given a field signature, the agent enumerates candidate faults, injects each into the plant model, and ranks them by residual fit — abductive reasoning with a physics referee.

Prognostic feature vetting. Before a feature ships in a health indicator, the agent sweeps degradation severities in simulation and reports whether the feature actually separates failure modes across the operating envelope — the demo in Fig. 4 is the embryo of exactly this study.

Recall scope and what-if analysis. "If this supplier lot has +8% winding resistance, which drive cycles violate thermal limits?" is a DOE the sandbox answers in hours, shrinking scope decisions that otherwise lean on conservatism.

Synthetic fault data. Labeled fault trajectories on demand, for training detectors where field failures are rare — with the fidelity ladder controlling the sim-to-real gap.

12 · Adoption

A roadmap that fits in three quarters

Phase 0 · Proof, weeks

One harness model exported to FMU, one MCP tool (run_experiment), one engineer’s VS Code. Success: the agent finds a known derating threshold unaided, with an audit log.cost ≈ days of setup · zero new licenses

Phase 1 · Pilot, a quarter

Simscape Tier-2 behind the server, fault injection, run_doe, provenance hashing. Run 2–3 real VHM studies (feature vetting, signature triage) side-by-side with the manual process.success metric: verified experiments per engineer-day

Phase 2 · Platform, ongoing

Model registry with owners and validation status, license-aware run queue, GT-SUITE/FEA Tier-3 gateway, team rollout. The sandbox becomes shared infrastructure, not a side project.governance: registry review · budget policy · log retention

Risks, named early

Risk
Mitigation
License contention when agents fan out
FMU-first inner loop; license-aware queue; measured pool limits before scale-up
Trust collapse after one wrong verdict reaches a decision
Provenance on every result; human sign-off gate on Tier-3; verdicts cite model validation status
“Digital twin, again?” positioning fatigue
Frame as agent-driven experimentation on existing models — the twin is reused, not rebuilt
Security exposure of an execution-capable server
Whitelisted tools, typed inputs, containerized backends, no model-generated code paths
13 · Honest Edges

Limitations and failure modes

The verdict inherits the model’s trust, never exceeds it. A sandbox cannot validate physics it doesn’t contain: unmodeled aging mechanisms, manufacturing spread, or coupling left out of the harness will be invisible to every experiment. Each registry entry should carry an explicit validity envelope and validation provenance, and the server should refuse — or loudly flag — experiments outside it.

Surrogates drift from their parents. Tier-1 FMUs and reduced-order models disagree with Tier-2/3 somewhere; the question is where. Cross-check a sampled fraction of Tier-1 verdicts at higher fidelity automatically, and treat growing disagreement as a maintenance signal for the surrogate, not noise [12].

Agents will overfit the sandbox if allowed. Given an open parameter space, an optimizing agent finds solver tolerances, unphysical corners, and constraint loopholes — the simulation cousin of reward hacking. Bound every input schema to physical envelopes, randomize nuisance parameters across verification runs, and make “exploits a modeling artifact” an explicit failure category in review.

Automation bias is the human-side failure. A fluent agent quoting numeric verdicts is persuasive even when the underlying model is stale. The audit log helps only if someone reads it; build the review habit in Phase 0, while the stakes are still low.

14 · References

References & further reading

  1. Model Context Protocol — specification and SDKs. modelcontextprotocol.io
  2. FMI Standard 3.0 — Functional Mock-up Interface for model exchange and co-simulation. fmi-standard.org
  3. FMPy — Python library for simulating FMUs. github.com/CATIA-Systems/FMPy
  4. MathWorks — MATLAB Engine API for Python; Simscape documentation and FMU export. mathworks.com/help
  5. OpenModelica & OMPython — open-source Modelica environment and Python interface. openmodelica.org
  6. PyAnsys — open-source Python ecosystem for Ansys products. docs.pyansys.com
  7. Gamma Technologies — GT-SUITE system simulation and automation interfaces. gtisoft.com
  8. MuJoCo (Google DeepMind) and Drake (TRI) — fast physics and optimization-centric multibody dynamics. mujoco.org · drake.mit.edu
  9. Ma, Y. et al., "Eureka: Human-Level Reward Design via Coding Large Language Models," 2023. LLM proposals evaluated inside a GPU physics simulator. arXiv:2310.12931
  10. Silver, D. et al., "Mastering the game of Go with deep neural networks and tree search," Nature, 2016 — the search-plus-evaluation precedent. doi:10.1038/nature16961
  11. Yao, S. et al., "ReAct: Synergizing Reasoning and Acting in Language Models," 2022; and OWASP guidance on LLM application security. arXiv:2210.03629 · owasp.org
  12. Wang, G. et al., "Voyager: An Open-Ended Embodied Agent with Large Language Models," 2023 — agent skill acquisition inside a simulated world. arXiv:2305.16291
  13. Allahyari, M., "Secure Playgrounds: Sandboxing & Execution Security in Harness Engineering," The MLnotes Newsletter, 2026 — the warden/cell principle, egress allowlisting, and metadata-endpoint hardening adapted here to a solver backend. mlnotes.substack.com
  14. Sandboxing runtimes for agent-generated code: E2B / Firecracker microVMs, gVisor (user-space syscall interception), Pyodide (Python-to-Wasm), Monty (Pydantic's Rust interpreter), and RestrictedPython. e2b.dev · gvisor.dev · pyodide.org · github.com/pydantic/monty
  15. Rehberger, J., "ZombAIs" — prompt injection through browsed content compromising an AI computer-use agent into running a C2 framework, 2024. embracethered.com