Manuscript Offprint

arXiv:2611.12288

ForgeSystem: An Architecture for Demand-Specific Artefact Production with AI Agents

Qingfeng He, Zhui Zhu, Yaojian Chen, Shangzhan Li, Leshan Li, Tingjian Zhang, Qian Xie, Yuxuan Li, Xu Han, Zhiyuan Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

General-purpose software serves many different demands, but this flexibility costs performance and efficiency on any specific demand. Software tailored to a specific demand avoids these losses, yet developing it requires substantial time and effort from human experts. AI agents offer an alternative: they can design, implement and test artefacts tailored to individual demands. We call this production paradigm Forge. Forging for a demand is economically justified when the cumulative benefit of specialisation exceeds the total cost of construction, verification and maintenance. To make Forge a repeatable production process, we propose ForgeSystem, which consists of a control layer, a forge loop and a recursive self-improvement (RSI) loop. The control layer selects which artefact serves each demand and decides which demands to forge, when to forge them and from which starting point; the forge loop iterates between production and verification until a candidate artefact passes verification; and the RSI loop draws on accumulated production records to supply starting points, refine the harness and train models. We implement ForgeSystem for training frameworks, decoding megakernels and individual computational kernels. Forged training engines reach 1.047−1.332×1.047-1.332\times the model-FLOPs utilisation of their reference frameworks, forged megakernels achieve a geometric-mean decoding speedup of 1.21×1.21\times over SGLang across thirteen configurations, and forged kernels match or exceed expert libraries in eighteen of twenty-two configurations, while satisfying task-specific quality requirements. Controlled comparisons show that explicit quality requirements steer agents towards optimisations that preserve training quality. We also discuss a gradual transition to Forge through service routing, and how demand-specific production may shift value accumulation and trust towards production systems.

Keywords: agentic software engineering, software specialisation, machine learning systems, recursive self-improvement

1 Introduction

General-purpose software serves diverse demands through a shared implementation, but the design compromises needed to accommodate different scenarios limit its performance and efficiency for specific demands. Specialised software, by contrast, is designed around a specific demand and can exploit its particular conditions for more thorough optimisation. For example, an inference engine tailored to a particular model, hardware platform and workload can exploit the interactions among model structure, hardware characteristics and workload patterns to optimise overall execution efficiency. Realising these benefits has traditionally required experts to make demand-specific design choices, implement them and conduct experiments. Repeating this work for each new demand makes specialisation costly and limits the range of demands it can economically serve.

AI agents are beginning to undertake this construction work. VibeServe generates inference systems tailored to specified models, hardware and workloads[1]. Bespoke OLAP constructs analytical engines from scratch for given query workloads[2]. Similar agents have been built for video-inference acceleration and kernel generation (Appendix B)[3–5]. Despite differences in their outputs, these systems share a production structure: a concrete demand specifies the objectives and constraints, and an agent organises design, implementation and evaluation to produce a specialised artefact.

We call this production paradigm Forge: agents organise resources and iteratively construct, evaluate and refine specialised artefacts for explicit demands. The demand determines the scope of construction, from an individual computational kernel to a software system comprising interacting components. Forge reuses construction capabilities across demands to produce artefacts tailored to each demand. Its economic rationale is that the cumulative benefit of specialisation can exceed the total cost of construction, verification and maintenance.

Making Forge a repeatable production process requires organising long-horizon construction, maintaining quality throughout optimisation and using accumulated experience to improve subsequent production. To meet these requirements, we propose ForgeSystem, which consists of a control layer, a forge loop and a recursive self-improvement (RSI) loop (Fig. 2). The control layer determines which artefact serves each demand and decides which demands to forge, when to forge them and from which starting point. The forge loop constructs and verifies artefacts, keeping production separate from verification. Production combines deep specialisation, vertical integration and massive exploration. Verification consists of process management, which constrains how agents carry out construction, and artefact judgement, which checks the artefacts they produce. The RSI loop stores each delivered artefact together with its demand and construction trace, and draws on these records to improve subsequent forges by providing starting points, refining the harness and training the underlying model.

We implement ForgeSystem at three levels—complete training frameworks, decoding megakernels and individual computational kernels—yielding ForgeTrain, ForgeMegakernel and ForgeKernel[6–8]. ForgeTrain's model FLOPs utilisation is 1.047–1.332× that of the reference frameworks[6], and ForgeMegakernel achieves a geometric-mean speedup of 1.21× over SGLang across thirteen configurations[7]. ForgeKernel achieves a speedup of at least 1.0× over the references in eighteen of twenty-two expert-library configurations and all seven configurations evaluated against kernel-generation systems[8]. Quality evaluations show comparable training outcomes and inference quality, together with correct operator outputs. Controlled comparisons in training-framework construction further show that explicit quality requirements can guide agents towards optimisations that preserve training quality[6].

Our contributions are fourfold:

  1. We formulate Forge as a production paradigm in which agents construct specialised artefacts for explicit demands, and articulate an economic criterion based on the benefits of specialisation and the total cost of production.

  2. We propose ForgeSystem, which consists of a control layer, a forge loop and an RSI loop, instantiate it in training frameworks, megakernels and computational kernels, and evaluate its performance and correctness through experiments, ablations and controlled comparisons.

  3. We outline a gradual transition path from the general-purpose paradigm to the Forge paradigm, in which general-purpose and forged artefacts coexist and service progressively shifts to forged artefacts that pass verification.

  4. We analyse two potential long-term implications of demand-specific production: a shift in value accumulation towards production systems, and an extension of trust from individual artefacts to the systems that produce them.

References (56)