ZhuYanTech/dsh-biomni0

dsh-biomni

DSH plugin: a persistent, per-session Python interpreter provisioned with Biomni's biomedical tool library, plus a Settings section that reports what the interpreter can actually do.

包名
dsh-biomni
版本
0.1.0
许可证
MIT
最近更新
2026年8月31日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ZhuYanTech/dsh-biomni

dsh-biomni

Biomedical research, wired into DeepSeek Harness.

A persistent Python interpreter, Biomni's 218 research functions, its 76-dataset data lake, and 113 bioinformatics tools — offered to your agent as skills that only ever promise what your machine can actually deliver.

DSH Plugin License: MIT

English · 简体中文


The failure this prevents

Give an agent a biomedical tool library and it fails in a particular, nasty way.

It calls query_pubmed. The function exists, but its dependency was never installed, so it raises. The agent does not report the gap — it quietly writes its own PubMed client and hands you the result as though it came from the validated tool. Point it at a data lake it does not have and the same thing happens with a file path: a plausible guess, then a plausible answer.

dsh-biomni's one rule: never advertise what this machine cannot deliver. Everything your agent is told about — every function, dataset, and command-line tool — is generated by checking your actual environment first. Anything missing is either left out, or named out loud along with what it needs.

What your agent gets

🐍 A Python interpreter that remembersOne process per session. Imports, dataframes and fitted models survive from one call to the next, so the agent works in small steps instead of resending a script every time.
🧬 21 research-function skillsBiomni's biomedical library, one skill per module, carrying real signatures — parameter types, defaults, and what each one means. Loaded on demand, so 218 functions cost ~1.6k tokens of context instead of ~26k.
🗄️ A data lake skillThe biomedical datasets actually downloaded on this machine, with exact paths, sizes, and licence flags. Prefer local data over a web round trip.
🔧 A software skillThe bioinformatics packages and CLI tools actually installed here — so the agent reaches for samtools instead of reimplementing it.
🔍 An honest environment reportThe /biomni command and a Settings page telling you exactly what works, what doesn't, and which package would fix it.

It is an ordinary out-of-tree plugin. It does not fork or patch the harness.

Install

1. Build a Python environment with Biomni

Biomni needs Python 3.11+ and about 1 GB of dependencies. macOS ships 3.9, which will not do.

git clone https://github.com/ZhuYanTech/dsh-biomni && cd dsh-biomni
python3.11 -m venv .venv
.venv/bin/pip install -r python/requirements-biomni.txt

Biomni declares three dependencies and needs far more. requirements-biomni.txt is the real list, found by reading its source — and annotated with what each package unlocks.

2. Add the plugin

Not published to npm yet, so install it straight from GitHub:

dsh plugin --profile web add "github:ZhuYanTech/dsh-biomni"

The first run will fail, and that is expected. A git dependency is built on the fly by its prepare script, and pnpm blocks dependency build scripts by default. The error prints the exact key you need. Add it to your profile's own pnpm-workspace.yaml:

# $DSH_HOME/profiles/web/pnpm-workspace.yaml
allowBuilds:
  "dsh-biomni@https://codeload.github.com/ZhuYanTech/dsh-biomni/tar.gz/": true

Then run the command again. The key carries a commit SHA, so it changes whenever the repo does.

3. Point it at your interpreter

Start dsh --profile web, open Settings → Biomni, and set the Python interpreter to /abs/path/to/.venv/bin/python. It takes effect immediately.

Or write it into $DSH_HOME/settings.yaml:

biomni:
  python: /abs/path/to/.venv/bin/python   # the venv from step 1
  dataPath: /abs/path/to/data             # optional: holds biomni_data/
  timeoutMs: 600000
  guardShellPython: true

4. See what you actually got

/biomni

Modules that import, functions that are callable, datasets on disk, tools installed — and for everything missing, the package that would fix it. Same numbers as the Settings page, because both read the same analysis.

Optional: the biomedical persona

The plugin gives every agent the interpreter and the skills. If you want one agent framed as a biomedical researcher — told to load the workflow skill first, to report missing packages rather than work around them — install the bundled preset:

pnpm run install:preset

Good to know

"Importable" and "callable" are different numbers. A Biomni module can import perfectly and still have functions that raise on call, because some import their dependencies inside the function body. dsh-biomni reports these separately and never averages them into one score — the whole point is that a single "82% available" figure would hide exactly the gap that causes invented results.

The data lake is yours to download. The 76 datasets are ~11 GB and arrive through Biomni's own flow, not this plugin. Nothing downloaded simply means no data-lake skill — a definite answer, not a failure.

Some datasets are non-commercial. Biomni ships a commercial-use subset (41 of 76). A dataset can be downloaded, readable, and still restricted, so the licence is tracked as its own fact and named in the skill.

Python belongs to run_python, not the shell. A guard stops the agent from reaching a different interpreter through bash — but it lets through calls that name your configured interpreter by absolute path, since those reach the right libraries. CLI tools like samtools run through bash as normal; only python and pip are restricted.

Under the hood

Biomni solves the "200+ tool schemas don't fit in context" problem with ToolRetriever, an embedding-based retriever. DSH's skill system already is that, in a better shape: the session catalog carries only a name and one-line description per skill, and the model loads a full body on demand through the skill tool. No embeddings, no similarity search, no retriever that can pick wrong — the selection is the model's own judgement.

Contributors and agents working in this repo should read AGENTS.md, which carries the constraints that are easy to break and hard to notice.

License

MIT. Biomni is MIT-licensed too; individual datasets in its data lake carry their own terms.