
OpenAI4S
9.9 元豆包API复刻 Claude Science
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up OpenAI4S (pip project) into my current project. Found on https://claudeers.com/openai4s Repo: https://github.com/PKU-YuanGroup/OpenAI4S Homepage/docs: — Detected install method: pip → pip install openai4s Category: data. Platforms: cli, api, web. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: active; community-verified: false. Confirm the source before running anything.
pip install openai4s
git clone https://github.com/PKU-YuanGroup/OpenAI4S
// compatibility
| Platforms | cli, api, web |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Python |
Open AI for Scientist
💸 Replicating Claude Science in two cuts or less
An open-source, Code-as-Action scientific research agent.
The model's action space is a Turing-complete kernel — not a fixed tool schema.
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
arkprovider 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.
🧬 Code-as-Action, not ReAct
Most "AI agents" are ReAct + tool_use: each step the model emits one tool_use JSON, the host runs that single tool, and the loop repeats — the action space is a fixed menu. OpenAI4S instead emits a cell of real Python/R code that runs in a persistent kernel; every "tool" is a plain function on an in-kernel host object. The action space is a Turing-complete language — one turn can loop, branch, and call libraries while big objects stay resident in kernel memory.
🧰 ReAct + tool_use | 🧬 Code-as-Action (OpenAI4S) | |
|---|---|---|
| Action unit | One tool call (JSON) | An arbitrary program (a code cell) |
| Action space | A fixed menu of tools | A Turing-complete language (Python / R) |
| Loops & composition | Orchestrated over many round-trips | Done in one cell — for, if, comprehensions |
| Intermediate state | Lives in the model's context (text) | Lives in kernel memory (real objects) |
| Big objects | Serialized back into context | Stay resident; only a summary returns |
| N operations | ≈ N model round-trips | One round-trip can do many steps |
| Extending tools | Change the schema + the host | import a library, or read a Skill |
| ||
📣 News
2026-07-06🎉 Open-sourced — the pure-stdlib Code-as-Action engine, the scientific web app, 24 science Skills, and BYOC remote compute.
😮 Highlights
- 🧬 Code-as-Action engine — a Jupyter-style persistent kernel is the action space. Namespace persists across cells; big objects stay resident, only summaries hit context.
- 🐍 Pure-stdlib core — the engine and the web server are stdlib-only (
http.server+ hand-rolled WebSocket, no framework, no deps). The LLM client speaks OpenAI / Anthropic / Gemini overurllibalone. - 🔌 One-line multi-provider —
ark(doubao · glm · kimi · deepseek · minimax) plus officialchatgpt · claude · gemini, behind a singlehost.llm; switch from the UI. - 🖥️ Full scientific web app — live streaming turns, versioned artifacts (with a built-in 3Dmol viewer for
.pdb/.cif), a live Notebook sharing the agent's kernel, background & resume. - 🔬 24 bundled Skills — 14 GPU/model science Skills (AlphaFold2 · ESMFold2 · Boltz · Chai-1 · OpenFold3 · ProteinMPNN · ESM-2 · Evo2 · Borzoi · scGPT · scVI · DiffDock …) + research-workflow Skills. Skills are recipes of code, not JSON schemas.
- ☁️ BYOC remote compute — dispatch GPU jobs to your own machines via
ssh:<alias>or the bundled NVIDIA NIM provider; realhost.fold(single-sequence Protenix / AF3-class) under a strict no-fabrication policy.
🎬 Demo
Live API workflow — from UniProt / RCSB to a 3D structure & report![]() | Real-data analysis — human insulin INS (P01308): from UniProt / RCSB to a reproducible report![]() |
Visual artifact editing — “raise the confidence cutoff to 75” in one line![]() | Annotation-driven chart editing — lasso a region & recolor the legend![]() |
Plan-mode research — artemisinin & paclitaxel solubility prediction![]() | Protein engineering — from sequence to ranked mutants & structural rationale![]() |
⚡ Quickstart
git clone https://github.com/PKU-YuanGroup/OpenAI4S && cd OpenAI4S
./setup.sh # one-time: build the environment with uv
./start.sh # launch the web UI at http://127.0.0.1:8760/
setup.sh creates the .venv with uv; start.sh launches the daemon + web UI from it. No API key is needed to boot — set your model in the UI (Customize → Models). One-shot without the UI: uv run openai4s run "Compute the mean of [4,8,15,16,23,42] and submit it." -v.
📚 Documentation
| doc | what's inside |
|---|---|
| Architecture | the Code-as-Action dual loop, the host API, kernel design |
| Skills | the 24 bundled Skills + how to write your own |
| Remote compute | BYOC GPU jobs, host.fold, auto-provisioning |
| Web app | UI features, live Notebook, artifacts, the demo session |
| Configuration | model providers, env vars, conda envs, CLI |
| Security | defense-in-depth safety layers & remote-access notes |
🗺️ Roadmap
- OS-level sandbox parity (Seatbelt / bubblewrap + seccomp) for the local kernel.
- Keyless
web_searchbeyond DuckDuckGo (rate-limit resilience). - More BYOC providers (Modal / SLURM) beyond SSH + NVIDIA NIM.
- A public benchmark of end-to-end scientific workflows.
- Local GPU model serving so structure/design Skills run without remote compute.
💡 Contributing
OpenAI4S is a community effort to keep the Code-as-Action paradigm open.
Development setup
Requires Python ≥ 3.10 and uv.
git clone https://github.com/PKU-YuanGroup/OpenAI4S && cd OpenAI4S
./setup.sh # uv sync --extra science + pre-commit hook
uv run pytest # offline test suite (LLM mocked)
uv run pre-commit run --all-files # format + lint everything
Style is enforced by pre-commit — black, isort (--profile black), and ruff, pinned in .pre-commit-config.yaml. Runtime deps: the core is zero-dependency (pure stdlib); the optional science extra pins numpy>=1.24 · pandas>=2.0 · matplotlib>=3.7.
What we welcome
- New Skills — a
SKILL.md(+ optionalkernel.py) underskills/— recipes of code, not schemas. - New providers — a wire adapter in
openai4s/llm.py, or a BYOC compute provider. - Engine & UI — the core is pure stdlib and readable; the web app is framework-free.
Keep the core dependency-free, guard optional science imports behind try/except ImportError, and make sure uv run pytest and uv run pre-commit run --all-files pass before opening a PR.
👍 Acknowledgement & related work
- Claude Science (Anthropic) — the closed reference architecture whose Code-as-Action design, persistent kernel, host-RPC protocol, and safety layers OpenAI4S independently reproduces in open source.
- CodeAct — "Executable Code Actions Elicit Better LLM Agents" — code as a unified action interface.
- ReAct — "Synergizing Reasoning and Acting in Language Models" — the
tool_usebaseline this project departs from. - The science Skills stand on ColabFold / AlphaFold, ESM, OpenFold, Boltz, Chai, ProteinMPNN, DiffDock, Evo2, Borzoi, scGPT, scVI-tools and open data services (NCBI, UniProt, RCSB PDB, EBI, OpenAlex, Crossref).
🔒 License
Released under the MIT License — see LICENSE.
✨ Star history
✏️ Citing
@software{openai4s2026,
title = {OpenAI4S: An Open-Source Code-as-Action Scientific Research Agent},
author = {OpenAI4S contributors},
year = {2026},
url = {https://github.com/PKU-YuanGroup/OpenAI4S},
note = {Open AI for Scientist — a pure-stdlib reproduction of the Code-as-Action paradigm}
}
🤝 Community contributors
// faq
What is OpenAI4S?
9.9 元豆包API复刻 Claude Science. It is open-source on GitHub.
Is OpenAI4S free to use?
OpenAI4S is open-source under the MIT license, so it is free to use.
What category does OpenAI4S belong to?
OpenAI4S is listed under data in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/openai4s)
// retro hit counter
[](https://claudeers.com/openai4s)
// reviews
// guestbook
// related in Data & Analytics
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini 3.1 P…
Marketing skills for Claude Code and AI agents. CRO, copywriting, SEO, analytics, and growth engineering.
Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
CLI tool for configuring and monitoring Claude Code





