The Commonplace
Home Papers Evidence Explore Trends Syntheses Digests References Docs 🎲 Workforce Futures
← Papers
Direction, evidence grade, and study type are AI-generated labels (gpt-5-mini), not human-verified. Syntheses are LLM-written. "Tensions" are machine-detected candidates, not confirmed contradictions. A research-acceleration tool, not peer review. How this is built →

A tool-augmented language model can safely pilot atomic-force microscopes: with an ambiguity-checking execution layer and MCP-based tool access, the agent matches human experts on image quality and efficiency and prevents incorrect command execution in benchmarks.

Agentic AI for operating scientific instruments for nanoscale characterization
Zahra Ayar, Marcos Penedo, Mahdi Mehdikhani, Nahid Hosseini, Prabhu Prasad Swain, Georg E. Fantner · August 25, 2026
arxiv descriptive medium evidence 7/10 relevance Full text usable extracted full text Source PDF

Structured author observations

Linked only from stored provider relations; the raw author line above is never matched by name.

Arxiv

Latest observation:

  1. Zahra Ayar unresolved corpus identity
  2. Marcos Penedo unresolved corpus identity
  3. Mahdi Mehdikhani unresolved corpus identity
  4. Nahid Hosseini unresolved corpus identity
  5. Prabhu Prasad Swain unresolved corpus identity
  6. Georg E. Fantner unresolved corpus identity

Semantic Scholar

Latest observation:

  1. Z. Ayar provider ID
  2. Marcos Penedo provider ID
  3. Mahdi Mehdikhani provider ID
  4. N. Hosseini provider ID
  5. P. Swain provider ID
  6. G. Fantner provider ID
An MCP-based, tool-augmented LLM system safely translates natural-language instructions into AFM commands, uses AI vision for closed-loop image-based tuning and artifact diagnosis, and in live tests matched expert operators on image quality, iteration count, and tuning time while eliminating incorrect command execution in benchmarks via ambiguity checks.

Citation observations

Cumulative provider counts captured on specific dates; providers are never combined.

Operating a scientific instrument such as an atomic force microscope (AFM) requires continuous expert decision-making. A trained user defines the experimental intent, translates it into instrument commands, assesses incoming data, adjusts imaging parameters, and post-processes the final image. Existing automation usually addresses only parts of this workflow through hard-coded routines, task-specific controllers, or trained machine-learning models. Here we present an agentic-AI framework that operates the executable part of the AFM workflow using a general-purpose, tool-augmented large language model connected to instrument functions through the Model Context Protocol (MCP). The framework consists of 3 MCP-based agents: AFM Messenger converts natural-language instructions into checked instrument commands; AFM Pilot assesses image quality through a large language model (LLM) and, if necessary, adapts imaging parameters; and AFM Doctor diagnoses image artifacts and applies transparent post-processing from a pre-approved tool set. Because the language model performs image assessment rather than a fixed scalar objective or external optimizer, the same strategy can be applied across sample types and imaging modes without specific retraining. Safe hardware operation is enforced through an ambiguity check layer before execution. Benchmarking against fine-tuned and off-the-shelf tool-using models shows that this guarded execution layer, rather than model capability alone, reduces wrong-command execution to zero. In live experiments on different samples, AFM Pilot matched expert operators in image quality, iteration count, and tuning time, with no significant difference. These results demonstrate a safe route to agentic operation of scientific instruments, where experimental intent remains human-defined while command execution, image-based tuning, and post-processing are delegated to AI agents.

Summary

Main Finding

An MCP (Model Context Protocol)-based, tool-augmented agentic-AI system can safely operate an atomic force microscope (AFM) end-to-end (command execution, image-driven closed-loop tuning, and artifact-aware post-processing) and match expert human operators on image quality, iteration count, and tuning time. Structured tool access plus an interactive ambiguity-check layer, rather than model fine-tuning alone, is the critical element that drove reliable hardware operation (benchmarked to zero incorrect command executions in the deployed configuration).

