Introduction

The past few decades have witnessed exciting advancements in molecular and organic electrochemistry1,2,3,4. Typical electrochemical research involves a myriad of tunable experimental parameters, ranging from universal chemistry variables to those specific to electrochemistry. The resultant complexity creates challenges for efficient discovery of electrochemical transformations and elucidation of reaction mechanisms, as it can be tedious or even impractical for experimentalists to explore the high dimensionality of the parameter space and enumerate all possible combinations manually5,6,7. As electroanalytical chemistry8,9,10,11 has established stringent requirements of experimental conditions that must be met for defining probable mechanisms and performing electrokinetic analysis, there is a significant demand on how to identify parameter combinations suitable for mechanistic studies.

There have been key developments in high-throughput experimentation hardware for synthetic purposes12,13,14,15,16,17 that can be translated to electrochemical research18,19,20,21,22,23,24, yet additional automated electroanalytical platforms with minimized adoption barriers are needed for fundamental mechanistic investigations. Customized multi-well parallel-plate reactors18,19,20,21,22 have been reported for evaluating organic electrosynthesis, and microfabricated microfluidic devices23,24 have been reported for automated electrokinetic measurements. Nevertheless, there remains a need for automated experimentation platforms with minimized barriers to entry that resemble standard electroanalytical setups in a typical laboratory, in order to directly utilize the vast tools available to electrochemists to obtain mechanistic information8,9,10,11.

We envisioned that the integration of standard and automated electroanalytical tools with closed-loop decision-making for the autonomous identification of desired experimental conditions could accelerate and facilitate mechanistic investigations in fundamental electrochemistry. Automated experimentation has led to the convergence with artificial intelligence25,26,27,28, heralding the advent of self-driving platforms that iteratively design, operate, analyze, and optimize experiments to achieve a user-defined objective29,30. While closed-loop screening processes based on machine-learning (ML) models or Bayesian algorithms have been emerging in the engineering of lithium-ion batteries31,32, an autonomous closed-loop process has not been demonstrated in fundamental electrochemistry. We posit that the challenges reside in the difficulty of analyzing electrochemical data for mechanistic investigations. For example, the rich mechanistic information in cyclic voltammetry (CV), a traditional electroanalytical technique10,11, is represented by subtle features in voltammograms that are difficult to quantify with simple figures-of-merit. Manual inspection is required to discern the evolution of voltammetric responses with different parameters such as scan rate (ν) and/or reactant concentrations. Such manual CV analysis is not compatible with automated experimentation featuring high data throughput, hence impeding autonomous closed-loop research. It is thus critical to develop a mechanistically savvy ML model that evaluates the potentially subtle CV features and transduces them into a data format compatible with automated experimentation.

In this context, we recently reported a deep-learning (DL) model based on the residual neural network (ResNet) architecture33 that automatically distills subtle features in voltammograms and probabilistically classifies five prototypical mechanisms in molecular electrochemistry34,35. One important feature of our DL model34, different from earlier attempts36,37, is the yielded numerical propensity distributions of probable mechanisms that addressed the aforementioned challenges in automated mechanistic analysis of electrochemical data. In this regard, our DL model unlocks the possibility of enabling a proof-of-concept autonomous closed-loop process for mechanistic investigation of molecular electrochemistry (Fig. 1a).

Fig. 1: Proof-of-concept autonomous research in fundamental electrochemistry.
figure 1

a Concept of an autonomous closed-loop process for mechanistic investigation of molecular electrochemistry from cyclic voltammetry (CV). b Annotated photograph and (c) schematic of our constructed autonomous electrochemical platform based on classical electroanalytical setups and installed in an oxygen/moisture-free glovebox. The platform is deployed for mechanistic studies of the reaction of cobalt tetraphenylporphyrin (CoTPP) with a library of organohalide (RX) electrophiles in dimethylformamide (DMF) solvent using tetrabutylammonium hexafluorophosphate (NBu4PF6) as the supporting electrolyte. d A prototypical EC mechanism in which a quasi-reversible if not completely reversible reduction of CoIITPP (E step) yields a nucleophilic CoITPP species that attacks the R–X bond and forms a metal–alkyl bond (C step) bearing a characteristic second-order kinetic rate constant (k0). e Deep-learning (DL) capability that transduces CV features into quantifiable figures-of-merit (mechanism propensity distributions, denoted as y) compatible with downstream Bayesian optimization and automated experimentation. The voltammograms in (e) are adapted from the middle panel in Fig. 2a, where the experimental conditions are detailed. The reverse-to-forward peak current ratio (ipa/ipc) between anodic (ipa) and cathodic (ipc) peak currents of the CoII/I redox is defined in Supplementary Note 5. Five prototypical mechanisms (E, EC, CE, ECE, DISP1) in molecular electrochemistry are defined in Supplementary Table 6. f A generally applicable closed-loop workflow designed to explore the parameter space and discern the possible presence of an EC mechanism given a specific RX (Stage I) and, if an EC mechanism is present, to further suggest and identify the desired experimental conditions for the quantification of k0 value (Stage II).

