Speaker
Description
Beamline scientists spend a disproportionate amount of their time answering the same
questions and running the same routine procedures for users. "Where is the sample
stage right now?", "how do I switch to flyscan mode?", "what does this PV do?" All of
this work is essential, but rarely the best use of an expert who is also responsible for
the experiment. BAIT (Bluesky AI Tools) offloads this layer to a small set of cooperating
LLM agents designed with the goal to leverage the Bluesky ecosystem.
BAIT is a Python package that builds on work by the BCDA (Beamline Controls & Data
Acquisition) group at the APS (Advanced Photon Source), in particular the BITS
(Bluesky Instrument Template Structure) package. BITS has enabled uniform
deployments across beamlines through a standardized layout, which BAIT leverages so
the same agents can operate across different beamline installations with minimal
beamline configuration.
The implementation, currently being deployed across APS beamlines, exposes several
agents behind a single chat interface: a router that classifies incoming questions, a
documentation agent that performs retrieval augmented search over beamline manuals
and IOC notes, a device agent that reads live Ophyd values and allows for writes with
human confirmation before any hardware moves, an IOC level diagnostics agent, and a
recipe execution agent that turns scientist written procedures (e.g. "align the beam")
into Bluesky plans.
The talk will cover the architecture of the package, how it leverages BITS and the wider
Bluesky stack, the safety model for LLM driven control, and lessons learned from
deploying and operating BAIT at working beamlines.