Ancient India had a highly nomadic government that was primarily based on tribes and movement. Over time, these tribes settled into small groups as their agriculture developed. These groups were still split up based upon tribal lines and were headed by the king, referred to in Indian culture as a raja. Eventually, these agricultural tribes developed into larger kingdoms with their own sets of politics and governmental policies.
The primary motivation for tribes to settle down and form non-nomadic groups in ancient India was the development of agriculture, which allowed them to work the land instead of traveling and hunting. Once established, Indian settlements developed into republics and kingdoms that were headed by political leaders. Even in ancient times, there were some democratic elements in these governments. The raja was the supreme head of all branches. However, there were many different officials that helped the raja with bureaucratic advice. Final decisions were ultimately left to the raja.
There were also civilian and military officials at the time, who received an annual salary. These officials took on a number of different record-keeping and bureaucratic duties, like recording census information and the incomes and expenditures of the forming governments. Some of these governmental groups even had spies on their payroll to engage in espionage against other groups.