By 2050, antibiotic resistance will have killed more people than cancer. Phagentic is the solution.

Phagentic is a physical bioreactor with an operating system built to autonomously drive sensitive, hidden-state reactions. Its namesake - the bacteriophage - is biotech's most promising antibiotic alternative: a virus engineered to destroy otherwise-resistant bacterial strains. Because phages co-evolve with their targets, resistance never reoccurs

But manufacturing is the bottleneck: it's a complex, multi-stage reaction that behaves differently every run. Phagentic uses a chemistry-informed model that continuously learns the reaction's kinetics while driving it.

About Us

We’re a team of three CS and one ECE student from Carnegie Mellon University. None of us had any previous biochem experience, but the ambitious nature of the challenge inspired us to give it a try. Learned wayyyy too much chemistry for this :)

Trials and Tribulations

The surface area of our project is massive: we were running a chemistry experiment, building the hardware for a bioreactor, writing the firmware, 3D printing part of the rig, creating the OS frontend/backend, and training the controller model all at once. We hit many challenges along the way, including:

  • 3D printing challenges. Despite our print theoretically taking 2 hours, technical issues (and a quick visit from the fire marshal) led us to get our first working prototype at 2am. Along the way, we learned about tuning the slicer, print speed, and filament type to ensure that the print actually finished.
  • Tuning the actual reaction. Before any controller could work, we had to make the reaction controllable. That meant real wet-chemistry iteration - adjusting the concentrations of glucose, NaOH, and dye to land the oscillation in a usable window: fast enough to demo, with a swing big enough for the sensor to read and slow enough for the controller to act on. Dozens of trial batches were spent dialing those ratios in.
  • Moving from sim to real. We developed and tested the controllers in simulation against our ODE model first, where iteration is cheap — then moved them onto the live reactor, where they hit everything a sim doesn't have: sensor noise, time delay, reagent drift, BLE dropouts. Closing that sim-to-real gap was most of the real work.

We also had some fun hack-y moments:

  • Frying our first ESP32 when we were switching pins while it was plugged in (oops!)
  • Almost melting the table because we forgot that NaOH releases heat when it dissolves
  • Hand-whittling a stick with a pocketknife to hold the RGB corrector
  • Doordashing duct tape when we needed waterproof adhesive at midnight

Tech Stack

architecture diagram

The Chemistry

The reactor runs the Blue Bottle reaction: a dye that flips between blue (oxidized, driven by stirring in oxygen) and clear (reduced by the glucose in solution). It oscillates blue → clear → blue and stalls once the glucose or base substrate runs out; a system that has to be fed and kept in rhythm.

That's why it stands in for bacteriophage dynamics: a phage population fighting bacteria rises and crashes in the same predator-prey rhythm, and dosing it is the same closed-loop control problem. Blue intensity stands in for population, so the controller that holds the color on target is the one that would hold a phage treatment on target. A phage ⇄ blue converter in the UI makes the mapping explicit, as on a log scale, clear reads as zero phages and the deepest blue as a saturated culture of ~10¹².

Hardware

The hardware consists of an ESP32 chip connected to two pumps and the mixer through MOSFETs to control voltage. The RGB sensor plugs into the chip as well. Commands are streamed over a two-way Bluetooth Low Energy connection with the client laptop.

hardware diagram

Control Model

The core of the project is a chemistry-informed ML model we trained to control the reaction. The model has four layers:

  1. State estimator. We clean the raw 20hz sensor data time series into meaningful signals about the true color, current pump states, and phage of the reaction.
  2. Gray-box ODE. Starting from a system of differential equations that model our target reaction, we fine-tune constants and dynamics on noised simulated and real-world run data, producing an accurate prior through which we can predict the future state of the reaction.
  3. Model-predictive control. The model searches through the action space and predicts the future using the learned ODEs for each action. It chooses the action that brings us closest to desired state.
  4. Continual learning. Each reaction is different, so as the reaction runs, we continue tuning the gray-box ODE predictors.

The model is safety-gated by a classic PID loop; it isn’t allowed to take actions too drastic to prevent catastrophic failures.

3D Print

We modeled and, using the provided 3d printers, printed a mount that caps onto the beaker for fixing the pumps' tubes, as well as a clip which slots into the mount for attaching the RGB sensor, and also provides a screen behind the fluid to diminish glare. This took a lot of troubleshooting and failed attempts with the different printers, but with some perseverance, we printed two iterations of our design, which, on the second try, met the tolerances and needs of our setup.

Ethical Considerations

Biochemical safety is critical, and we only trust scientists to handle critical decisions. Our core product ideology at Phagentic is that we're a tool to achieve what was earlier impossible in sensitive bio-manufacturing reactions, not a tool to replace scientists. As a result:

  • The controller uses data from previous runs and a naive PID solver to gate possible actions to those deemed "safe." As a result, the model will never be allowed to drastically swing the reaction and cause a potential leak.
  • The "Ask Phage" copilot is structurally read-only; it's designed as an analysis tool, and the safety-gated controller model is the only way to autonomously control the reaction.
  • We incorporated easy fail-safes to quickly stop the reaction, and a manual mode for the scientist to take over driving if needed.

Built With

Share this project:

Updates