Key Points

  • Architecture
    • Three cooperating MCP-based agents:
      • AFM Messenger: converts natural-language instructions to instrument calls (RePySPM) and enforces an ambiguity-check before execution.
      • AFM Pilot: performs closed-loop image-driven parameter tuning using the LLM’s multimodal (vision + language) assessment and bounded parameter updates.
      • AFM Doctor: diagnoses artifacts and applies transparent, pre-approved post-processing.
    • Human operator retains experimental intent; agentic system executes the instrument workflow.
  • Safety & reliability
    • Ambiguity check layer detects missing units/values, unclear axes, ambiguous tool targets, and unclear intent; can withhold execution or request clarification interactively.
    • Interactive MCP deployment achieved zero incorrect command executions on the benchmark set.
  • Model strategies compared
    • Fine-tuned GPT-4.1 (FT-GPT, FT-GPT-FC) vs tool-augmented models (Claude Sonnet 4.6, Opus 4.8) with structured tool access.
    • Without tools, off-the-shelf LLMs failed most commands (~89% failure for unaugmented Claude Sonnet 4.6).
    • Tool access greatly reduced errors; Opus 4.8 reached 6.4% error before ambiguity checking.
    • Error types differ: fine-tuned models mostly produced wrong units/values; tool-using models more often produced ambiguity or wrong tool selection.
    • Adding the ambiguity check reduced errors substantially (examples: FT-GPT-FC from 23.3% → 8.9%; Sonnet 4.6 from 25.1% → 4.8%; Opus 4.8 from 6.4% → 2.3%).
  • Experimental validation
    • Live sessions on multiple samples and modes (calibration grating, butterfly wing, Kelvin-probe force microscopy (KPFM) on gold-aluminum grating).
    • AFM Pilot recovered stable, well-tracking scans from severely detuned starts and matched human experts on key metrics (no statistically significant differences reported).
    • Prompt caching cut repeated input processing heavily (~95% of processed input tokens served from cache in a 10-iteration session), lowering inference cost.
  • Modularity & reuse
    • MCP-based tool description allows reuse across models and avoids retraining when instrument software or base LLM changes.
    • The system reports issues outside its control space (e.g., hysteresis, double-tip) and escalates to the human operator.

Data & Methods

  • Instrument control & tools
    • Commands are executed through RePySPM (Python control library for AFM).
    • MCP used to expose 129 control tools (functions) to LLMs in structured form.
  • Models and workflows evaluated
    • Fine-tuning: GPT-4.1 fine-tuned on instrument-specific examples; evaluated as direct generation (FT-GPT) and with function calling (FT-GPT-FC).
    • Tool-augmented: Claude Sonnet 4.6 and Claude Opus 4.8 given structured tool access; later deployed via MCP in an interactive workflow.
  • Benchmarking
    • A curated benchmark of AFM commands (150 requests in examples) designed by an experienced operator; includes single and chained commands, various units, under-specified prompts.
    • Metrics: command error rate and error composition (wrong units/values, ambiguity, wrong tool selection, missing tool).
    • Key numeric results:
      • Unaugmented Claude Sonnet 4.6 failure: ~89.2%.
      • FT-GPT: 28.4 ± 1.5% error; FT-GPT-FC: 23.3 ± 0.7%.
      • Sonnet 4.6 with tools: 25.1 ± 1.1%; Opus 4.8 with tools: 6.4%.
      • After ambiguity-check layer: FT-GPT-FC → 8.9%; Sonnet 4.6 → 4.8%; Opus 4.8 → 2.3%.
      • Deployed interactive MCP saw 73.3% direct execution, 22.7% clarification, 4.0% unsupported operations; no incorrect executions in benchmark.
  • Live experiments
    • Samples: standard calibration grating, biological sample (butterfly wing), KPFM on gold-aluminum grating.
    • Evaluation: iterative tuning traces (height and error channels), expert comparison for final image quality, iteration count, and time to tune.
    • Caching & cost: prompt caching heavily reduced repeated token processing across iterations (~95% cache hit in sample session).
  • Post-processing
    • AFM Doctor selects from a pre-approved, transparent processing toolset after diagnosing artifacts; reports and suggests operator interventions for non-salvageable artifacts.