Building upon this achievement, here we present an autonomous electrochemical platform (Fig. 1b, c) that integrates flow chemistry for sample preparation, automated electrochemical testing, DL-based voltammogram analysis, and closed-loop decision-making based on Bayesian algorithms (Fig. 1a). We demonstrate a proof-of-concept application exploring the reactivity of cobalt tetraphenylporphyrin (CoTPP) with a library of organohalide (RX) electrophiles38,39 wherein an EC mechanism, an interfacial electron transfer (E step) followed by a solution reaction (C step)9,11, was identified (Fig. 1d). The generally applicable workflow efficiently explored the parameter space and discerned the presence of an EC mechanism amid negative controls and outliers. Furthermore, the workflow found suitable parameter combinations and extracted the second-order kinetic rate constants of the C step (k0) for different RX electrophiles spanning at least 7 orders of magnitude. The autonomous platform was capable of continuous operation for up to ~50 h by experimentally examining 2520 combinations of chemical and electrochemical parameters without manual intervention. These results demonstrated the feasibility of autonomous mechanistic discoveries in molecular and organic electrochemistry in the future.

Results

A proof-of-concept study using an autonomous electrochemical platform based on classical electroanalytical setups

We constructed an autonomous electrochemical platform consisting of five key modules (Supplementary Notes 1 and 2): (1) flow chemistry that enables automated electrolyte formulation and disposal (Fig. 1b, c), (2) automated electrochemical testing, including automatic iR compensation during CV measurements, via a modified Hard Potato40 Python library controlling a commercial potentiostat, (3) DL-based automated CV analysis that yields numerical propensity distributions of probable mechanisms that can be readily evaluated (Fig. 1e)34, (4) adaptive exploration of a large parameter space using a Dragonfly41,42 Bayesian optimization package that suggests new experimental conditions toward a user-defined objective in a closed-loop manner (Fig. 1f), and (5) a conventional single-compartment electrochemical cell with a three-electrode configuration (Fig. 1b, c), ubiquitous in electrochemistry textbooks and laboratories. The use of classical electroanalytical setups ensures the consistency of future fundamental research and the validity of deploying the rich existing knowledge and literature in electrochemistry. The entire platform can be conveniently installed in a glovebox (Fig. 1b, c) to ensure compatibility with oxygen- and moisture-sensitive chemistry.

As an initial case study, we deployed an autonomous closed-loop workflow to investigate the oxidative addition of RX electrophiles to electrogenerated low-valent metal complexes, a key activation step in numerous metal-catalyzed transformations3,4. In a prototypical EC mechanism (Fig. 1d), a quasi-reversible if not completely reversible reduction of CoIITPP (E step) yields a nucleophilic CoITPP species that attacks the R–X bond and forms a metal–alkyl bond (C step) via a number of possible pathways4,43. As the nature of the electrophiles can differ greatly, an EC mechanism may not be uniformly operational. Therefore, we designed a generally applicable closed-loop workflow to probe two questions autonomously (Fig. 1f): (1) without any a priori knowledge of a given electrophile’s reactivity, can the workflow explore the parameter space and discern the possible presence of an EC mechanism? (2) if an EC mechanism is present, can the workflow suggest and identify the desired experimental conditions for measuring the rate (k0) of the C step? Quantification of kinetic rate constants is the foundation of mechanistic studies, and it is non-trivial to locate not one but multiple suitable combinations of both ν and RX concentration ([RX]) so that k0 can be appropriately determined9,44,45,46. Here such mechanistic studies are shown to be autonomously completed without manual intervention.

The scarcity of suitable parameter combinations for electrokinetic analysis, showcased by automated exhaustive experiments

We first evaluated the practical parameter space suitable for measuring k0 in a model system when RX = 1-bromobutane (n-BuBr)38. When [CoIITPP] = 1 mM in dimethylformamide (DMF) solvent using tetrabutylammonium hexafluorophosphate (0.1 M NBu4PF6) as the supporting electrolyte, the voltammograms evolved with both ν and [RX] (Fig. 2a). A single-electron quasi-reversible if not completely reversible CoII/I redox event at −1.275 V versus ferrocene/ferrocenium (Fc/Fc+) was observed with high ν and low [RX], yet the redox’s irreversibility grew more prominent as ν decreased and [RX] increased, in accordance with the kinetic zone diagram of an EC mechanism when the C step can be considered irreversible with a large equilibrium constant9,11.

Fig. 2: Automated exhaustive CV experiments that illustrate the scarcity of useful data for electrokinetic analysis.
figure 2

a Representative sets of six voltammograms, tested with automatic iR compensation. [CoIITPP] = 1 mM in DMF solvent using 0.1 M NBu4PF6 supporting electrolyte; RX = 1-bromobutane (n-BuBr) and [RX] [0, 20] mM; six logarithmically-sampled scan rates (ν) with the maximal and minimal ν differing by a factor of 10 (νmin/νmax = 1/10) and νmin [0.01, 0.2] V/s. b The DL-generated propensity of an EC mechanism (denoted as EC%) obtained from 420 combinations, representing 2520 voltammograms, of [n-BuBr] and νmin ([n-BuBr] [0, 20] mM and νmin [0.01, 0.2] V/s). c The observed pseudo-first-order kinetic rate constant of the C step (kobs) derived from and plotted versus ipa/ipc (defined in Supplementary Note 5) of the CoII/I redox in the selected voltammograms with non-zero [n-BuBr] values, with the colors of the data points scaling with increases in [n-BuBr]. The shaded area in (c) suggests that such kinetic analysis should only be performed when ipa/ipc [0.65, 0.75], as the derived kobs values show little variation under a given [n-BuBr] value and appear to grow proportionally with increases in [n-BuBr]. d The mapping of ipa/ipc of the CoII/I redox in each of the 2520 voltammograms as a function of ν and [n-BuBr] (ν [0.01, 2] V/s and [n-BuBr] [0, 20] mM). The shaded area in (d) highlights that the experimental conditions for ipa/ipc [0.65, 0.75] correspond to only 4.2% of the sampling space. e A linear regression of log10(kobs) versus log10[n-BuBr] among those valid kobs values derived from ipa/ipc [0.65, 0.75] in (c), yielding the reaction order (n) and k0 for n-BuBr. The colors of the data points scale with increases in [n-BuBr], and the vertical error bars represent the standard deviations of log10(kobs) among all the valid kobs values at each [n-BuBr] value. Data distributions underlying the error bars in (e) are presented in Source Data file.

Our platform, without implementing closed-loop decision-making, exhaustively sampled the parameter space and yielded quantifiable figures-of-merit from voltammograms. Owing to the nature of our DL model34, each inquiry in the parameter space includes a set of six voltammograms (Fig. 2a) under a given [RX] and six logarithmically-sampled v values with the maximal and minimal ν differing by a factor of 10 (νmax/νmin = 10), and thus is represented as a function of both [RX] and νmin (Fig. 2b). Setting [CoIITPP] = 1 mM and RX = n-BuBr, 420 combinations of [RX] and νmin ([RX]  [0, 20] mM and νmin [0.01, 0.2] V/s, Supplementary Note 3), representing 2520 voltammograms, were automatedly prepared by flow chemistry and tested with automatic iR compensation in the glovebox. The experiments took ~50 h continuously without manual intervention, at a rate of ~1.2 min per CV measurement. The 420 voltammogram sets were individually analyzed by our DL model34 immediately after each voltammogram set was measured, yielding the propensity values of five mechanisms (Fig. 1e; E, EC, CE, ECE, DISP1, defined in Supplementary Table 6). The DL analysis of such a model system38 yielded non-zero propensity values for only E and/or EC mechanisms over the entire parameter space, whereas zero propensity values for CE, ECE, and DISP1 mechanisms were obtained (Supplementary Fig. 9). The DL-generated propensity of an EC mechanism, extracted from voltammogram features, is higher under high [RX] and low νmin (Fig. 2b), consistent with what a human researcher would conclude yet now a quantifiable value in lieu of a descriptive notion is provided with sufficient detection sensitivity. The obtained propensity of an EC mechanism not only will discern its possible presence but also will serve as a numerical figure-of-merit for Bayesian optimization (Supplementary Note 4) to enable closed-loop decision-making (Fig. 1f).

The combinations of ν and [RX] values that are suitable for measuring k0 are scarce. In general, k0 can be derived from the observed pseudo-first-order kinetic rate constant of the C step (kobs) defined as kobs = k0 [RX]n, where n is the reaction order of RX. For any combination of ν and [RX] that leads to a partially irreversible CoII/I redox feature in a voltammogram, kobs can be derived from the reverse-to-forward peak current ratio (ipa/ipc, defined in Supplementary Note 5) between anodic (ipa) and cathodic (ipc) peak currents of the CoII/I redox (depicted in Fig. 1e)44,45,46. However, such kinetic analysis should only be performed when ipa/ipc [0.65, 0.75] (Fig. 2c and Supplementary Note 5)44,45,46, a narrow range in which the CoII/I redox’s irreversibility is neither too strong nor too weak to ensure the validity of kobs = k0 [RX]n. When RX = n-BuBr, the mapping of ipa/ipc as a function of ν and [RX] (Fig. 2d) highlights that the experimental conditions for ipa/ipc [0.65, 0.75] correspond to only 4.2% of the sampling space, resulting in only a modest portion of useful voltammograms out of the 2520 measured ones.

The extracted values of k0 and n are consistent with literature values when RX = n-BuBr. Figure 2c plots the kobs values derived from the selected voltammograms with non-zero [n-BuBr] values, regardless of the validity of such analysis, versus ipa/ipc. Only those kobs values derived from ipa/ipc [0.65, 0.75] are valid, as they show little variation under a given [n-BuBr] value and appear to grow proportionally with increases in [n-BuBr] (the shaded area in Fig. 2c). Among the valid kobs values, an 11-point linear regression of log10(kobs) versus log10[n-BuBr] (Fig. 2e) establishes that kobs = 25.7 M−0.96 s−1 [n-BuBr]0.96. The extracted k0 value assuming pseudo-first-order kinetics for n-BuBr agrees well with a reported k0 of 30 M−1 s−1 (ref. 38). As manual efforts of locating the desired 4.2% of the sampling space can be tedious, the scarcity of suitable parameter combinations calls for an adaptive, closed-loop search to accelerate kinetic analysis.

Adaptive, closed-loop workflow of mechanism discernment and electrokinetic analysis

We constructed an adaptive, closed-loop workflow that involves two stages (Fig. 1f, detailed in Supplementary Fig. 16): Stage I for mechanism discernment and Stage II for electrokinetic analysis. As RX’s reactivity may vary greatly, the accessible range of [RX] is expanded from [0, 20] mM to [0.008, 1000] mM with additional RX reservoirs in the flow chemistry module (Supplementary Note 6). In Stage I, Bayesian optimization41,42 is deployed with a designated goal of maximizing the voltammograms’ propensity, obtained from the DL model, toward an EC mechanism by varying [RX] and νmin (Supplementary Note 4). After a finite number of optimization steps, Stage II will be activated if the DL-generated propensity of an EC mechanism can exceed 50%, otherwise the workflow terminates. In Stage II, the workflow first determines a cutoff RX concentration, [RX]cutoff, below which avoids assessing unnecessarily high [RX] values in future inquiries (Supplementary Note 7). The workflow also creates an initial response surface of ipa/ipc as a function of [RX] and ν, from the existing CV data in Stage I, via a Gaussian process41,42. Based on the determined [RX]cutoff and the response surface of ipa/ipc, the workflow iteratively designs combinations of [RX] and ν for the next inquiry that may satisfy ipa/ipc [0.65, 0.75], and automatedly executes CV measurements in the glovebox. Each inquiry in Stage II includes a set of six voltammograms under an assigned [RX] value below [RX]cutoff and six proximate ν values (Supplementary Note 8). The workflow iteratively adds the resultant CV data to the cumulative database, determines whether the new data satisfy ipa/ipc [0.65, 0.75], updates the response surface of ipa/ipc on-the-fly, and initiates the next iteration of autonomous inquiry if required.

Testing such an autonomous workflow without any a priori knowledge of a given RX’s reactivity validated our design. A negative control, in which acetonitrile (CH3CN) was found to be unreactive toward CoITPP (Supplementary Fig. 23), confirmed that the workflow would not indistinguishably assign an EC mechanism to any substrate and would properly terminate at the end of Stage I. When RX = n-BuBr, a 15-step campaign of Bayesian optimization in Stage I (Fig. 3a), including 6 random sampling and 9 optimization steps, satisfactorily yielded the desired maximized propensity of an EC mechanism for this model system38 (Fig. 3b and Supplementary Fig. 24). As the maximized propensity of an EC mechanism far exceeded the 50% threshold, Stage II was triggered with a determined [RX]cutoff = 24.3 mM (Supplementary Note 7). A response surface of ipa/ipc was initiated (Fig. 3c), and a customized algorithm was executed to design and assess the next combinations of [RX] and ν for 19 iterative inquiries (Fig. 3d and Supplementary Note 8), meanwhile continuously updating the response surface of ipa/ipc (Supplementary Fig. 25). Eventually, desired combinations of [n-BuBr] and ν that satisfy ipa/ipc [0.65, 0.75] were found at 2 and 9 [n-BuBr] values in Stage I and II, respectively (Supplementary Fig. 26), after a total of 34 inquiries for both stages where 204 voltammograms were measured within 12 h. Subsequent linear regression of log10(kobs) versus log10[n-BuBr] (Fig. 3e) led to kobs = 32.6 M−1.01 s−1 [n-BuBr]1.01, in good agreement with that determined from automated exhaustive CV experiments in Fig. 2e. The measured k0 value is robust with a relative uncertainty of less than 5%, as determined by triplicating the workflow (k0 = 31 ± 1 M−1 s−1, Supplementary Fig. 28 and Fig. 4a). It is noteworthy that updating the response surface of ipa/ipc on-the-fly is beneficial for successfully locating desired combinations of [RX] and v. The final response surface of ipa/ipc (Fig. 3f) displayed significant differences from the initial response surface (Fig. 3c). An in silico analysis, where the response surface of ipa/ipc was not updated, suggested a near 50% reduction in the success rate of locating the desired parameter combinations (Supplementary Note 9). Instead of exhaustively testing 2520 voltammograms for ~50 h (Fig. 2b), the autonomous closed-loop workflow reduced the number and duration of experiments by roughly a factor of 10 and 5, respectively, meanwhile assessing a 50-times wider range of [RX].

Fig. 3: Autonomous closed-loop workflow of mechanism discernment and electrokinetic analysis.
figure 3

a The workflow of Stage I for DL-based discernment of an EC mechanism via Bayesian optimization. A system is considered to bear an EC mechanism when the maximized DL-generated propensity of an EC mechanism exceeds 50%. b The trajectory of a 15-step campaign of Bayesian optimization when RX = n-BuBr. [RX]  [0.008, 1000] mM and νmin [0.01, 0.2] V/s. c The initial response surface of ipa/ipc as a function of ν and [n-BuBr] (ν [0.01, 2] V/s and [n-BuBr] [0.008, 1000] mM), created via a Gaussian process, after completion of Stage I. d The workflow of Stage II for adaptive search of parameter combinations suitable for electrokinetic analysis. e Desired combinations of [n-BuBr] and ν that satisfy ipa/ipc [0.65, 0.75] are found at 2 and 9 [n-BuBr] values in Stage I and II, respectively, resulting in a linear regression of log10(kobs) versus log10[n-BuBr] for the quantification of k0 value. The vertical error bars represent the standard deviations of log10(kobs) among all the valid kobs values at each [n-BuBr] value. f The on-the-fly updated response surface of ipa/ipc after completion of Stage II. The colors of the surfaces in (c) and (f) represent the local model uncertainty from the Gaussian process (the standard deviation of the modeled ipa/ipc). The fluctuations in the surfaces in (c) and (f) could be ascribed to the fact that a small number of data points are fitted to a large parameter space. Data distributions underlying the error bars in (d) are presented in Source Data file.

Fig. 4: Substrate scope studies and mechanistic insights.
figure 4

a The generally applicable closed-loop workflow enables autonomous investigation of EC mechanism between CoTPP and a diverse scope of RX substrates amid negative controls and outliers, and the k0 values of up to 30 substrates toward the electrogenerated CoITPP are measured over multiple orders of magnitude. * within the inquired parameter space; ** reacts with the electrogenerated CoITPP but does not follow an EC mechanism. b Hammett plot of para-substituted primary benzyl bromide derivatives on the σ scale, where kX and kH are the k0 values of the para-substituted (p-X-PhCH2Br, denoted as p-X, where X represents a para-substituent) and unsubstituted (PhCH2Br, denoted as p-H) substrates, respectively. The error bars in (a) and (b) represent the standard deviations of k0 and log10(kX/kH), respectively, for those substrates measured by the closed-loop workflow for multiple replicates. c Additional manual CV experiments, via sequential titration of Cl(CH2)3CN with an increasing equivalent (equiv.) relative to CoIITPP, confirm Cl(CH2)3CN as a mechanistic outlier that reacts with CoITPP but does not follow an EC mechanism. 1 mM CoIITPP in DMF using 0.1 M NBu4PF6. Data distributions underlying the error bars in (a) and (b) are presented in Source Data file.

Autonomous studies of a diverse scope of organohalide substrates for mechanistic insights

The generality of the as-described experimentation platform and closed-loop workflow (Fig. 1f and Supplementary Fig. 16) enabled autonomous investigation of an EC mechanism between CoTPP and a diverse scope of RX substrates. Figure 4a summarizes the measured k0 values of up to 30 substrates, over multiple orders of magnitude, toward the electrogenerated CoITPP. For one RX substrate, the autonomous workflow of 14 ± 3 h on average was executed with 33 ± 1 inquiries for both stages (or 15 inquiries if autonomously terminated after Stage I), which would otherwise take an estimated ~50 h with 420 inquiries if employing an automated exhaustive screening. If we assume 1 h for a typical human researcher to manually conduct one inquiry including sample preparation and six CV measurements, we estimate that the autonomous workflow could shorten the total time of experiments by ~60%.

The reactivity of unactivated RX substrates are, as expected, sensitive to the halogen leaving group, as k0 decreases dramatically from 1-iodobutane (n-BuI) to n-BuBr to 1-chlorobutane (n-BuCl) whose reactivity is undetectable within the inquired parameter space (Supplementary Figs. 2830). Meanwhile, the linear alkyl chain length has little effect on k0 among n-BuBr, 1-bromohexane (n-HexBr), and 1-bromooctane (n-OctBr), whereas steric effects are observed with a decrease in k0 when comparing n-BuBr to 1-bromo-2-methylpropane (i-BuBr) to 2-bromobutane (2-BuBr) and from n-BuI to neopentyl iodide (Me3CCH2I) (Supplementary Figs. 3135). Also, as expected, electron-withdrawing functional groups can activate RX substrates for nucleophilic addition (Supplementary Figs. 36 and 37), as k0 increases from n-BuCl to dichloromethane (CH2Cl2) to chloroacetonitrile (ClCH2CN) whose measured k0 = 1.6 × 104 M−1 s−1 is consistent with a literature value (1.9 × 104 M−1 s−1)39. Such inductive effect diminishes as the electron-withdrawing group is more remote from the electrophilic carbon, which is supported by comparing the rate of ClCH2CN to 3-chloropropionitrile (Cl(CH2)2CN) and 5-chlorovaleronitrile (Cl(CH2)4CN) (Supplementary Figs. 38 and 39). Lastly, the platform’s low relative uncertainty for k0 measurements allowed us to determine the secondary α-deuterium kinetic isotope effect (2° KIE per α-D): 1.25 ± 0.03 for n-BuBr relative to n-BuBr-d9 (CD3(CD2)3Br), 1.28 for n-BuI relative to n-BuI-d9 (CD3(CD2)3I) (Supplementary Figs. 40 and 41), and 1.06 ± 0.02 for primary benzyl bromide (PhCH2Br) relative to PhCD2Br (Supplementary Note 10 and Supplementary Figs. 4548).

The autonomous platform was further deployed in a Hammett study of para-substituted primary benzyl bromide derivatives (p-X-PhCH2Br, where X represents a para-substituent) (Fig. 4a and Supplementary Figs. 4960), after a revision to the workflow to accommodate their faster rates with CoITPP (Supplementary Note 10). Such reactions are relevant to the recent interest in organic electrosynthesis catalyzed by low-valent first-row transition metals43,47,48. We performed linear free energy relationship analysis (Supplementary Figs. 61 and 62) using various polar- (such as σ) or radical-derived Hammett parameters43,49 that are defined in Supplementary Table 13. In Fig. 4b, the measured k0 values of ten p-X-PhCH2Br substrates relative to that of unsubstituted PhCH2Br (log10(kX/kH)) were plotted against σ. A linear correlation with a positive slope among all substrates (r2 = 0.81, ρ = 1.35) indicates a negative charge buildup in the transition state, consistent with the anionic nature of the CoITPP nucleophile. The observed deviation from a perfect linear correlation could be ascribed to structural variations in the transition state that have been often observed for SN2 reactions at benzylic sites50,51,52,53,54, or different para-substituents acting to stabilize the transition state with a differing balance of inductive and resonance effects49. Also, the less reactive secondary benzyl bromide (PhCH(CH3)Br) (Supplementary Fig. 63) compared to PhCH2Br is aligned with typical SN2 reactions. Empowered by the autonomous platform that accelerates experimentation, our studies of benzyl bromide substrates and beyond support a SN2-type pathway (Fig. 4b), out of other possible alternative pathways43,47,48, for the C step between CoITPP and RX electrophiles (Supplementary Note 11 and Supplementary Tables 14 and 15).

