Skip to content

Repository files navigation

autocell

A society of specialist agents that improve a scored scientific model in parallel — edit, evaluate, keep or revert — while you steer and decide what’s real.

Demo target: a virtual cell (gene-perturbation response, held-out Pearson r). The claim: a parallel society beats a lone agent, and the run stays legible enough to trust.

How we built it

AutoCell runs several agents at once, all improving the same model.

Container diagram of AutoCell

Each agent:

  1. picks a model from a shared archive,
  2. changes one part of it,
  3. trains and scores the result,
  4. writes it back to the archive.

The agents never message each other. The archive is their shared memory, so a later agent builds on what an earlier one found.

Each role runs on a different Qwen model, matched to the work.

How the engine uses Qwen

Agents can edit only the model file: its features, architecture, loss, and optimization. The data and the scoring metric stay out of reach, so the only way to score higher is to build a better model.

When a result looks too strong, AutoCell holds a review. One agent defends the change, another re-tests it on different data, and a third decides.

A web console lets you follow the experiments, inspect a change, watch the debate, and keep or drop the result. The review can also run aloud, over Qwen's real-time voice model.

Proof

Equal-budget comparison in results/step2/:

Society Solo Gap
Mock (mechanism) 0.280 0.238 +0.042
Qwen primary 0.2354 0.2348 +0.0005
Qwen robust (3 seeds) 0.2226 0.2193 +0.0034

The mock shows the search shape working when diversity is rewarded. The real Qwen edge is thin on primary and clearer on the robust k-split — reported honestly.

Quick start

# key — never commit it
cp .env.example .env          # set DASHSCOPE_API_KEY

# API (serves studies, meetings, live-voice proxy)
pip install -r requirements.txt
uvicorn server.app:app --reload --port 8000

# console
cd web && npm install && npm run dev
# open http://localhost:5173 — mock UI works with VITE_API unset
# for the real archive: VITE_API=http://127.0.0.1:8000

Society vs solo (torch-free mock, no dataset):

python -m bench.run --mock --mode society --budget 24
python -m bench.run --mock --mode sequential --budget 24

Deploy the API to Alibaba ECS (key injected at runtime only):

export ECS_HOST=<public-ip>
bash deploy/deploy.sh

Layout

prepare.py      frozen data + metric
train.py        the one editable model file
core/           archive, sampler, proposer, runner
bench/          society-vs-solo measurement harness
society/        meeting, cast, steering
llm/            Qwen client + realtime session
server/         FastAPI
web/            React console
results/step2/  the proof numbers
diagram/        architecture figures
deploy/         Dockerfile + ECS script

Stack

Python · FastAPI · SQLite · React/Vite · PyTorch (train.py) · Qwen Cloud (DashScope, OpenAI-compatible)

About

A society of agents, building a virtual cell.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages