Logo Hamilton Star

Hamilton Star

Cộng đồng
jkitchin
hamilton-star

Program Hamilton STAR and STARlet liquid handling robots from Python with PyLabRobot 0.2.x (open source, talks to the robot's firmware over USB, no VENUS needed). Covers installing (pip, USB/libusbK drivers, switching back to VENUS), building a deck with carriers, tip racks and plates, simulating protocols, 8-channel and 96-head pipetting, moving plates with the iSWAP or CoRe grippers, liquid-level detection, Hamilton liquid classes and firmware errors. Use whenever the user mentions a Hamilton STAR, STARlet, Microlab STAR, ML STAR, PyLabRobot, pylabrobot, STARBackend, or wants to automate pipetting, plate moves or serial dilutions on a Hamilton robot from Python, even if they don't name the library.

Tổng quan

Nhà phát hànhjkitchin
Kho mãknowhow
Tên kỹ nănghamilton-star
Sao
45
Bản fork
9
Tệp đi kèm
7
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 7 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được jkitchin công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Hamilton Star trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/jkitchin/knowhow/tree/main/skills/laboratory/hamilton-star
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jkitchin/knowhow.git /tmp/knowhow
mkdir -p .claude/skills
cp -r /tmp/knowhow/skills/laboratory/hamilton-star .claude/skills/hamilton-star
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Hamilton Star trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Hamilton Star ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Hamilton Star với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Hamilton STAR / STARlet with PyLabRobot

Overview

PyLabRobot (PLR) is an MIT-licensed Python SDK that drives Hamilton STAR and STARlet robots by sending firmware commands over USB. It replaces Hamilton's VENUS software for the session: you describe the deck in Python, then call aspirate, dispense, move_plate, etc. The same code runs against a simulator first.

This skill targets pylabrobot 0.2.2, the current stable release (July 2026), and every example in examples/ was run against it. See "Version note" at the end before using 1.0.

Safety first. This code moves a real robot. Always:

  1. run the protocol with the simulator (STARChatterboxBackend) and trackers on before hardware;
  2. check the deck in Python matches the physical deck (carrier type, rail, site, labware);
  3. keep the front cover closed and someone near the robot for the first hardware run;
  4. call await lh.stop() in a finally so the USB connection is released.

PyLabRobot is not made or supported by Hamilton. Whether using a firmware driver affects your service contract is between you and Hamilton.

When to use something else

  • The lab must keep VENUS methods and liquid classes running as-is: use pyhamilton (Windows only, drives VENUS).
  • Opentrons robots: see the opentrons skill. PLR also supports the OT-2, Tecan EVO and Hamilton Vantage with the same LiquidHandler API but a different backend.

Install

bash
python -m venv env && source env/bin/activate      # Windows: .\env\Scripts\activate
pip install "pylabrobot[usb]==0.2.2"
python scripts/check_env.py                        # version, libusb, robot on USB
  • Linux: nothing more.
  • macOS: brew install libusb. (Known issue: some macOS 15 machines don't find the robot.)
  • Windows: replace the "ML Star" USB driver with libusbK using Zadig, with VENUS closed. VENUS and pyhamilton then stop working until you switch the driver back.

Full steps, switching back to VENUS, and fixes for USB errors: references/install.md.

The workflow

Every protocol has the same shape: build the deck, create a LiquidHandler, setup(), run steps, stop(). All robot calls are async, so run them with asyncio.run(...) in a script or top-level await in Jupyter.

python
import asyncio
from pylabrobot.liquid_handling import LiquidHandler
from pylabrobot.liquid_handling.backends import STARBackend
from pylabrobot.liquid_handling.backends.hamilton.STAR_chatterbox import STARChatterboxBackend
from pylabrobot.resources import (
    STARLetDeck,
    TIP_CAR_480_A00,
    PLT_CAR_L5AC_A00,
    hamilton_96_tiprack_300uL_filter,
    cor_96_wellplate_360uL_Fb,
    set_tip_tracking,
    set_volume_tracking,
)


def build_deck():
    deck = STARLetDeck()  # STARDeck() for a full-size STAR
    tip_car = TIP_CAR_480_A00(name="tip_carrier")
    tip_car[0] = hamilton_96_tiprack_300uL_filter(name="tips_01")  # site 0 = front-most
    deck.assign_child_resource(tip_car, rails=1)
    plt_car = PLT_CAR_L5AC_A00(name="plate_carrier")
    plt_car[0] = cor_96_wellplate_360uL_Fb(name="source")
    plt_car[1] = cor_96_wellplate_360uL_Fb(name="dest")
    deck.assign_child_resource(plt_car, rails=8)
    return deck


async def main(simulate=True):
    set_tip_tracking(True)  # error on picking up a tip that isn't there
    set_volume_tracking(True)  # error on aspirating more than a well holds
    backend = STARChatterboxBackend() if simulate else STARBackend()
    lh = LiquidHandler(backend=backend, deck=build_deck())
    await lh.setup()  # on hardware: initializes the robot, can take a minute
    try:
        tips = lh.deck.get_resource("tips_01")
        src, dst = lh.deck.get_resource("source"), lh.deck.get_resource("dest")
        for w in src["A1:H1"]:
            w.tracker.set_volume(200)  # what is really in the wells (uL)

        await lh.pick_up_tips(tips["A1:H1"])  # one tip per channel, 8 channels
        await lh.aspirate(src["A1:H1"], vols=[100] * 8)
        await lh.dispense(dst["A1:H1"], vols=[100] * 8)
        await lh.return_tips()  # or discard_tips() to the trash
    finally:
        await lh.stop()


asyncio.run(main())

Key concepts

  • Deck, carriers, sites. The deck has rails (STARlet 32, STAR 56 in 0.2.x). Carriers sit on a rail; labware sits in a carrier site, carrier[i], with site 0 at the front. Names must be unique: you look things up with lh.deck.get_resource("name").
  • Wells and tips by name. plate["A1"], plate["A1:H1"] (a column, list of 8), plate["A1:A12"] (a row). plate.get_well("A1") returns a single well. plate.get_all_items() returns all 96.
  • Lists everywhere. aspirate/dispense take a list of containers and a list of volumes, one per channel used. use_channels=[0, 2] picks specific channels (channel 0 is the back-most).
  • Units. Volumes in uL, flow rates in uL/s, distances in mm, offsets=[Coordinate(x, y, z)] shift a channel from its default position in the well.
  • Trackers. With tracking on, mistakes raise in simulation (HasTipError, TooLittleLiquidError, ...) before they happen on the robot. Set real starting volumes with well.tracker.set_volume(uL).
  • Inspect the deck. print(lh.deck.summary()) shows every carrier, site and position. Save and reload a layout with deck.save("deck.json") and Deck.load_from_json_file("deck.json").
  • Visualizer. from pylabrobot.visualizer.visualizer import Visualizer, then vis = Visualizer(resource=lh); await vis.setup() opens a browser view that animates the run.

Core operations

TaskCall
Tips on / offpick_up_tips(tip_spots), drop_tips(tip_spots_or_trash), return_tips(), discard_tips()
Pipetteaspirate(wells, vols), dispense(wells, vols)
One source to manytransfer(source_well, target_wells, source_vol=...)
Mix while pipettingmix=[Mix(volume=30, repetitions=3, flow_rate=100)] (from pylabrobot.liquid_handling.standard)
96 headpick_up_tips96(rack), aspirate96(plate, volume), dispense96(plate, volume), return_tips96(), discard_tips96()
Move labwaremove_plate(plate, carrier[site]) (iSWAP), add use_arm="core" for CoRe grippers; move_lid, move_resource

examples/ has runnable versions: 01_basic_transfer.py, 02_96head_stamp.py, 03_move_plate_iswap.py. Each runs in simulation by default and on hardware with --hardware. Full signatures and parameters: references/api.md.

STAR-specific options

Extra keyword arguments to aspirate/dispense are passed straight to the STAR backend. Most take one value per channel:

python
from pylabrobot.liquid_handling.backends import STARBackend

await lh.aspirate([well], vols=[50], lld_mode=[STARBackend.LLDMode.GAMMA])  # capacitive LLD
await lh.dispense([well], vols=[50], jet=[True], blow_out=[True])  # jet dispense
  • Liquid-level detection: lld_mode = OFF, GAMMA (capacitive), PRESSURE, DUAL, Z_TOUCH_OFF.
  • Liquid classes: by default PLR picks a Hamilton liquid class from the tip, jet/blow-out and liquid, and corrects the volume. Override per channel with hamilton_liquid_classes=[...] or turn correction off with disable_volume_correction=[True].
  • Hardware queries: lh.backend.request_firmware_version(), request_machine_configuration(), probe_liquid_heights(...), move_channel_x/y/z(...).

Details and more options: references/api.md.

Errors

Firmware errors come back as Python exceptions. Multi-channel operations raise ChannelizedError, whose .errors maps channel index to the error (e.g. NoTipError, TipTooLittleVolumeError). Lower-level failures raise STARFirmwareError with .errors per module (e.g. TipAlreadyFittedError, NoCarrierError, PositionNotReachableError). Recovery recipes: references/troubleshooting.md.

Common mistakes

  • Forgetting await: the robot does nothing and Python only prints "coroutine was never awaited". Same for forgetting await lh.setup().
  • Running hardware code that was never simulated.
  • Deck in code doesn't match the real deck: wrong rail, site or labware definition. Check with deck.summary() and by eye before the first run.
  • VENUS (or a VENUS service) still running and holding the USB device.
  • Passing one number where a list is expected: vols=[100], not vols=100, for aspirate.
  • Using names from other versions: in 0.2.2, labware functions are lowercase (cor_96_wellplate_360uL_Fb, not Cor_96_wellplate_360ul_Fb) and starting volumes use tracker.set_volume, not set_liquids.

Version note: PyLabRobot 1.0

pylabrobot 1.0.0b1 (pre-release, Sept 2026) changes the API: robots become devices (from pylabrobot.hamilton.star import STARlet; star = STARlet(simulation=True)), hardware is reached through star.pipettes, star.head96, star.iswap, star.core_grippers, and rails= becomes track=. The 0.2 imports in this skill still work in 1.0 under pylabrobot.legacy with deprecation warnings. Pin pylabrobot[usb]==0.2.2 until this skill is updated. scripts/check_env.py warns if 1.0 is installed.

References

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Hamilton Star làm được gì?

Program Hamilton STAR and STARlet liquid handling robots from Python with PyLabRobot 0.2.x (open source, talks to the robot's firmware over USB, no VENUS needed). Covers installing (pip, USB/libusbK drivers, switching back to VENUS), building a deck with carriers, tip racks and plates, simulating protocols, 8-channel and 96-head pipetting, moving plates with the iSWAP or CoRe grippers, liquid-level detection, Hamilton liquid classes and firmware errors. Use whenever the user mentions a Hamilton STAR, STARlet, Microlab STAR, ML STAR, PyLabRobot, pylabrobot, STARBackend, or wants to automate...

Vì sao nên dùng Hamilton Star trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Hamilton Star là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Hamilton Star trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/jkitchin/knowhow/tree/main/skills/laboratory/hamilton-star. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Hamilton Star?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Hamilton Star với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Hamilton Star với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Hamilton Star có miễn phí không?

Có. Kỹ năng này được jkitchin phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