Implications for AI Economics

  • Labor substitution and task reallocation
    • Agentic control can automate a substantial portion of the skilled AFM operator role (command encoding, parameter tuning, artifact-aware processing), lowering the need for specialized personnel to perform routine imaging tasks.
    • Human operators retain intent-level responsibilities and interventions for out-of-scope failures; tasks shift from hands-on operation to supervision, exception handling, experimental design, and higher-level analysis.
    • Potential downward pressure on demand for routine AFM operator hours; upward demand for higher-skilled workers who validate, maintain, and integrate agentic systems.
  • Productivity, throughput, and access
    • Autonomous tuning from detuned starts and faster convergence (matching expert time/iterations) implies higher instrument utilization and throughput per operator—economically valuable in instrument-constrained labs and core facilities.
    • Lowering the skill barrier democratizes access to advanced microscopy (smaller labs, startups, and new users), potentially expanding the addressable market for instruments and services.
  • Cost structure and deployment economics
    • Tool-augmented LLMs via MCP reduce ongoing retraining costs: adding or updating tools generally requires editing tool descriptions rather than costly fine-tuning cycles. That lowers maintenance and upgrade costs and shortens deployment time to new hardware/software.
    • Prompt caching yields direct inference cost savings (example: ~95% cached tokens across iterations), improving marginal economics of repeated agentic sessions.
    • Firms can monetize agentic layers (software-as-a-service; agentic operation subscriptions), selling MCP tool libraries, safety/ambiguity layers, or certified agent deployments for fields requiring strong reliability guarantees.
  • Market structure and competition
    • Modularity (MCP + tool libraries) enables ecosystem competition: instrument manufacturers, third-party software vendors, and LLM providers can supply interoperable components (tools, safety modules, domain adapters). Network effects: widely adopted, validated tool libraries become standards, increasing switching costs and creating platform leaders.
    • Barriers to entry lower for new agents because specialized fine-tuning is not required, but certification, safety validation, and liability insurance create new services and regulatory niches.
  • Risk, liability, and regulation
    • Safety mechanisms (ambiguity checks, bounded updates, human-in-loop for underspecified commands) materially reduce execution errors but do not eliminate all operational risk; regulators and insurers will likely require certified safety protocols for agentic operation on physical hardware.
    • Liability allocation (instrument vendor vs agent provider vs lab) and compliance regimes will matter economically; firms that internalize safety validation and transparency will pay lower risk premia.
  • Investment and diffusion dynamics
    • Rapid adoption likely in environments with high instrument costs and limited expert labor (core facilities, industrial labs), where productivity gains are easiest to monetize.
    • The cost advantage of tool-based approaches (no retraining, rapid tooling) implies faster diffusion than retraining-heavy methods; incumbents who control tool libraries may capture value.
  • Research and standardization needs (economic priorities)
    • Quantify labor-market impacts (task-level displacement vs upskilling demand) for microscopy and other instrument-intensive domains.
    • Cost–benefit analyses of deploying MCP-based agents vs hiring/contracting human experts, including insurance and regulatory compliance costs.
    • Standard protocols, certification schemes, and audit trails (transparency in decision logs, tested ambiguity checks) to lower transaction costs and facilitate institutional adoption.
  • Externalities and long-run effects
    • Positive: faster experimentation cycles, broader access to advanced instrumentation, potential acceleration of discovery.
    • Negative: concentration of expertise in software vendors, lock-in to tool ecosystems, possible underinvestment in operator training, and new points of systemic failure (software bugs or adversarial prompts).
  • Immediate commercial opportunities
    • "Agentic operation" SaaS for microscopy labs, MCP tool libraries, pre-certified ambiguity/safety modules, prompt-caching/inference-optimization solutions, and audit/validation services for regulatory compliance.

Suggested next steps for economists and policymakers - Empirical studies measuring throughput gains and per-sample cost reductions from deployments. - Labor market analyses: effects on wages, demand for AFM technicians vs higher-level roles. - Development of standards and certification frameworks for agentic control of lab hardware. - Business-model experimentation: licensing MCP tool libraries, managed agentic-operation services, and insurance/certification bundling.

If you want, I can (a) produce a short policy brief with recommended certification elements for agentic lab systems, (b) sketch a simple economic model quantifying labor substitution vs productivity gains for AFM cores, or (c) extract and tabulate the benchmark numbers and error compositions in machine-readable form. Which would help you next?

Assessment

