Security is an important issue for the widespread deployment of applications based on agent technology. It is generally agreed that without the proper countermeasures in place, use of agent-based applications will be severely impeded. However, not all applications require the same set of countermeasures, nor can they depend entirely on the agent system to provide them. Instead, countermeasures are applied commensurate with the anticipated threat profile and intended security objectives for the application. Moreover, many countermeasures can be incorporated into the design of the application to supplement the capabilities of a specific agent system. This paper gives an overview of present day countermeasures for agent security, weighing their strengths and weaknesses. Its focus is mobile software agents, since they typically face a more severe set of threats than do static agents and, therefore, demand more rigorous countermeasures. The paper provides insight for securing agent-based applications, which can be used in the selection of agent systems through to application design.