Skip to content
AI.info

Research

El Agente Gráfico: Structured Execution Graphs for Scientific Agents

Overview Research area: AI for science — LLM-based scientific agents, execution-graph runtimes, knowledge graphs, and computational chemistry / materials science automation. Technical level: Advanced.

El Agente Gráfico: Structured Execution Graphs for Scientific Agents
arXiv
2602.17902
Published
2026-02-19
Authors
Jiaru Bai, Abdulrahman Aldossary, Thomas Swanick, Marcel Müller, Yeonghun Kang, Zijian Zhang, Jin Won Lee, Tsz Wai Ko, Mohammad Ghazi Vakili, Varinia Bernales, Alán Aspuru-Guzik

AI summary

Overview

Research area: AI for science — LLM-based scientific agents, execution-graph runtimes, knowledge graphs, and computational chemistry / materials science automation.

Technical level: Advanced.

Scope: The paper introduces El Agente Gráfico, a "semantic execution runtime" that represents scientific procedures as typed execution graphs, and evaluates it against the authors' earlier multi-agent architecture (El Agente Q) on six university-level quantum chemistry exercises, plus spectroscopy, metal-organic framework (MOF) design, two open-ended chemistry investigations, and skill-guided workflow authoring by coding agents.

What This Paper Is About

Large language models can plan scientific workflows and write code, but they do not by themselves define how scientific state is validated, passed between heterogeneous computational and experimental operations, or recorded for later reuse. El Agente Gráfico addresses this by making the procedure itself an explicit, typed execution graph: the graph declares which operations exist, what state types they accept, and which transitions are admissible, while the model is invoked only at defined decision points. The paper's goal is to show that this division of labour yields better task performance, much lower model cost and wall-clock time, and inspectable, transferable scientific protocols.

Key Contributions

  1. A semantic execution runtime built on typed execution graphs. Each workflow is exposed to the agent as a graph tool. Node schemas govern state transitions, directed edges delimit admissible actions, and the runtime preserves object identity and native state while recording failures and provenance.
  2. Separation of heavyweight state from model context. Large intermediate objects (for example mean-field state and molecular-orbital coefficient arrays) remain as native Python objects in runtime memory rather than being serialized through the LLM context, while selected scientific state and provenance are persisted through an object graph mapper (OGM) into an external knowledge graph (KG) with unique IRIs for reuse across tools and sessions.
  3. A quantitative comparison against a prior multi-agent architecture. Using the same top-level LLM configuration and the same task-specific rubrics on six university-level quantum chemistry exercises, the authors compared El Agente Gráfico with El Agente Q across eight LLM drivers, with each exercise repeated ten times (120 runs per evaluated LLM).
  4. Skill-guided protocol authoring. Graph-design principles distilled from the case studies were packaged as a reusable graph-construction skill, and coding agents were tested on whether they could compile natural-language requests into typed execution graphs, demonstrated on MOF literature mining.

