In vehicular ad-hoc networks, autonomous vehicles generate a large amount of data prior to support in-vehicle applications. So, a big storage and high computation platform is needed. On the other hand, the computation for vehicular networks at the cloud platform requires low latency. Applying edge computation (EC) as a new computing paradigm has potentials to provide computation services while reducing the latency and improving the total utility. We propose a three-tier EC framework to set the elastic calculating processing capacity and dynamic route calculation to suitable edge servers for real-time vehicle monitoring. This framework includes the cloud computation layer, EC layer, and device layer. The formulation of resource allocation approach is similar to an optimization problem. We design a new reinforcement learning (RL) algorithm to deal with resource allocation problem assisted by cloud computation. By integration of EC and software defined networking (SDN), this study provides a new software defined networking edge (SDNE) framework for resource assignment in vehicular networks. The novelty of this work is to design a multi-agent RL-based approach using experience reply. The proposed algorithm stores the users' communication information and the network tracks' state in realtime. The results of simulation with various system factors are presented to display the efficiency of the suggested framework. We present results with a real-world case study.