Skip to content

Conversation

@roussel-ryan
Copy link

@roussel-ryan roussel-ryan commented Sep 29, 2025

Implements an agent wrapper class in bluesky-adaptive that enables the use of arbitrary Xopt (https://github.com/xopt-org/Xopt) generators in bluesky-adaptive runs.

Description

This pull request introduces a new module that wraps Xopt generators as agents compatible with the bluesky-adaptive framework. The new mixin class implements key abstract methods for decision-making, enabling integration of Xopt optimization workflows with bluesky-adaptive agents. Users are expected to implement experiment-specific details in subclasses.

Xopt generator agent integration:

  • Added XoptGeneratorBase class in bluesky_adaptive/agents/xopt.py to wrap Xopt Generator objects and implement generic agent logic, including data ingestion and suggestion of next steps. This class fulfills relevant abstract methods from the Agent base class, streamlining the integration of Xopt optimization strategies with bluesky-adaptive agents.

Documentation and structure:

  • Included module-level docstrings outlining the purpose of the mixin and specifying which experiment-specific methods need to be implemented by subclasses.

Motivation and Context

This change enables the use of Xopt-defined algorithms (v2.x.x) for bluesky adaptive runs.

Summary of Changes for Release Notes

Implements an agent wrapper class in bluesky-adaptive that enables the use of arbitrary Xopt (https://github.com/xopt-org/Xopt) generators in bluesky-adaptive runs.

Fixed

Added

Added /bluesky_adaptive/agents/xopt.py

Changed

Removed

How Has This Been Tested?

So far this has not been tested, pending discussion with maintainers.

@roussel-ryan
Copy link
Author

@pluflou how does this compare to your implementation at SLAC?

@pluflou
Copy link

pluflou commented Sep 29, 2025

@pluflou how does this compare to your implementation at SLAC?

At MFX, we've used Xopt directly only so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants