OpenAI4S: Code as Action, Science as Sessions

Gongbo Zhang, Hao Li, Yu Wang, Mujie Lin, Liuzhenghao Lv +13 more
9/14/2026
cs.AIcs.CLcs.SE

Official code: PKU-YuanGroup/OpenAI4S (662 stars, Python, MIT, last commit 2026-09-15).

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}.

Show full abstract

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}.

View on arXivView PDF

Code Implementations(1)

MIT

9.9 元豆包 API 复刻 Claude Science

66279Python, TypeScriptJul 6, 20262 months agoMIT
agentai4scienceclaude-sciencemit-licenseopen-source+1 more

Similar Papers

Cite this paper

@article{zhang2026openais,
  title  = {OpenAI4S: Code as Action, Science as Sessions},
  author = {Gongbo Zhang and Hao Li and Yu Wang and Mujie Lin and Liuzhenghao Lv and Yicheng Mao and Yimi Wang and Jun Zhu and Minhan Tang and Zhengxiang Jiang and Yusong Wang and Jiayu Yao and Kunpeng Ning and Dawei Pang and Yonghong Tian and OpenAI4S Community and Yuyang Liu and Li Yuan},
  year   = {2026},
  eprint = {2609.15096},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.15096v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.15096.svg)](https://codeofpaper.com/paper/2609.15096)

Discussion