Bayflow
Built at The Harness Engineering & Model Wrangling #SFTechWeek Hackathon · Oct 11, 2026 · San Francisco, CA

BayFlow is a self-improving AI agent system for San Francisco transit. Operator agents for Muni, BART and Caltrain run a simulated commute on the real city network, built from official GTFS data with 3,292 stops and stations. They dispatch standby vehicles and coordinate service as riders build up at stops. A second team of harness agents improves how those operators work: - a service monitor checks whether riders board within 10 minutes; - a Gemini planner proposes one focused change to the operators' setup; - a validator enforces a safety envelope; - an evaluator races the change against the current version on five days it has never seen; - a promotion gate keeps the change only if it measurably wins. The problem: transit operations are tuned by hand, and AI systems that "optimize themselves" are rarely held to an honest, fixed scorecard. BayFlow makes self-improvement auditable. In our latest MongoDB Atlas run, the monitor flagged that only 70% of riders boarded within 10 minutes. Gemini, learning from earlier failed attempts, proposed dispatching standby buses sooner. The change won all five unseen days (+3%) and was promoted. The two changes Gemini tried next were rejected. Every agent message, version, test and decision is stored, and the interface shows the live map beside a diagram of who told whom what. Rider demand is synthetic.