AI-Driven Self-Evolving Software: A Promising Path Toward Software Automation

Liyi Cai, Yijie Ren, Yitong Zhang, Jia LiarXiv 2025 · DOI

Introduction

The current software development landscape is fundamentally human-centric. Despite the proliferation of AI coding assistants like GitHub Copilot, humans are still required to bridge the critical gaps between requirement analysis, system design, implementation, and rigorous testing. This "human-in-the-loop" requirement introduces significant economic costs and time overhead due to the constant coordination needed across different development stages.

Researchers from Tsinghua, Peking, and Beihang Universities have proposed a provocative shift: moving AI from a "coding assistant" to the "core engine" of the software itself. They introduced a prototype for AI-Driven Self-Evolving Software, a system that starts with minimal functionality and autonomously "grows" by generating, validating, and integrating new code as it interacts with user requirements.

System Architecture

The authors developed a lightweight prototype utilizing a multi-agent architecture powered by OpenAI’s o3 model. This modular approach allows for specialized agents to handle different aspects of the software lifecycle without constant human intervention.

The multi-agent architecture of the self-evolving software prototype, illustrating the interaction between the Leader, specialized agents, and system resources.

The system is composed of four core specialized modules:

  1. The Leader: Acts as the "brain" and primary user interface. It analyzes natural language requests, determines if the system already possesses the necessary functionality, and delegates tasks to other agents when new features are required.
  2. The Data Manager: Solves the critical challenge of managing a growing codebase within the finite token limits of Large Language Models (LLMs).
  3. The Code Generator: An LLM-based agent responsible for writing or modifying Python scripts to meet new user requirements.
  4. The Code Validator: Ensures system reliability by using execution-based verification and cross-validation.

Hierarchical Context Management

One of the primary hurdles for AI agents in software development is "forgetting" parts of a large codebase as it scales. To maintain a coherent understanding of the system, the Data Manager maintains a hierarchical tree structure of the software’s files and metadata.

The hierarchical metadata structure (node) used by the Data Manager to provide a structured JSON 'map' of the system to other agents.

As shown in the figure above, each "node" in the system contains metadata such as names, types (directory or file), descriptions, dependencies, and lists of classes or functions. By providing agents with this structured JSON "map" rather than the raw source code of every file, the system allows agents to understand the high-level architecture and only request specific code snippets when needed. This approach effectively manages the LLM's context window, allowing the software to evolve without losing track of its existing components.

Autonomous Validation and Reliability

To ensure that the self-evolving software remains reliable, the system employs a cross-validation approach inspired by MBR-EXEC. Since AI-generated code cannot be guaranteed to be correct on the first attempt, the system relies on the concept of semantic equivalence.

The Code Validator generates multiple candidate programs for a single requirement and creates a suite of test inputs. It then executes these candidates and ranks them based on "execution consistency." If multiple independent versions of the code produce the same output or result in the same environmental state change (such as a specific file being created or deleted), the system gains high confidence in their correctness. This allows the software to autonomously pick the "best" version of a new feature without requiring a human reviewer to read the code.

Experimental Results

The prototype was evaluated using four representative case scenarios: API integration (weather data), local data management (expense tracking), web resource handling (GitHub and PDF management), and text processing (Markdown-to-HTML conversion).

The system successfully demonstrated "self-evolution" in all tests:

  • Functionality Reuse: In the API test, after building a weather tool for one city, the system reused the same code logic when asked for weather in a different location.
  • State-Based Validation: In the web resource scenario, the system successfully validated code by "reasoning" about the state of the file system, even when the scripts produced no direct text output.
  • Complex Task Handling: The expense tracker scenario showed the system could handle a long sequence of related tasks, from building a database to parsing natural language entries like "I spent 58 yuan on dinner."

Conclusion and Future Outlook

AI-driven self-evolving software represents a significant step toward genuine software automation. By shifting the AI from an assistant to the core engine, software can become more personalized and less bloated. Future work will focus on scaling this approach to enterprise-level systems, incorporating formal verification methods for safety-critical applications, and moving toward "Full Self-Evolution" where the software proactively identifies and implements its own improvements.

Summary updated

BibTeX
@misc{cai2025ai,
  author = {Liyi Cai and Yijie Ren and Yitong Zhang and Jia Li},
  title = {{AI-Driven Self-Evolving Software: A Promising Path Toward Software Automation}},
  year = {2025},
  eprint = {2510.00591},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.00591},
}
Figure