Manuscript Offprint

arXiv:2610.27230

Magnolia: A Persistent-Memory Agent Framework for Computational Chemistry

Tao Jiang, Benjamin Navet, Yousouf Taghzouti, Fabien Gandon, Louis-Félix Nothias, Élise Dumont

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Chemistry has recently entered a high-data regime as molecular databases from high-throughput platforms or computational studies have become available. Increasing automation within the chemical sciences leads to a more digital and precision chemistry. Dedicated scientific agents are becoming central to guiding the chemist through an ever-increasing amount of data and findings, including negative ones. Here, we introduce Magnolia, a persistent-memory artificial intelligence agent framework that integrates computational protocols, from docking to quantum chemistry, lab notebooks and chat logs relying on large language models (LLMs). It relies on a three-tier memory system: session-level observations are automatically captured and distilled into structured learnings, confirmed and elevated to project-tier entries and, when human-validated, promoted to cross-project rules that actively guide subsequent work and provide direct chemical feedback. We illustrate Magnolia on four case studies: quantum-chemical evaluation of aromatic systems (COMPAS database), molecular dynamics of butane and of modified DNA, and a protein–peptide docking campaign. Across these projects, Magnolia tracked 317 runs and accumulated 116 project-tier entries, from which four cross-project rules were promoted; in controlled replays of four tasks, runs with memory passed the checks that runs without it failed (for example, ten of ten docking-configuration checks, against one to four of ten). By combining automation, reproducibility, and human-in-the-loop control, our Magnolia framework streamlines docking, molecular dynamics and quantum chemistry calculations with direct analysis and LLM-augmented feedback, offering accelerated access to computational (bio)chemistry.

1 Introduction

Computational (bio)chemistry has reached a stage of maturity as projects now typically combine several methods from docking to all-atom molecular dynamics (MD) simulations and quantum chemistry [1]. Quantum-chemical datasets and databases provide a growing resource for this work [2]. High-performance computing (HPC) resources allow intensive studies with several hundred quantum-mechanical (QM) calculations, thousands of docking calculations and an interplay with all-atom MD simulations up to microsecond-range trajectories. This abundance of increasingly accurate data naturally calls for robust analysis protocols and careful visual inspection of structures and MD trajectories.

Yet in virtual screening, the field’s highest-throughput engine, analytical practice typically stops at score-based triage, with visual inspection of top-ranked poses still a crucial step [3]. Systematic contact-level analysis that would explain why a campaign succeeded or failed remains rare: interaction-fingerprint methods serve mainly as rescoring devices [4], although tools such as ProLIF support explanatory analysis [5], and the per-residue decomposition needed to rationalize rankings is deferred to later project stages or never performed. Such depth requires retained, comparable run histories, precisely what current workflows discard. It also requires analysis capability: writing custom scripts to mine each project’s outputs is prohibitive for many researchers.

To take full advantage of ever-increasing experimental or computational data, which are produced in the labs routinely, one needs new computational strategies or workflows to better capture the chemical lessons from intensive computational studies. Protocol insights, custom scripts and error resolutions are often scattered across lab notebooks, local directories and execution logs, with limited standardization or systematic reporting. These records are not always shared in full, which complicates the reproduction of a study [6]. Negative findings, often valuable for preventing wasted effort, are systematically lost because publication venues rarely reward reporting them [7]. When a new graduate student joins a project or a lab moves to a new protein target, the accumulated wisdom of prior work is effectively invisible: it must be rediscovered through the same trial and error that produced it.

Workflow managers and electronic lab notebooks partially address these limitations. Tools like Snakemake [8], Nextflow [9], and FireWorks [10] capture what was run: the command, the parameters, the exit code. Electronic lab notebooks record what was obtained or observed: operating conditions, yields, spectra, plots; they can also preserve procedures and reasoning. Executable notebooks, such as those edited in JupyterLab [11], combine the code, narrative and outputs of an analysis. Git [12] records changes in scripts and protocols, making revisions traceable and reversible, but it versions the artifacts, not the lessons extracted from them.

Large language model (LLM) agents have recently been applied to scientific workflows, including computational (bio)chemistry, demonstrating that natural language can drive tool invocation, result parsing, and error handling [13, 14, 15, 16, 17]; a perspective surveying the field counts forty-nine such systems for atomistic simulation as of August 2026 [18]. Most of these systems, however, treat each session as an independent event; CASCADE's consolidated memory and Mimosa's workflow archive are the exceptions. The agent that helped refine a protocol on Friday has no memory of what it learned when work resumes on Monday.

