Activity-based molecular circuits for programmable medicine