This paper develops a theory in which the network structure of production—the set of plant-level input-output relationships—is the endogenous outcome of individual choices, and these choices shape productivity at the micro and macro levels. Entrepreneurs search for production techniques that use alternative sets of inputs, which are in turn produced by other entrepreneurs. The value of a technique depends both on its inherent productivity and on the cost of associated inputs; when producing, each entrepreneur selects the technique that delivers the best combination. These choices collectively determine the economy's equilibrium input-output structure. As new techniques are discovered, entrepreneurs substitute across suppliers in response to changing input prices. Despite the network structure, the model is analytically tractable, allowing for sharp characterizations of aggregate productivity and various micro-level characteristics. When the share of intermediate goods relative to labor in production is high, star suppliers emerge endogenously as small cost differences are amplified. Aggregate productivity depends on how frequently the lower-cost entrepreneurs are selected as suppliers. Larger firms tend to experience smaller reductions in cost but play an important role in the diffusion of cost savings through the network.