A system or method automates and optimizes citrate anticoagulant supplementation in a blood filtration circuit during CRRT. A processor-based control system interfaces with a blood filtration circuit to detect patient blood flow into the circuit, detect fluid loss through a hemofilter, and sense vital electrolyte concentrations in the blood flow, and in response, control the addition of citrate, substitution fluid, and electrolyte supplements to ensure stability of plasma concentrations in post-dilution flow returned to the patient. The controller executes the method embodied as process control algorithms for calculating an optimal citrate flow rate as a function of selected, detected, and calculated system parameters. Citrate may be added to the circuit separately, or as part of a substitution solution or a dialysate.