Logo
FrontierNews.ai

MathWorks Lets AI Agents Execute MATLAB Code in Real Time, Not Just Generate It

MathWorks has introduced new open-source tools that allow AI agents to execute and validate MATLAB workflows in real time, fundamentally changing how engineers interact with artificial intelligence. The company released the MATLAB MCP Server and MATLAB Agentic Toolkit, which enable AI agents to write MATLAB code, run it in a live session, examine outputs or errors, and iterate toward correct results based on actual computational feedback rather than statistical guessing.

What's the Difference Between Code Generation and Code Execution?

For years, AI coding tools have focused on generating code that looks plausible but may not actually work. The new MathWorks approach flips this model entirely. Instead of relying on probabilistic reasoning, agents now base their decisions on deterministic computation, numerical analysis, and executable models. This means engineers can verify results by reviewing actual outputs, comparing them to expected behavior, and refining workflows through iteration, which are core practices in engineering development.

The shift matters because traditional AI code generation often produces syntactically correct but functionally incorrect solutions. By running code directly in MATLAB and observing real results, agents can self-correct and improve their reasoning in ways that static code generation cannot achieve.

How to Integrate AI Agents With MATLAB Workflows

Engineers looking to adopt this new capability should understand the practical workflow:

  • Define the Problem: Engineers remain responsible for clearly specifying the engineering problem, constraints, and success criteria before the AI agent begins work.
  • Enable Agent Execution: Use the MATLAB MCP Server or MATLAB Agentic Toolkit to allow AI agents to write and execute code directly in a live MATLAB session.
  • Validate and Iterate: Review the computational outputs, compare them against expected behavior, and allow the agent to refine the code based on real results rather than probabilistic guessing.
  • Maintain Human Oversight: Engineers must remain in the loop to validate outcomes and maintain responsibility for the final engineering decisions and results.

Because the tools are open-source, users can integrate agent-based workflows with MATLAB using popular agentic tools such as Claude Code, GitHub Copilot, OpenAI Codex, and Gemini CLI, among others. This broad compatibility means engineers are not locked into a single vendor's AI tool.

Why Does Execution-Based Validation Matter for Engineering?

The engineering industry has always relied on validation and testing as core practices. A simulation that looks correct on paper but produces wrong results in practice is worse than useless; it is dangerous. By enabling AI agents to execute code and observe real computational results, MathWorks is bringing AI-driven iteration into the same framework that engineers already use for design, simulation, and analysis.

"AI agents are most effective in engineering when they can directly interact with the tools used for design, simulation and analysis. By enabling agents to execute and iterate MATLAB workflows, we're connecting AI-driven iteration to the same computational environment engineers use to develop and validate their work. This allows teams to move from LLM generated code to executable, testable results within a consistent engineering framework," said Seth DeLand, Generative AI Product Manager at MathWorks.

Seth DeLand, Generative AI Product Manager at MathWorks

Industry observers note that this shift reflects a broader change in how organizations adopt agentic AI in model-based design and engineering. The focus is moving away from raw code generation toward reliable execution within established multi-disciplinary toolchains.

"As organisations adopt agentic AI in model-based design and engineering, the focus is shifting from code generation to reliable execution within established multi-disciplinary toolchains. Engineers remain responsible for defining problems, validating outcomes, and maintaining oversight, while AI agents increasingly handle iterative and repetitive tasks, augmenting human efficiency and effectiveness. This reinforces the importance of human-in-the-loop workflows, where real execution and validation underpin trust in AI-driven engineering processes," remarked Diego Tamburini, AI Practice Director at CIMdata.

Diego Tamburini, AI Practice Director at CIMdata

Rather than replacing engineers, these tools are designed to handle the repetitive and iterative work that consumes time without requiring human creativity or judgment. This approach acknowledges that engineering is fundamentally about building things that work in the real world, not generating plausible-looking code.

What Does This Mean for the Future of AI in Engineering?

The release of MATLAB's execution-based AI tools signals a maturation in how AI is being integrated into specialized professional domains. As more specialized tools adopt similar execution-based validation patterns, the competitive advantage will shift from raw model capability to integration depth and workflow compatibility. Engineers will increasingly expect their AI tools to understand not just syntax, but the domain-specific constraints, numerical methods, and validation practices that define their discipline.