OpenAI4S supports reliable AI scientific computing with persistent sessions

OpenAI4S: Code as Action, Science as Sessions

Artificial IntelligenceComputation and LanguageSoftware Engineering

Summary

Scientific research often involves complex computer tasks that need to be checked, repeated, and continued over time. The authors created OpenAI4S, a computer system that stores all the steps and code for research so it can be reviewed and resumed later. They tested it on various scientific problems and found it helps keep research workflows accurate and easier to manage than standard coding tools. However, fully re-running all experiments remains a challenge for all such systems, including theirs.

What this means in practice

  • For computational chemistry teams: Manage long computational experiments with a system that keeps the full history and state of code execution for easier review and continuation.
  • For bioinformatics developers: Develop reproducible pipelines combining Python and R kernels that record all steps and results for protein design and molecular simulations.

Authors

Gongbo Zhang, Hao Li, Yu Wang, Mujie Lin, Liuzhenghao Lv, Yicheng Mao, Yimi Wang, Jun Zhu, Minhan Tang, Zhengxiang Jiang, Yusong Wang, Jiayu Yao, Kunpeng Ning, Dawei Pang, Yonghong Tian, OpenAI4S Community, Yuyang Liu, Li Yuan

Abstract

AI co-scientists could accelerate computational research, but over a long-running study the workflow also has to stay inspectable, resumable and reproducible, which requires persistent computational state and provenance. Here we present OpenAI4S, an open-source scientific research agent built around the principle of \emph{Code as Action, Science as Sessions}. OpenAI4S combines a persistent computing runtime with research-session management: orchestration is handled through structured tool calls, while scientific actions are represented as complete code cells executed in persistent Python and R kernels. An append-only Action Ledger, per-cell execution records, versioned artifacts, environment records, and workspace checkpoints preserve how results were produced and support session recovery, branching, and extension. Configurable sandboxing, permission controls, and code and trajectory screening provide complementary safeguards. We evaluate OpenAI4S on 36 research scenarios spanning retrosynthesis, molecular dynamics, protein binder design, protein mutation, catalyst screening, and mineral spectroscopy, measuring scientific task accuracy, workflow completeness, and reproducibility of the resulting repositories. OpenAI4S achieves an overall score of 7.83, compared with 5.7--6.4 for a general-purpose coding harness evaluated with three frontier models, with the largest gains on long-horizon and computation-intensive workflows. These results suggest that integrating persistent execution with session-level provenance can improve the reliability of AI-assisted scientific workflows. Environment specification and full rerunnability remain weak for every evaluated system, ours included, so reproducibility is still an open problem for scientific agents. The system is available under the MIT license at \href{https://github.com/PKU-YuanGroup/OpenAI4S}{github.com/PKU-YuanGroup/OpenAI4S}.