Living systems are capable of locomotion, reconfiguration and replication. To perform these tasks, cells spatiotemporally coordinate the interactions of force-generating, ‘active’ molecules that create and manipulate non-equilibrium structures and force fields of up to millimetre length scales1,2,3. Experimental active-matter systems of biological or synthetic molecules are capable of spontaneously organizing into structures4,5 and generating global flows6,7,8,9. However, these experimental systems lack the spatiotemporal control found in cells, limiting their utility for studying non-equilibrium phenomena and bioinspired engineering. Here we uncover non-equilibrium phenomena and principles of boundary-mediated control by optically modulating structures and fluid flow in an engineered system of active biomolecules. Our system consists of purified microtubules and light-activatable motor proteins that crosslink and organize the microtubules into distinct structures upon illumination. We develop basic operations—defined as sets of light patterns—to create, move and merge the microtubule structures. By combining these operations, we create microtubule networks that span several hundred micrometres in length and contract at speeds up to an order of magnitude higher than the speed of an individual motor protein. We manipulate these contractile networks to generate and sculpt persistent fluid flows. The principles of boundary-mediated control that we uncover may be used to study emergent cellular structures and forces and to develop programmable active-matter devices.