Role Based Agent Collaboration for Business Logic Extraction from Legacy Systems
Abstract
Legacy systems remain critical to many organizations, yet extracting their embedded business logic presents significant challenges due to outdated programming languages, limited documentation, complex dependencies, and accumulated technical debt. Traditional reverse-engineering approaches often require substantial manual effort and domain expertise, making the process time-consuming, error-prone, and difficult to scale. This study proposes a Role-Based Agent Collaboration (RBAC) framework that leverages multiple specialized artificial intelligence agents to automate and improve business logic extraction from legacy software systems. The framework assigns distinct responsibilities to collaborating agents, including code analysis, dependency identification, business rule discovery, domain interpretation, and validation of extracted logic. Through structured communication, shared contextual information, and coordinated reasoning, the agents collaboratively analyze source code, trace control and data flows, identify implicit business rules, and transform technical implementations into structured, human-readable representations of business processes. A coordination mechanism manages task allocation, resolves conflicting interpretations, and supports cross-agent verification to improve the consistency, traceability, and reliability of the extracted knowledge. The proposed approach aims to reduce dependence on manual code inspection while preserving the semantic relationships between business rules, data structures, and system behavior. Its effectiveness can be evaluated using metrics such as extraction accuracy, rule coverage, traceability, processing time, and inter-agent agreement, with comparisons against conventional static analysis and single-agent approaches. The framework offers a systematic foundation for legacy system modernization, knowledge preservation, software maintenance, and migration toward contemporary architectures. By combining role specialization with collaborative reasoning, this research seeks to establish a scalable and explainable approach to recovering business knowledge embedded in complex legacy applications.