opentrons-integration
它能做什么
这个工具可以帮你为 Opentrons 实验室机器人创建和测试程序(称为“协议”,protocols)。它能确保机器人准确地完成液体转移等任务。
适用场景
- ✓当你要为 Opentrons 机器人创建新协议时。
- ✓当你想在机器人上运行协议之前,先测试它是否能正常工作时。
- ✓当你需要将协议适配到其他机器人型号(Flex 或 OT-2)时。
技能链接
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/opentrons-integration/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个协议,使用 Flex 机器人将 100 微升液体从储液槽 A1 转移到板的 A1 孔中。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要提供机器人、耗材(labware)和液体的相关信息。然后工具会生成所需的 Python 代码,并允许你模拟运行过程,检查是否存在错误。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Opentrons Integration
Overview
Create production-minded Python Protocol API v2 protocols for Opentrons Flex and OT-2. This skill covers protocol structure, hardware and deck configuration, liquid handling, runtime customization, module control, simulation, and safe deployment.
The verified baseline as of 2026-10-01 is:
opentrons==10.0.0for reproducible Flex simulation.opentrons==9.0.0for local OT-2 API 2.28 compatibility simulation.- Flex supports API levels 2.15 through 2.30 on current software.
- OT-2 supports API levels 2.0 through 2.28 on current software.
- API 2.29 and later are Flex-only at this baseline. Keep OT-2 at 2.28 or lower.
- Bundled Flex templates retain API 2.29 because step grouping is their newest required feature. API 2.30 fixes start-only meniscus aspiration.
- The 10.0.0 library reports a local maximum of 2.31, ahead of the documented robot maximum 2.30. Do not infer robot support from that constant.
Read references/sources.md for the upstream documentation used for this
snapshot. Recheck the official versioning page before targeting newer robot
software.
Safety Boundary
Opentrons protocols control physical equipment. Never treat successful Python syntax or local simulation as permission to run on a robot.
Before live execution:
- Simulate locally with the same pinned
opentronsversion used for authoring. - Import the protocol into the correct Opentrons App and require successful analysis.
- Verify robot model, software, pipettes, mounts, modules, adapters, labware definitions, deck fixtures, tip count, source volumes, dead volumes, and destination capacity.
- Review the run preview and deck map with the operator.
- Perform a slow dry run with nonhazardous liquid when geometry, custom labware, partial tip pickup, or gripper moves are new.
- Keep the emergency stop accessible and follow site-specific biosafety, chemical-safety, and contamination-control procedures.
Simulation cannot verify physical calibration, liquid properties, meniscus behavior, labware manufacturing tolerances, cap or seal removal, tubing, or all possible collisions.
Choose the Right Interface
Use this skill for Python files imported into the Opentrons App and run through the Protocol API.
- Use Protocol Designer for supported no-code workflows.
- Use PyLabRobot for a hardware-agnostic workflow spanning vendors.
- Treat the robot's HTTP API as a separate integration surface. If direct HTTP control is explicitly required, use the OpenAPI document served by the target robot and do not infer endpoints from Protocol API methods.
Required Intake
Do not write final protocol code until these facts are known:
- Robot: Flex or OT-2, plus installed robot software.
- Pipette model, volume range, channel count, and mount.
- Modules and generations; Flex Gripper or Stacker availability.
- Exact labware API load names and custom definition files, if any.
- Deck fixtures: Flex trash bin, waste chute, staging slots, or Stackers.
- Source volumes, destination volumes, dead volume, mixing needs, and liquid characteristics.
- Tip policy: contamination boundaries, reuse policy, filters, partial pickup, and total tips.
- Operator interventions, incubation timing, runtime parameters, and output files.
- Acceptance criteria: tolerated volume error, required controls, and dry-run plan.
If any physical configuration is uncertain, produce a parameterized draft and an explicit assumptions list rather than guessing.
Install and Simulate
Flex:
uv run --no-project --isolated --python 3.12 --with "opentrons==10.0.0" opentrons_simulate protocol.py
OT-2 API 2.28:
uv run --no-project --isolated --python 3.12 --with "opentrons==9.0.0" opentrons_simulate protocol.py
The 10.0.0 package rejects OT-2 protocols after the Flex/OT-2 release-line split. Always complete OT-2 analysis in the current OT-2 App.
For a dedicated Flex environment:
uv venv --python 3.12 .venv-opentrons
uv pip install --python .venv-opentrons/bin/python -r skills/opentrons-integration/requirements-flex.txt
.venv-opentrons/bin/opentrons_simulate protocol.py
Use requirements-ot2.txt instead for an OT-2 compatibility environment. On
Windows, invoke the executable from .venv-opentrons\Scripts\opentrons_simulate.exe.
Local simulation is for Python protocols; import Protocol Designer JSON files
into the appropriate Opentrons App instead.
…
常见问题
什么是“协议”(protocols)?
协议是告诉实验室机器人该做什么的分步指令,例如在不同容器之间转移液体。
Flex 和 OT-2 有什么区别?
Flex 和 OT-2 是两种不同型号的 Opentrons 机器人,各自有不同的规格和软件版本,编写协议时需要考虑这些差异。
什么是“模拟”(simulation)?
模拟就像一次虚拟试运行。工具会在电脑上执行协议,看看它是否按预期工作,而无需使用实际的机器人。
详情
作者的原始描述
Authors, reviews, migrates, simulates, and troubleshoots official Opentrons Python Protocol API v2 protocols for Flex and OT-2 robots. Use for robot-specific liquid handling, deck and labware setup, pipettes, modules, runtime parameters, liquid classes, and Opentrons App analysis. Use pylabrobot instead when one workflow must support multiple robot vendors.
热度
- GitHub 星标
- 51k
- 排名
- #3514
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …