  Kinetic Monte Carlo methods such as the Gillespie algorithm model chemical
reactions as random walks in particle number space. The inter-reaction times
are exponentially distributed under the assumption that the system is well
mixed. We introduce an arbitrary inter-reaction time distribution, which may
account for the impact of incomplete mixing on chemical reactions, and in
general stochastic reaction delay, which may represent the impact of extrinsic
noise. This process defines an inhomogeneous continuous time random walk in
particle number space, from which we derive a generalized chemical master
equation. This leads naturally to a generalization of the Gillespie algorithm.
Based on this formalism, we determine the modified chemical rate laws for
different inter-reaction time distributions. This framework traces
Michaelis--Menten-type kinetics back to finite-mean delay times, and predicts
time-nonlocal macroscopic reaction kinetics as a consequence of broadly
distributed delays. Non-Markovian kinetics exhibit weak ergodicity breaking and
show key features of reactions under local non-equilibrium.