Intriguingly, the closed-loop workflow found detectable reactivity of 4-chlorobutyronitrile (Cl(CH2)3CN) toward CoITPP but autonomously terminated after Stage I, because Cl(CH2)3CN was deemed to not follow an EC mechanism by the DL model (Supplementary Fig. 65). This autonomous execution by the platform was surprising, since other similar substrates including Cl(CH2)2CN, Cl(CH2)4CN, and the more reactive 4-bromobutyronitrile (Br(CH2)3CN) and 4-iodobutyronitrile (I(CH2)3CN) (Supplementary Figs. 66 and 67) all obey an EC mechanism. Through additional manual CV measurements (Fig. 4c), we confirmed Cl(CH2)3CN as a mechanistic outlier, with the exclusion of potential artifacts including chemical purity, automated electrolyte formulation, or electrode fouling (Supplementary Note 12). An irreversible reductive shoulder peak anodic of the CoII/I redox appeared and gained prominence with higher [RX], accompanied with an intensified reductive peak of CoIITPP. We hypothesize that an outer-sphere electron transfer pathway47 involving an alkyl radical intermediate and transient regeneration of CoIITPP (Fig. 4c and Supplementary Note 13) could be operational for Cl(CH2)3CN. As the DL model in the autonomous platform correctly identified the existence of alternative mechanisms, our platform is sensitive enough to detect outliers that bear previously unexpected mechanisms.

The performance of our demonstrated autonomous platform relies on the accuracy and general applicability of the DL-enabled automatic mechanism discernment. The DL model deployed here was trained by simulated voltammograms corresponding to only five classical mechanisms and was tasked for mechanism classification with the assumption that there is only one redox event34. A more advanced DL model capable of both redox-event detection and mechanistic classification out of a larger library of nine mechanisms, dubbed as EchemNet, has recently been reported to accommodate voltammograms with in principle an arbitrary number of redox events55. Such advancement removes the restriction of pre-assigning a potential window for cyclic voltammetry measurements and will engender a higher level of autonomy in experimentation platforms. Nonetheless, advanced DL architectures are still needed to either account for mechanisms out of the existing trained ones or if possible accommodate all the possible mechanistic variations. The intrinsic issue of mechanistic ambiguity in voltammetry, that multiple mechanisms may exhibit similar if not the same voltammetric responses35, suggests inevitable sampling bias during DL model’s training. Thus, credible experimental data with proper mechanistic annotations should be welcomed to further refine the trained DL model and it is necessary to incorporate chemistry insights to further ascertain mechanism assignment.

Discussion

In summary, we report an autonomous platform in fundamental electrochemistry that adaptively discerns molecular mechanisms and designs stringent experimental conditions for electrokinetic analysis. This modular platform is compatible with and readily applicable to existing electrochemistry laboratories, inheriting the rich knowledge in electrochemistry gained over the past decades. Through a proof-of-concept closed-loop survey of an EC mechanism between CoTPP and up to 30 RX substrates, we demonstrated the platform’s wide range of rate quantification (k0 of the C step) over 7 orders of magnitude, low relative uncertainty (<5%) for k0 measurements, 10-fold reduction of experimental attempts compared to exhaustive screening, and the sensitivity and capability of detecting negative controls and mechanistic outliers. Such features will find great use for a myriad of mechanistic discoveries and investigations in molecular and organic electrochemistry. Future advances, such as ML models with expanded mechanistic capabilities of analyzing CV data and beyond as well as robotic handling of solid-state materials on electrodes, will lead to the establishment of general-purpose self-driving electrochemistry laboratories. The work presented here lays the cornerstone for such an edifice in the future.

Methods

Chemicals

Cobalt(II) tetraphenylporphyrin (CoIITPP) (TCI America, >80.0%) was recrystallized from methylene chloride (Fisher Chemical, HPLC) before use: ~1 g of as-received CoIITPP was dissolved in ~500 ml of methylene chloride via sonication for ~2 h; the solution was filtered with 0.45 μm syringe filters (VWR), transferred in a crystallization dish (Pyrex), and evaporated under ambient atmosphere overnight; the recrystallized solid was dried at 60 °C and stored in an Argon-filled glovebox. Tetrabutylammonium hexafluorophosphate (NBu4PF6) (TCI America, >98.0%) was dried at 90 °C under vacuum and stored in the glovebox. Dimethylformamide (DMF) (Sigma-Aldrich, anhydrous, 99.8%) was stored in the glovebox and used as received.

