whatisgithub

What is openai4s?

pku-yuangroup/openai4s — explained in plain English

Analysis updated 2026-05-18

127PythonAudience · researcherComplexity · 4/5LicenseSetup · moderate

In one sentence

OpenAI4S is a low-cost open source AI research agent that mixes structured tool calls with live Python and R code execution to run real scientific analysis.

Mindmap

mindmap
  root((openai4s))
    What it does
      AI research agent
      Runs real Python and R code
      Low-cost alternative
    Tech stack
      Python
      R
      WebSocket
    Use cases
      Scientific data analysis
      Protein structure prediction
      Remote GPU compute
    Audience
      Scientists
      Researchers
    Providers
      Doubao
      ChatGPT
      Claude
      Gemini

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run an AI research agent that writes and executes Python or R code for real data analysis and simulation.

USE CASE 2

Use bundled scientific skills for tasks like protein structure prediction or single-cell biology analysis.

USE CASE 3

Connect to a low-cost model provider like Doubao instead of an expensive frontier model API.

USE CASE 4

Dispatch heavier computation jobs to a remote GPU machine over SSH when configured.

What is it built with?

PythonRWebSocketHTTP

How does it compare?

pku-yuangroup/openai4saripath/arimandobingook/bingo
Stars127128128
LanguagePythonPythonPython
Setup difficultymoderatemoderatemoderate
Complexity4/53/54/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires an AI model provider account or key, a one-click Mac app bundles Python and core libraries.

Permissive open-source license, use freely including for commercial purposes, with attribution.

So what is it?

OpenAI4S is an open source AI research agent built for scientific work, positioned as a much cheaper alternative to Claude Science. It can run on Doubao, a low-cost Chinese AI model service, for as little as about 9.9 yuan, roughly one and a half US dollars, per month, though it also supports ChatGPT, Claude, Gemini, and several other model providers through one shared interface. The project combines two ways of working. Structured tool calls handle predictable steps like permissions, approvals, and connecting to outside services. Separately, the agent can write and run Python or R code in a persistent session, which is where the actual scientific computation, data analysis, and simulation happen. The idea is that some tasks are better handled as clean, auditable steps, while open-ended analysis is better handled as real code that can loop, branch, and use libraries, rather than being forced through many small back and forth tool calls. It ships with a web based workbench showing live output, saved results, and a history of what the agent did, plus a notebook interface that is read-only by default unless a developer explicitly turns on manual editing. It includes 34 built in skills, many of them scientific tools for tasks like protein structure prediction and single-cell biology analysis, alongside general research workflow helpers. For heavier computation, it can dispatch jobs to remote GPU machines over SSH or through an NVIDIA integration, when one is configured. Security features include restricted environments for anything the agent runs locally, required approval steps, and operating system level sandboxing on Mac and Linux. A one click Mac app is available for Apple Silicon, bundling Python and the core scientific libraries, and it can also be installed as a Python package. The project is aimed at scientists and researchers who want an AI assistant that can genuinely run analysis code, not just describe what to do, and it is released under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through installing OpenAI4S as a Python package and connecting it to a model provider.
Prompt 2
How do I switch OpenAI4S from the Doubao provider to Claude or ChatGPT in the settings?
Prompt 3
Explain how the JSON tool calls and the Python and R code execution work together in this agent.
Prompt 4
Show me how to use one of the bundled scientific skills, like protein structure prediction, in OpenAI4S.
Prompt 5
How do I set up remote GPU compute over SSH for heavier analysis jobs in OpenAI4S?

Frequently asked questions

What is openai4s?

OpenAI4S is a low-cost open source AI research agent that mixes structured tool calls with live Python and R code execution to run real scientific analysis.

What language is openai4s written in?

Mainly Python. The stack also includes Python, R, WebSocket.

What license does openai4s use?

Permissive open-source license, use freely including for commercial purposes, with attribution.

How hard is openai4s to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is openai4s for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.