Paper Typedescriptive Evidence Strengthmedium — The paper provides technical benchmarks (command-execution error rates across several LLM configurations) and live experimental comparisons on multiple AFM samples and imaging modes showing the agent matches human experts; it also demonstrates zero incorrect command execution in a benchmark after adding an ambiguity-check layer. However, statistical details, sample sizes, randomization, and broad robustness checks are limited in the supplied text, constraining causal claims and external validity. Methods Rigormedium — The authors use an explicit benchmark dataset, multiple LLM configurations (fine-tuned and tool-augmented), repetition (three runs reported for some benchmarks), and live instrument trials across different samples and modes, and they quantify error reductions with p-values for benchmark comparisons. Weaknesses include incomplete reporting of experimental sample sizes and selection procedures for live comparisons, unclear statistical power for 'matched expert operators' claims, limited diversity of instruments and environments, and potential dependence on proprietary LLMs and specific control software. SampleBenchmark of 150 AFM command requests evaluated across configurations (fine-tuned GPT-4.1 variants and Claude Sonnet 4.6 / Opus 4.8 with structured tool access), executed via a Python AFM control library (RePySPM); ambiguity-check layer and MCP-based interactive workflow tested; live closed-loop experiments on multiple samples including a calibration grating, a butterfly wing (biological sample), and a gold–aluminum grating in KPFM mode, comparing AFM Pilot tuning to human expert-tuned parameters (iteration counts, image quality, tuning time). Supplementary datasets, session reports, and code are referenced (GitHub repo, Supplementary Data). Themeshuman_ai_collab productivity innovation adoption GeneralizabilityTested on a single instrument-control stack (RePySPM) and specific AFM hardware—may not generalize to other AFM models or non-AFM instruments without adaptation., Relies on particular LLMs and tool interface implementations (Claude/Opus, GPT-4.1 fine-tune)—performance may vary with model choice or future model changes., Live experiments reported for a small set of sample types and imaging modes (calibration grating, butterfly wing, KPFM gold–aluminum)—unclear performance on broader materials, surface chemistries, or extreme imaging conditions., Safety and bounded-parameter protections depend on pre-specified constraints and tool sets; unusual failure modes or hardware faults outside these bounds may not be handled., Human-in-the-loop clarification was relied on in some workflows; fully autonomous deployment implications (long-run reliability, maintenance) are not demonstrated.

Claims (9)

ClaimDirectionOutcomeConfidence & EvidenceDetails
Structured tool access substantially reduced AFM command errors compared with an unaided language model. Error Rate positive AFM command error rate
Reading fidelity high
Study strength high
89.2% error rate without tools versus 25.1% with tool access for Claude Sonnet 4.6; 6.4% with tool access for Claude Opus 4.8
0.3
Adding an ambiguity-check layer further reduced command errors across the evaluated model configurations. Error Rate positive AFM command error rate
Reading fidelity high
Study strength high
23.3 ± 0.7% to 8.9%; 25.1 ± 1.1% to 4.8%; 6.4% to 2.3%
0.3
The deployed interactive Claude-MCP configuration achieved zero incorrect command executions in the evaluated benchmark. Error Rate positive Incorrect AFM command execution
Reading fidelity high
Study strength medium
n=150
no incorrect command execution observed
0.18
In the 150-request Claude-MCP command benchmark, 73.3% of requests were executed directly, 22.7% required clarification, and 4.0% requested unavailable operations. Organizational Efficiency mixed Distribution of command-handling outcomes
Reading fidelity high
Study strength medium
n=150
73.3% executed directly; 22.7% required clarification; 4.0% had no available tool
0.18
AFM Pilot can recover a stable, well-tracking AFM image from a severely non-optimal starting point through closed-loop parameter tuning. Output Quality positive AFM image surface-tracking quality and topographic fidelity
Reading fidelity high
Study strength medium
eight iterations
0.18
AFM Pilot achieved image feature quality comparable to human operation when imaging a gold-aluminum grating using Kelvin-probe force microscopy. Output Quality positive AFM topographic and multi-channel image quality
Reading fidelity high
Study strength medium
comparable to human operation
0.18
Across live experiments on different samples, AFM Pilot did not differ significantly from expert operators in image quality, iteration count, or tuning time. Output Quality null_result Image quality, number of tuning iterations, and parameter-tuning time
Reading fidelity high
Study strength low
no significant difference
0.09
The same AI-based tuning strategy can be applied across different sample types and AFM imaging modes without specific retraining. Task Allocation positive Transferability of AFM image-tuning performance across samples and imaging modes
Reading fidelity high
Study strength medium
applied across multiple sample types and imaging modes
0.18
Prompt caching reduced the cost of repeated input processing during AFM tuning; in a ten-iteration session, approximately 95% of processed input tokens were served from the cache. Organizational Efficiency positive Cost of repeated LLM input processing
Reading fidelity high
Study strength low
n=10
approximately 95% of processed input tokens cached; cached-data cost is 0.1 of basic prices
0.09

Notes