In individuals with lower-limb amputations, robotic prostheses can increase walking speed, and reduce energy use, the incidence of falls and the development of secondary complications. However, safe and reliable prosthetic-limb control strategies for robust ambulation in real-world settings remain out of reach, partly because control strategies have been tested with different robotic hardware in constrained laboratory settings. Here, we report the design and clinical implementation of an integrated robotic knee–ankle prosthesis that facilitates the real-world testing of its biomechanics and control strategies. The bionic leg is open source, it includes software for low-level control and for communication with control systems, and its hardware design is customizable, enabling reduction in its mass and cost, improvement in its ease of use and independent operation of the knee and ankle joints. We characterized the electromechanical and thermal performance of the bionic leg in benchtop testing, as well as its kinematics and kinetics in three individuals during walking on level ground, ramps and stairs. The open-source integrated-hardware solution and benchmark data that we provide should help with research and clinical testing of knee–ankle prostheses in real-world environments.