Design and Development of an AI-Powered Python Framework for Workflow Automation
Keywords:
Workflow Automation; Artificial Intelligence; Python Framework; Robotic Process Automation; Reinforcement Learning; Directed Acyclic Graph; Self-Healing Systems; Mlops; Distributed Task Scheduling; Intelligent OrchestrationAbstract
With the integration of AI into enterprise IT infrastructure, there is an increasing need for automation systems that can flexibly adapt themselves to the context rather than merely imposing rigid control based on rules. In this paper, we propose a Python framework for automating the workflow processes using AI comprising components such as natural language intent parsing, DAG-based task orchestration, RL-based resource scheduling, and self-healing capability. Unlike existing robotic process automation (RPA) software and other static workflow schedulers such as Apache Airflow or Celery, this approach leverages large language models (LLMs) and RL to define the decomposition of high-level intentions into tasks, resource allocation consistent with service-level agreements (SLAs), and fault tolerance through the proposed self-healing mechanisms. To implement the framework, we utilized the technologies including Python 3.11, FastAPI, asynchronous task queues, and transformer-based intent classifier. To evaluate the performance of the proposed framework, we compared it against the other four approaches in terms of the number of tasks processed in a minute, task classification accuracy, and average time to recover from faults. In a benchmark involving 1,000 tasks on a computer with 16 cores, our framework was able to handle an average of 842 tasks per minute, had 96.3% task classification accuracy, and recovered from faults in 4.1 seconds on average – that is, outperforming the best baseline by 38-65%. Our major contributions include a mathematical framework for SLA-based scheduling, novel self-healing algorithms, and architecture that can be deployed in the process of digital transformation of enterprises. Thus, we demonstrate that hybrid AI orchestration frameworks are significantly more effective than RPA systems and workflow engine schedulers and remain lightweight enough to work in resource-limited environments.












