Accountability is an important aspect of any computer system. It assures that every action executed in the system can be traced back to some entity. Accountability is even more crucial for assuring the safety and security in grid systems, given the very large number of users active in these sophisticated environments. However, to date no comprehensive approach to accountability for grid systems exists. Our work addresses such inadequacy by developing a comprehensive accountability system driven by policies and supported by accountability agents. In this paper we first discuss the requirements that have driven the design of our accountability system and then present some interesting aspects related to our accountability framework. We describe a fully working implementation of our accountability system, and conduct extensive experimental evaluations. Our experiments, carried out using the Emulab  testbed, demonstrate that the implemented system is efficient and it scales for grid systems of large number of resources and users.