The recent advancements in digital technologies and artificial intelligence in the architecture, engineering, construction, and operation sector (AECO) have induced high demands on the digital skills of human experts, builders, and workers. At the same time, to satisfy the standards of the production-efficient AECO sector by reducing costs, energy, health risk, material resources, and labor demand through efficient production and construction methods such as design for manufacture and assembly (DfMA), it is necessary to resolve efficiency-related problems in mutual human‒machine collaborations. In this article, a method utilizing artificial intelligence (AI), namely, generative adversarial imitation learning (GAIL), is presented then evaluated in two independent experiments related to the processes of DfMA as an efficient human‒machine collaboration. These experiments include a) training the digital twin of a robot to execute a robotic toolpath according to human gestures and b) the generation of a spatial configuration driven by a human's design intent provided in a demonstration. The framework encompasses human intelligence and creativity, which the AI agent in the learning process observes, understands, learns, and imitates. For both experimental cases, the human demonstration, the agent's training, the toolpath execution, and the assembly configuration process are conducted digitally. Following the scenario generated by an AI agent in a digital space, physical assembly is undertaken by human builders as the next step. The implemented workflow successfully delivers the learned toolpath and scalable spatial assemblies, articulating human intelligence, intuition, and creativity in the cocreative design.