This gap is acknowledged by the field itself: the developers of one state-of-the-art molecular-dynamics agent note that they “do not include persistent memory for the agent, so each new run has no recollection of any prior runs” and flag long-term memory as future work [14]; post-mortems of fully autonomous research attempts identify “memory and context degradation across long-horizon tasks” among recurring failure modes, with models that “systematically lost track of previous decisions” as sessions progressed [19]; long-horizon autoresearch frameworks still “lack mechanisms for continuity, recovery from dead ends” [20]; and surveys of agent memory, from early context-management systems such as MemGPT to recent position papers, conclude that agents require “proactive memory management rather than ephemeral, forgetful behaviors” [21, 22]. The atomistic-simulation agent survey classifies architecture, autonomy and delegation, but does not systematically assess persistent cross-session memory [18]. A further challenge is to distinguish what the machine learns from what a human has confirmed. The aim is therefore a system that accumulates protocol knowledge across sessions and projects, compressing experience into durable rules that actively shape future behavior.

Such a system sits at a boundary between autonomous execution and supervised assistance that the agent community has only begun to name: as argued for skill-acquiring agents, “tool use is not a unique ability of humans; what distinguishes humans is the cumulative acquisition of skills” [15]. At one extreme, attempts at fully autonomous research have shown reliability limitations: one case study reported implementation or evaluation failure in three of four attempts [19]. Agent Laboratory also reported higher mean scores from automated reviews than from human reviewers (6.1 versus 3.8 out of 10) [23]. On the other hand, the CASCADE authors identify sustained skill mastery, human-agent collaboration and memory-based consolidation as areas that remain underexplored [15]. Between these extremes lies a middle ground: persistent memory with human-gated promotion, in which the agent organizes and surfaces evidence (contact maps, scoring tables, reproducibility metrics) while the researcher retains interpretive authority. Persistent memory addresses the first barrier, agent-generated analysis the second, with the aim of making contact-level explanation more accessible. This posture mirrors the grounding discipline of deployed industrial research assistants, whose responses are “grounded in retrieved evidence and linked back to the original sources” [24], and aligns with broader evidence from human-AI research collaboration, where “every step required rigorous human verification” [25] and staged human feedback improved several assessed aspects of output quality [23].

The design of such a memory can draw on cognitive science. Long-lived agents need more than a long context window: episodic memory stores instance-specific experience rapidly, and a complementary consolidation process distills it into durable, general knowledge [26]. This distinction between fast, specific experience and slow, consolidated knowledge suggests a tiered memory architecture.

We introduce MAGNOLIA, a persistent-memory artificial intelligence (AI) agent framework for computational chemistry that realizes this middle ground through a three-tier memory architecture:

  1. Tier 1, the session tier, automatically captures tool invocations, exit codes, and error traces, then distills the conversational context into structured learnings via LLM-driven extraction.

  2. Tier 2, the project tier, holds confirmed entries (error resolutions, success patterns, failure modes, parameter guidance) that are promoted from staging by human confirmation or, for entries recurring across sessions at high confidence, automatically.

  3. Tier 3, the reviewed tier, elevates project-level learnings into durable cross-project knowledge, routed by content class: operational rules are loaded into the agent's context at every session start and govern subsequent behavior, while task-shaped protocols are retrieved as on-demand skills. Rules can encode anything from protocol checklists (validate all input PDBs before submission) to tool-specific pitfalls (template-built peptide geometry can yield unphysical bond lengths) to scoring conventions (use AIR-free scores, not raw HADDOCK scores, for cross-variant comparison).

Promotion from the project tier to the reviewed tier is human-gated by design: an LLM proposes candidate elevations based on observation frequency and consensus panel judgment, but only a human confirms them. Magnolia's role throughout is evidential rather than prescriptive: it amplifies the researcher's ability to learn from their own data; it does not replace their judgment. This architecture directly targets two recurring losses in computational chemistry workflows: undiagnosed systematic protocol biases and the silent discard of negative results. Its memory architecture offers a basis for adaptation to other computational science domains.

References (46)