TEM Agent: enhancing transmission electron microscopy (TEM) with modern AI tools
Morgan K. Wall, Alexander J. Pattison, Edward S. Barnard, Stephanie M. Ribet, Peter Ercius
TL;DR
The paper addresses the challenge of operating complex transmission electron microscopes and managing multimodal data by introducing TEM Agent, a framework that uses the Model Context Protocol to interface an off-the-shelf LLM with TEM subsystems and data platforms. The method integrates four MCP servers—microscope control, detector control, Crucible metadata, and Distiller data workflows—via a text-based command protocol, avoiding domain-specific training. Key findings show that TEM Agent can perform simple operations, automate tomography workflows, and leverage historical metadata to guide experiments and optimize advanced techniques like ptychography, while preserving safety and requiring human oversight. The work demonstrates a path toward accessible, scalable automation in electron microscopy and suggests future expansions to other instruments and richer image-processing capabilities.
Abstract
Recent improvements in large language models (LLMs) have had a dramatic effect on capabilities and productivity across many disciplines involving critical thinking and writing. The development of the model context protocol (MCP) provides a way to extend the power of LLMs to a specific set of tasks or scientific equipment with help from curated tools and resources. Here, we describe a framework called TEM Agent designed for transmission electron microscopy (TEM) that leverages the benefits of LLMs through a MCP approach. We simultaneously access and control several subsystems of the TEM, a data management platform, and high performance computing resources through text-based instructions. We demonstrate the abilities of the TEM Agent to set up and complete intricate workflows using a simplified set of MCP tools and resources accompanying a commercial LLM without any additional training. The use of a framework such as the TEM Agent simplifies access to complex microscope ecosystems comprised of several vendor and custom systems enhancing the ability of users to accomplish microscopy experiments across a range of difficulty levels.