Main Findings

  • Direct system-level comparison (sonnet-3.7, same rubrics): the rubric-based score rose from 88.25% for El Agente Q (human evaluators) to 90.94% for Gráfico (an independent gpt-4o judge); the deterministic numerical evaluator assigned Gráfico 93.69%. Mean model requests fell from 168.4 to 9.1 and trace tokens from 1,649,616 to 284,036 per task — 94.6% fewer requests, 82.8% fewer tokens, an 80.3% reduction in model cost, and mean wall-clock time from 1,827 s to 404 s (4.5-fold).

  • Model drivers differ in behaviour, not just scores. All eight drivers (sonnet-3.7, sonnet-4.5, gpt-4.1, gpt-5, gpt-5.1, gpt-5.2, minimax-m2, qwen3-max) used the same GPU4PySCF workflow, code-execution and unit-conversion tools, with the routing controller fixed as gpt-4o-mini. Highest reported numerical and judge scores were gpt-5 (98.88% and 98.50%). In the harder ring-strain exercise, gpt-4.1 frequently generated cycloalkenes instead of the requested cycloalkanes, an error absent from the gpt-5.x runs. Under the same low reasoning-effort setting, gpt-5 used more reasoning tokens than gpt-5.1 and gpt-5.2. GPT drivers generally batched several scientific tool calls per turn, whereas Claude drivers interleaved smaller batches with more turns. Carryover tokens accounted for 53.21–86.30% of trace-token consumption.

  • Repeated-run reliability. Defining a successful run as numerical score 1.00 and rubric-based score above 0.90, gpt-5 achieved pass@3 of 0.99 and pass³ of 0.54.

  • Typed state transfer in ensemble spectroscopy. For merocyanine, concurrent GFN2-xTB/ALPB searches in water and n-heptane fed five conformers from each solvent into parallel ωB97X-D4 (SMD)/def2-SVP refinement and TDDFT; the ensemble absorption maximum shifted from 412.8 nm in water to 429.9 nm in n-heptane, and the corresponding dominant-conformer maxima were 412.6 and 429.6 nm. For 2,3-epoxybutanol, four gas-phase and eight microsolvated conformers covered more than 95% of their xTB-determined Boltzmann populations; explicit water plus SMD shifted the lowest bright absorption from 9.47 to 9.21 eV and the ensemble maximum from 121.8 to 130.9 nm.

  • Persistent relational state in MOF design. In an initial session, seven concurrent workflows processed three deposited structures and constructed four initial hypothetical MOFs, after which 17 additional hypothetical MOFs were constructed and analysed. A new session without the original conversation retrieved previously investigated structures containing a specified metal node, grouped them by topology and compared pore size with accessible surface area, finding that pore-limiting diameter and accessible surface area tended to increase together within a topology but not across topologies.

  • Bounded execution in open-ended investigations. For diphenyl disulfide in dimethylformamide, B3LYP/def2-SVP with SMD(DMF) showed reduction lengthened the S–S bond from 2.12 to 2.91 Å, and the thiyl/thiolate couple was calculated to lie 0.91 V more positive than reduction of the parent disulfide. For the olfaction comparison, ωB97X-D4/def2-TZVP placed ethanol and ethanethiol at local minima, with the O–H stretch of ethanol at 3879 cm⁻¹ versus the S–H stretch of ethanethiol at 2764 cm⁻¹; the paper states this provides a mechanistic comparison and does not validate a vibrational mechanism of olfaction.

  • Skill-guided authoring of a MOF-mining workflow. Both a Gráfico agent (gpt-5.6-sol) and Claude Code (claude-fable-5, with fallback to claude-opus-4.8) produced typed execution graphs that confined model use to information extraction. For CAU-23, the two calculated 1368 and 1397 m² g⁻¹ against a reported BET surface area of 1250 m² g⁻¹; for KMF-1 deposition 1984701, 1034 and 1041 m² g⁻¹ against 1130 m² g⁻¹, differences of 7.9–11.8%. Gráfico encoded a general paper–CIF identity gate after detecting swapped CIF contents, and that gate caught a held-out mismatch Claude Code missed. The Gráfico trajectory cost US$3.13 versus US$28.10 for the Claude Code trajectory through workflow completion.

  • Three levels of validity. The discussion separates structural validity (state conforms to declared schemas), procedural verifiability (routes and outcomes checkable against an executable protocol), and scientific validity (evidence and interpretations adequately address the research question). Schema validation enforces the first, runtime traces support the second, and the third must be assessed against domain knowledge and empirical evidence.

Methodology in Plain English

The authors treat a scientific workflow the way chemical process engineers treat a plant: as a network of connected operations that exchange material with defined properties, where the network structure constrains what can happen and in what order. Each computational step — geometry optimization, frequency calculation, imaginary-frequency removal, molecular analysis, TDDFT — becomes a node with a declared input type and declared successor nodes. A small "controller" model sees the user request, the previous result and the input schemas of permitted next nodes, and picks one; the runtime then validates the typed input before executing, returning validation errors for correction. Big numerical objects pass between nodes as Python objects and never enter the model's context. A customized version of the World Avatar Python package (twa), reworked for a Python-native, Pydantic-aligned interface, serializes chosen results into a knowledge graph with unique IRIs so they can be retrieved later as live Python objects. The chemistry agent was built on pydantic-ai with a dependencies object, MCP support and a retry mechanism for tool failures; temperatures were 0 for non-reasoning models and 1 for reasoning models. GPU4PySCF execution used custom scheduling with a thread-safe token queue defaulting to three execution slots per GPU, at most three calculations per GPU and four concurrent agents on a four-H100 node. Evaluation used pydantic-evals with thresholds of 0.01 Ha for total energies, 0.15 Å RMSD for geometries, 0.1 Ha for HOMO-LUMO gaps, and checks for imaginary modes; token and cost figures came from logfire records. Coding agents were instantiated with pydantic-deep (v0.3.22).

