BEARS machines
Goal
Provide machine-selection and capability guidance for PUDA workflows, then load the correct machine reference before generating commands.
Critical Rule
If you are unsure which machine should be used for a command, ask the user before proceeding.
Do not assume.
Machine Capabilities and When to Use
First Machine (machine_id: "first")
Use for liquid handling and deck operations.
Capabilities:
- Pipetting workflows: aspirate, dispense, attach tip, drop tip
- Deck and labware workflows: load deck, position-dependent operations
- Sequenced robotic handling steps in wet-lab protocols
Use this machine when:
- The task is about moving liquids between wells/labware
- The user mentions tip usage, aspiration/dispensing, or deck slots/labware setup
Before command generation:
- Refer to: first-machine
- Run
puda machine commands first to understand available commands
- Follow constraints and sequencing in
references/first-machine.md
Biologic Machine (machine_id: "biologic")
Use for electrochemical testing and characterization.
Capabilities:
- OCV (Open Circuit Voltage)
- CA (Chronoamperometry)
- PEIS / GEIS (Impedance spectroscopy)
- CV (Cyclic Voltammetry)
- MPP variants (MPP, MPP_Cycles, MPP_Tracking)
Use this machine when:
- The task is an electrochemical measurement or battery/cell characterization
- The user asks for OCV, CA, EIS, CV, or MPP tests
Before command generation:
- Refer to: biologic-machine
- Run
puda machine commands biologic to understand available commands
- Follow constraints in
references/biologic-machine.md
Balance Machine
Use for gravimetric mass measurement via an Arduino-based USB load-cell balance on Linux.
Capabilities:
- Continuous calibrated mass readings from a load-cell over USB serial (
/dev/ttyUSB* or /dev/ttyACM*)
- Background reader thread streaming readings at ~4 Hz; no polling required
- Tare command to zero the balance before a dispense step
- Freshness check (
fresh flag) to detect stale/disconnected readings
- NATS telemetry publishing via the edge service
- Custom calibration CSV support
Use this machine when:
- The workflow requires weighing a container before or after a liquid transfer
- The user asks for gravimetric calibration, transfer error calculation, or balance feedback
- The task involves viscosity or transfer accuracy experiments needing mass data
Before use:
- Refer to: balance-machine
- Ask the user for the Linux serial port (
/dev/ttyUSB1, etc.) - do not assume
- Ensure the edge service is running (
uv run --package balance-edge python edge/balance.py)
Opentrons Machine (machine_id: "opentrons")
Use for automated liquid handling and full protocol generation on the Opentrons OT-2 robot.
Capabilities:
- Full protocol code generation via
Protocol.to_python_code() - produces valid runnable OT-2 Python
- Pipetting workflows:
aspirate, dispense, transfer (with auto-chunking for large volumes)
- Tip management:
pick_up_tip, drop_tip
- Deck and labware setup:
load_labware, load_instrument
- Flow control:
flow_rate, air_gap, blow_out, touch_tip, move_to
- Protocol utilities:
delay, comment, home
- CSV-driven loops:
read_csv_file + loop for data-driven protocols
- Custom labware support: AMDM mass balance vials (30 mL, 50 mL) discovered from the Opentrons driver labware catalogue and loaded through normal
load_labware commands
- All gen2 pipette types: p10, p20, p300, p1000 (single and multi-channel)
- External camera image capture:
camera_capture - triggers the external camera mounted above the deck to capture and save a still image of the wellplate
Use this machine when:
- The user references an Opentrons OT-2 robot
- The task involves generating a complete OT-2 protocol or individual liquid handling commands
- The user mentions Opentrons labware (tip racks, well plates, reservoirs, NEST, Corning, mass balance vials)
- The workflow requires data-driven dispensing from a CSV file
- The workflow requires capturing a camera image of the wellplate after dispensing steps
Before command generation:
- Refer to: opentrons-machine
- Before any physical Opentrons run, load and follow puda-opentrons-vision-validation: capture a fresh deck image, verify every protocol slot is occupied by the expected labware/item, and ask the user to confirm uncertain or mismatched labware before execution.
- Run
puda machine commands opentrons to understand available commands
- Follow all command types, params, sequencing rules, and labware constraints in
references/opentrons-machine.md
Elephant Machine (machine_id: "elephant")
Use for 6-axis robot arm manipulation, Cartesian/joint motion, electric gripper actions, scan/reset flows, and camera-guided vision steps.
Capabilities:
- Cartesian pose motion and relative moves
- Joint-angle and single-axis motion controls
- Scan positioning and reset-oriented recovery workflows
- Electric gripper operations:
init_gripper, open_gripper, close_gripper
- Pi-camera and livestream image capture for vision-guided tasks
- Pixel-to-robot offset conversion for calibrated camera workflows
Use this machine when:
- The task requires a robot arm to move to coordinates or execute pick-and-place style steps
- The user asks for Elephant arm motion, scan/reset behavior, or arm recovery after stop/power loss
- The workflow includes gripper control, Pi-camera capture, or livestream snapshot capture from the Elephant setup
Before command generation:
- Refer to: elephant-machine
- Run
puda machine commands elephant to understand available commands
- Follow motion, gripper, camera, and sequencing constraints in
references/elephant.md
Selection Workflow
- Parse user intent and identify the tasks.
- Match intent to the machine capabilities above.
- If machine selection is unclear or ambiguous, ask the user and wait for confirmation.
- Load the corresponding reference file and CLI help.
- Generate commands only after machine choice is confirmed.
Output Guidance
When answering machine-selection questions:
- State the recommended machine and a one-line reason tied to capability.
- If uncertain, ask a direct clarification question instead of guessing.
Critical sequencing rules
opentrons protocols must always end with no tip attached to any pipette.
opentrons deck slot (location) for every load_labware command must be explicitly confirmed by the user - never assume a slot.
- Before any physical
opentrons run, perform vision validation of deck-slot occupation/labware; do not run if a required slot is empty, mismatched, obstructed, or not visible unless the user explicitly approves.
opentrons capture_image must be its own standalone protocol - never combined with pipetting commands in the same protocol.
balance - always call startup() before reading and shutdown() after. Always tare before a dispense step. Always verify fresh == True before using a reading.
elephant - ensure the arm is connected and powered before motion. For electric gripper workflows after a power cycle, call init_gripper() before open_gripper() or close_gripper(). Prefer scan() before camera-guided work.
1---2name: bears-machines3description: Discover PUDA machine capabilities at bears and choose the right machines for protocol generation. Use when you need to know more about a machine, how to use a machine, or how to generate commands and protocols for any PUDA-connected machine.4---56# BEARS machines78## Goal910Provide machine-selection and capability guidance for PUDA workflows, then load the correct machine reference before generating commands.1112## Critical Rule1314If you are unsure which machine should be used for a command, **ask the user** before proceeding.15Do **not** assume.1617## Machine Capabilities and When to Use1819### First Machine (`machine_id: "first"`)2021Use for **liquid handling and deck operations**.2223Capabilities:24- Pipetting workflows: aspirate, dispense, attach tip, drop tip25- Deck and labware workflows: load deck, position-dependent operations26- Sequenced robotic handling steps in wet-lab protocols2728Use this machine when:29- The task is about moving liquids between wells/labware30- The user mentions tip usage, aspiration/dispensing, or deck slots/labware setup3132Before command generation:33- Refer to: [first-machine](references/first-machine.md)34- Run `puda machine commands first` to understand available commands35- Follow constraints and sequencing in `references/first-machine.md`3637### Biologic Machine (`machine_id: "biologic"`)3839Use for **electrochemical testing and characterization**.4041Capabilities:42- OCV (Open Circuit Voltage)43- CA (Chronoamperometry)44- PEIS / GEIS (Impedance spectroscopy)45- CV (Cyclic Voltammetry)46- MPP variants (MPP, MPP_Cycles, MPP_Tracking)4748Use this machine when:49- The task is an electrochemical measurement or battery/cell characterization50- The user asks for OCV, CA, EIS, CV, or MPP tests5152Before command generation:53- Refer to: [biologic-machine](references/biologic-machine.md)54- Run `puda machine commands biologic` to understand available commands55- Follow constraints in `references/biologic-machine.md`5657### Balance Machine5859Use for **gravimetric mass measurement via an Arduino-based USB load-cell balance on Linux**.6061Capabilities:62- Continuous calibrated mass readings from a load-cell over USB serial (`/dev/ttyUSB*` or `/dev/ttyACM*`)63- Background reader thread streaming readings at ~4 Hz; no polling required64- Tare command to zero the balance before a dispense step65- Freshness check (`fresh` flag) to detect stale/disconnected readings66- NATS telemetry publishing via the edge service67- Custom calibration CSV support6869Use this machine when:70- The workflow requires weighing a container before or after a liquid transfer71- The user asks for gravimetric calibration, transfer error calculation, or balance feedback72- The task involves viscosity or transfer accuracy experiments needing mass data7374Before use:75- Refer to: [balance-machine](references/balance-machine.md)76- Ask the user for the **Linux serial port** (`/dev/ttyUSB1`, etc.) - do not assume77- Ensure the edge service is running (`uv run --package balance-edge python edge/balance.py`)7879### Opentrons Machine (`machine_id: "opentrons"`)8081Use for **automated liquid handling and full protocol generation on the Opentrons OT-2 robot**.8283Capabilities:84- Full protocol code generation via `Protocol.to_python_code()` - produces valid runnable OT-2 Python85- Pipetting workflows: `aspirate`, `dispense`, `transfer` (with auto-chunking for large volumes)86- Tip management: `pick_up_tip`, `drop_tip`87- Deck and labware setup: `load_labware`, `load_instrument`88- Flow control: `flow_rate`, `air_gap`, `blow_out`, `touch_tip`, `move_to`89- Protocol utilities: `delay`, `comment`, `home`90- CSV-driven loops: `read_csv_file` + `loop` for data-driven protocols91- Custom labware support: AMDM mass balance vials (30 mL, 50 mL) discovered from the Opentrons driver labware catalogue and loaded through normal `load_labware` commands92- All gen2 pipette types: p10, p20, p300, p1000 (single and multi-channel)93- **External camera image capture**: `camera_capture` - triggers the external camera mounted above the deck to capture and save a still image of the wellplate9495Use this machine when:96- The user references an Opentrons OT-2 robot97- The task involves generating a complete OT-2 protocol or individual liquid handling commands98- The user mentions Opentrons labware (tip racks, well plates, reservoirs, NEST, Corning, mass balance vials)99- The workflow requires data-driven dispensing from a CSV file100- The workflow requires capturing a camera image of the wellplate after dispensing steps101102Before command generation:103- Refer to: [opentrons-machine](references/opentrons-machine.md)104- Before any physical Opentrons run, load and follow [puda-opentrons-vision-validation](../puda-opentrons-vision-validation/SKILL.md): capture a fresh deck image, verify every protocol slot is occupied by the expected labware/item, and ask the user to confirm uncertain or mismatched labware before execution.105- Run `puda machine commands opentrons` to understand available commands106- Follow all command types, params, sequencing rules, and labware constraints in `references/opentrons-machine.md`107108### Elephant Machine (`machine_id: "elephant"`)109110Use for **6-axis robot arm manipulation, Cartesian/joint motion, electric gripper actions, scan/reset flows, and camera-guided vision steps**.111112Capabilities:113- Cartesian pose motion and relative moves114- Joint-angle and single-axis motion controls115- Scan positioning and reset-oriented recovery workflows116- Electric gripper operations: `init_gripper`, `open_gripper`, `close_gripper`117- Pi-camera and livestream image capture for vision-guided tasks118- Pixel-to-robot offset conversion for calibrated camera workflows119120Use this machine when:121- The task requires a robot arm to move to coordinates or execute pick-and-place style steps122- The user asks for Elephant arm motion, scan/reset behavior, or arm recovery after stop/power loss123- The workflow includes gripper control, Pi-camera capture, or livestream snapshot capture from the Elephant setup124125Before command generation:126- Refer to: [elephant-machine](references/elephant.md)127- Run `puda machine commands elephant` to understand available commands128- Follow motion, gripper, camera, and sequencing constraints in `references/elephant.md`129130## Selection Workflow1311321. Parse user intent and identify the tasks.1332. Match intent to the machine capabilities above.1343. If machine selection is unclear or ambiguous, **ask the user** and wait for confirmation.1354. Load the corresponding reference file and CLI help.1365. Generate commands only after machine choice is confirmed.137138## Output Guidance139140When answering machine-selection questions:141- State the recommended machine and a one-line reason tied to capability.142- If uncertain, ask a direct clarification question instead of guessing.143144## Critical sequencing rules145- `opentrons` protocols must always end with no tip attached to any pipette.146- `opentrons` deck slot (`location`) for every `load_labware` command must be explicitly confirmed by the user - **never assume a slot**.147- Before any physical `opentrons` run, perform vision validation of deck-slot occupation/labware; do not run if a required slot is empty, mismatched, obstructed, or not visible unless the user explicitly approves.148- `opentrons` `capture_image` must be its own standalone protocol - never combined with pipetting commands in the same protocol.149- `balance` - always call `startup()` before reading and `shutdown()` after. Always tare before a dispense step. Always verify `fresh == True` before using a reading.150- `elephant` - ensure the arm is connected and powered before motion. For electric gripper workflows after a power cycle, call `init_gripper()` before `open_gripper()` or `close_gripper()`. Prefer `scan()` before camera-guided work.