A diverse scope of organic electrophiles was studied in this work. Purchased from Sigma-Aldrich were 1-bromobutane (n-BuBr) (99%), 1-iodobutane (n-BuI) (99%, stabilized with copper), 1-bromo-2-methylpropane (i-BuBr) (99%), dichloromethane (CH2Cl2) (anhydrous, ≥99.8%, stabilized with amylene), chloroacetonitrile (ClCH2CN) (99%), acetonitrile (CH3CN) (anhydrous, 99.8%), benzyl bromide-α,α-d2 (PhCD2Br) (98 atom% D), 4-methylbenzyl bromide (p-Me-PhCH2Br) (97%), 4-(trifluoromethoxy)benzyl bromide (p-F3CO-PhCH2Br) (97%), methyl 4-(bromomethyl)benzoate (p-MeO2C-PhCH2Br) (98%), and 4-(bromomethyl)benzophenone (p-PhOC-PhCH2Br) (96%). Purchased from TCI America were 1-bromohexane (n-HexBr) (>98.0%), 1-bromooctane (n-OctBr) (>98.0%), 2-bromobutane (2-BuBr) (>98.0%), 1-chlorobutane (n-BuCl) (>99.0%), 3-chloropropionitrile (Cl(CH2)2CN) (>98.0%), 4-chlorobutyronitrile (Cl(CH2)3CN) (>97.0%), 5-chlorovaleronitrile (Cl(CH2)4CN) (>97.0%), 4-bromobutyronitrile (Br(CH2)3CN) (>97.0%), and benzyl bromide (PhCH2Br) (>98.0%, stabilized with propylene oxide). Purchased from Oakwood Chemical were neopentyl iodide (Me3CCH2I) (98%), 4-iodobutyronitrile (I(CH2)3CN) (97%), and 1-(bromomethyl)-4-methoxybenzene (p-MeO-PhCH2Br) (stabilized with K2CO3). Purchased from Synquest Laboratories were 4-fluorobenzyl bromide (p-F-PhCH2Br) (98%), 4-(trifluoromethyl)benzyl bromide (p-F3C-PhCH2Br) (98%), and 4-cyanobenzyl bromide (p-NC-PhCH2Br) (98%). Purchased from Cambridge Isotope Laboratories were n-BuBr-d9 (98%) and n-BuI-d9 (98%, stabilized with copper). Purchased from AK Scientific was 1-(bromomethyl)-4-phenoxybenzene (p-PhO-PhCH2Br) (95%). Purchased from Thermo Scientific Chemicals was (1-bromoethyl)benzene (PhCH(CH3)Br) (97%). Among all the organic electrophiles mentioned above, solid chemicals were stored in the glovebox and used as received, whereas liquid chemicals were transferred in a Schlenk flask, evacuated under vacuum on a Schlenk line, brought into the glovebox, and dried over 3 Å molecular sieves (Sigma-Aldrich) before use.

Electrochemical experiments

All the stock solutions used for electrochemical experiments were prepared in the glovebox. Electrochemical experiments were performed in a single-compartment, three-electrode cell (placed in the glovebox) with a glassy carbon disk (3 mm in diameter) working electrode, a non-aqueous Ag/Ag+ reference electrode (the filling solution was prepared as 10 mM AgNO3 in anhydrous CH3CN using 0.1 M NBu4PF6 supporting electrolyte), and a platinum wire counter electrode connected to a CHI760E potentiostat (all from CH Instruments). The working electrode was polished with 0.05 μm MicroPolish alumina powder on a MicroCloth polishing pad (both from CH Instruments) pre-wet with deionized water, thoroughly rinsed with deionized water, briefly sonicated in acetone for less than 20 s, and dried under ambient conditions before use. All measured potentials were versus the Ag/Ag+ reference electrode, whose potential was calibrated against a ferrocene/ferrocenium (Fc/Fc+) redox couple (E versus Ag/Ag+ = E versus Fc/Fc+ + 0.072 V) and remained fairly stable throughout this work (less than ~10 mV drift over long-term storage). The formal potential for the CoII/ITPP redox was determined as −1.275 V versus Fc/Fc+. Cyclic voltammetry was measured with automatic iR compensation for three cycles, where the forward scan was a cathodic scan from −0.9 V vs. Ag/Ag+ to the switching potential (set to −1.5 V vs. Ag/Ag+ or a less negative value to avoid electroreduction of the metal–alkyl species formed from oxidative addition of organic electrophiles to the electrogenerated CoITPP), and the reverse scan was an anodic scan from the switching potential to −0.9 V vs. Ag/Ag+. For the system of CoTPP with organic electrophiles studied in this work, electrode fouling was not observed for the working electrode during prolonged electrochemical testing (hundreds or thousands of cyclic voltammetry measurements during the autonomous closed-loop workflow or automated exhaustive screening, respectively), which allowed for continuous operation without the need of re-polishing the working electrode in the middle of each electrochemical experiment.

Autonomous electrochemical platform

Detailed information about our constructed autonomous electrochemical platform is provided in the Supplementary Information, including but not limited to hardware and software specifications, standard operating procedures, and rationales behind our design of a closed-loop workflow for autonomous investigation of an EC mechanism between CoTPP and a library of organohalide substrates in two stages (Stage I for mechanism discernment and Stage II for electrokinetic analysis).