The convergence of Software-Defined Networking (SDN) and Internet of Vehicular (IoV) integrated with Fog Computing (FC), known as Software Defined Vehicular based FC (SDV-F), has recently been established to take advantage of both paradigms and efficiently control the wireless networks. SDV-F tackles numerous problems, such as scalability, load-balancing, energy consumption, and security. It lags, however, in providing a promising approach to enable ultra-reliable and delay-sensitive applications with high vehicle mobility over SDV-F. We propose ARTNet, an AI-based Vehicle-to-Everything (V2X) framework for resource distribution and optimized communication using the SDV-F architecture. ARTNet offers ultra-reliable and low-latency communications, particularly in highly dynamic environments, which is still a challenge in IoV. ARTNet is composed of intelligent agents/controllers, to make decisions intelligently about (i) maximizing resource utilization at the fog layer, and (ii) minimizing the average end-to-end delay of time-critical IoV applications. Moreover, ARTNet is designed to assign a task to fog nodes based on their states. Our experimental results show that considering a dynamic IoV environment, ARTNet can efficiently distribute the fog layer tasks while minimizing the delay.