In recent years, formation flying has been recognized as an enabling technology for a variety of mission concepts in both the scientific and defense arenas. For NASA missions such as MMS, SIRA. and TPF, a multiple-satellite approach is required in order to accomplish the large-scale geometries imposed by the science objectives. In addition, the paradigm shift of using a multiple-satellite cluster rather than a large, monolithic spacecraft has also been motivated by the expected benefits of increased robustness, greater flexibility, and reduced cost. However, the operational costs of monitoring and commanding a fleet of close-orbiting satellites is likely to be unreasonable unless the onboard software is sufficiently autonomous, robust, and scalable to large clusters. This paper presents the prototype of a decentralized formation flying (DFF) control system that addresses the issues of autonomy, robustness, and scalability. In particular, the system is designed to: accommodate a wide range of orbits and formation geometries; support different types of spacecraft configurations; provide for a substantial degree of autonomous operation; be scalable to large clusters, through the use of a multiple-team organization; and allow software modifications to be made safely and efficiently throughout the mission. Some of the autonomous capabilities include automatic formation initialization, planning and execution of reconfiguration maneuvers, and pre-emptive collision avoidance.