In the paper we propose the method of agent-based neural network model to enhance the behaviors and the communication functions of real planner two degrees of freedom (2-dof) robot arms. Each joint of the manipulator is respectively provided a learning method to optimize trajectory by training RNN model. The evolutionary process in our experiments is carried out entirely on the robot by the proposed controller without human intervention. In addition, the master/slave manipulator system is proposed. The slave arm cooperates with the master like the action of human. Each joint is controlled by the distributed subagent. The method is first evaluated on a relatively simple task and then on increasingly complex behaviors towards the goal tasks. Simulation results show the effectiveness of this approach, and that the proposed RNN model can successfully learning the inverse dynamics of robot manipulators, perform accurate tracking for a general trajectory.