Why This Matters

The paper argues that reliable scientific autonomy requires explicit contracts governing how probabilistic model decisions become computational or physical actions, and it gives a concrete implementation whose gains over conversational multi-agent coordination are measured rather than asserted. By making the protocol — not the chat log — the primary artifact, validation and provenance become inspectable and revisable, which the authors connect to the needs of self-driving laboratories and cloud-coordinated multi-laboratory operation.

Real-world applications suggested by the work:

  • Computational chemistry and spectroscopy pipelines, where conformer ensembles, TDDFT excitation energies and thermochemical corrections must be chained with validated state.
  • Materials discovery and MOF design, where structures, topologies, metal nodes and linkers form a relational design space that benefits from persistent, queryable state and cross-session reuse.
  • Automated literature mining and data curation, where linking reported measurements to the correct deposited crystal structure requires both model extraction and deterministic identity checks.
  • Mechanistic investigation support, as in the disulfide redox and olfaction studies, where the agent defines scope and pathway while the runtime validates and records the calculations performed.

Industry relevance: the reported 80% model-cost reduction and 4.5-fold wall-clock reduction relative to a multi-agent architecture bear directly on the economics of running agents at scale, and the emphasis on inspectable protocols, versioning and provenance speaks to laboratory automation, materials informatics and regulated research environments. One author affiliation is NVIDIA, and the benchmark used four H100 GPUs.

Future Directions

  • Extending toward globally connected laboratories. The discussion points to LLM agents translating scientific requests into remotely executed protocols, which introduces new requirements for operation scheduling, rate limiting, and scoped access to instrument state and scientific context.
  • Verifying agent-authored protocols. Because a generated graph is itself an artifact that determines the outcome, the authors propose that revisions to reusable protocols pass interface checks, domain invariants, regression tests and held-out reference cases, with versioning and rollback to preserve validated states.
  • Building safety harnesses for self-driving laboratories, translating model intent into executable experiments, monitoring actions and retaining the resulting evidence.
  • Broadening beyond the demonstrated domains. The paper demonstrates typed execution graphs for quantum chemistry, ensemble spectroscopy, MOF design and MOF literature mining; the abstract frames these as evidence that reusable procedural knowledge can be inspected, revised and transferred across computational and physical systems, leaving the extension to other chemistry and materials workflows as open work.

Target Audience

Researchers and engineers building LLM-based agents for the physical sciences, computational chemists and materials scientists who want automated but auditable workflows, and groups working on self-driving laboratories, laboratory automation and scientific knowledge graphs. It is also relevant to agent-architecture researchers interested in typed execution graphs, tool orchestration and reducing model context burden, and to readers evaluating when a single coding agent should replace a

Authors’ abstract

Large language models (LLMs) are increasingly used to automate scientific workflows, yet their integration with heterogeneous computational tools remains ad hoc and fragile. Current agentic approaches often rely on unstructured text to manage context and coordinate execution, generating often overwhelming volumes of information that may obscure decision provenance and hinder auditability. In this work, we present El Agente Gráfico, a single-agent framework that embeds LLM-driven decision-making within a type-safe execution environment and dynamic knowledge graphs for external persistence. Central to our approach is a structured abstraction of scientific concepts and an object-graph mapper that represents computational state as typed Python objects, stored either in memory or persisted in an external knowledge graph. This design enables context management through typed symbolic identifiers rather than raw text, thereby ensuring consistency, supporting provenance tracking, and enabling efficient tool orchestration. We evaluate the system by developing an automated benchmarking framework across a suite of university-level quantum chemistry tasks previously evaluated on a multi-agent system, demonstrating that a single agent, when coupled to a reliable execution engine, can robustly perform complex, multi-step, and parallel computations. We further extend this paradigm to two other large classes of applications: conformer ensemble generation and metal-organic framework design, where knowledge graphs serve as both memory and reasoning substrates. Together, these results illustrate how abstraction and type safety can provide a scalable foundation for agentic scientific automation beyond prompt-centric designs.

Read the original paper