Cookbook · two instruments
Run a PCR with a plate transfer
A plate-handling arm moves a 96-well plate onto a thermocycler, the thermocycler runs a 30-cycle program and holds at 4 °C, and the arm returns the plate. One sentence from you; the agent finds the instruments, rehearses, asks once, runs.
Instruments
| Role | Simulated twin | Real |
|---|---|---|
| Plate mover | arm-01 (bundled) | any robot_arm with pick_plate and place_plate: PF400 via MADSci, a UR arm via ROS 2, an Opentrons Flex gripper via PyLabRobot |
| Thermocycler | thermocycler-01 (bundled) | any thermocycler with run_protocol: Bio-Rad C1000 via serial, Biometra via MADSci |
What you say
"Run a 30-cycle PCR at 95/58/72 on the plate in deck slot A1, hold it at 4 °C, and put it back in A2."
What the agent does
mhp_lab op="recipes" query="pcr plate transfer"findspcr-with-plate-transfer.mhp_findconfirms an idle arm and an idle thermocycler and reads their operating instructions: the thermocycler says to pre-heat the lid; the arm says 30% speed near open plates.mhp_run recipe="pcr-with-plate-transfer" params={"plate_slot":"deck_A1","return_slot":"deck_A2","cycles":30} plan=truerehearses it.
The plan it shows you
verdict: ok; no human confirmation needed
1 arm-01 write speed = 30 ok
2 arm-01 read homed → false
3 arm-01 invoke home ok
4 thermocycler-01 read lid_closed → true
5 arm-01 invoke pick_plate {location: deck_A1} ok
6 arm-01 invoke place_plate {location: thermocycler} ok
7 thermocycler-01 write lid_heater = true ok
8 thermocycler-01 invoke run_protocol {steps: 3, cycles: 30} ok long-running
9 thermocycler-01 write target_temperature = 4 ok
10 arm-01 invoke pick_plate {location: thermocycler} ok
11 arm-01 invoke place_plate {location: deck_A2} ok
Nothing has moved yet. If you had asked for 98 °C denaturation the plan would still pass (the block allows 105); if you had asked for 110 °C, step 8 would read REFUSED: step temp 110 outside block limits and the agent would come back to you before running anything.
Running it
You say go. The same call without plan runs in the foreground for a short program, or with background=true for the real 75 minutes. Progress is on the job; the run folder gets the stdout.
pcr done on thermocycler-01: {'cycles_completed': 30, 'final_block_temperature': 72}; plate at deck_A2; block 4.0 C
The agent reports the block temperature it read, not the one it set. The run log has every call.
Where a human is asked
Nothing in this recipe needs confirmation, by design. If you add "then open the lid", the thermocycler's open_lid is gated confirm because the lid may be hot: the plan marks that step asks human, and at run time your harness shows you the question before it happens.
The recipe
Read it with mhp_describe on the recipe name or in the repository at openmhp/recipes/pcr_with_plate_transfer.py. The parameters you change:
PARAMS = {"arm": None, "thermocycler": None, # None = pick an idle one by search
"plate_slot": "deck_A1", "return_slot": "deck_A2",
"steps": [{"temp": 95, "hold_s": 30}, {"temp": 58, "hold_s": 30}, {"temp": 72, "hold_s": 45}],
"cycles": 30, "hold_c": 4}
Variations
- Your own thermocycler. Onboard it (serial or manual), keep the action name
run_protocolwithstepsandcycles, and the recipe works unchanged. - No arm. Set the arm to a manual-kind package: the agent asks the operator to move the plate and waits.
- Different program. The thermocycler package ships
references/protocols.mdwith programs per polymerase; the agent reads it and fillssteps.