Open AI for Scientist
💸 Replicating Claude Science in two cuts or less
An open-source hybrid scientific research agent.
JSON tools orchestrate; persistent Python/R kernels do the science.
English · 简体中文
[!TIP]
Why "two cuts"? No pricey frontier-model key needed — OpenAI4S runs on Doubao (豆包) via the cheapest "Small" plan on Volcengine Ark (火山方舟): ¥9.9 / month (≈ US$1.4). Pick the ark provider in the UI and you get a Claude-Science-class agent for less than a cup of coffee.
Volcengine Ark · Agent Plan (Personal) — the entry Small tier is ¥9.9 / month.
🧬 JSON orchestration, Code-as-Action science
OpenAI4S deliberately has two action planes. Provider-native JSON tool
calls handle deterministic orchestration, permissions, metadata, external
services, and human approval. Python/R Code-as-Action handles computation,
exploration, analysis, simulation, and long-running scientific work in
persistent kernels. Python cells can synchronously call the in-kernel host
API while they run; R is an independent persistent analysis channel.
This is not a choice between tools and code: each does the job it is good at.
Tool-only and conversational work can finish through the Engine-owned,
strictly structured finalize_response action. Scientific cells keep the
important host.submit_output(...) completion contract, including structured
artifacts and metrics. host.submit_output is the only completion signal that
can fire inside a Cell; a later sole finalize_response may still close the
Engine after earlier Cells have run.
JSON control planePython/R science plane
Best forworkflow, permissions, metadata, servicescomputation, analysis, simulation
Action unitOne ordered native-tool batchOne complete code cell
Compositionauditable schemas and resource policyfor, if, libraries; Python also has mid-cell Host RPC
Stateappend-only Action Ledgerkernel memory + versioned artifacts
CompletionEngine-owned finalize_responsePython: host.submit_output(...); R: no in-cell completion
Extendingnamed Tool subclassimport a library or load a Skill
# ReAct: ~14 round-trips (read → … → filter → sort → plot). OpenAI4S: one code cell.
hits = [f for f in files if pattern in host.read_file(f)]
top3 = sorted(hits, key=os.path.getsize, reverse=True)[:3]
frames