Agent programs are increasingly widely used for large scale, time critical applications. In developing such applications, the performance of the agent platform is a key concern. Many logic-based BDI-based agent programming languages rely on inferencing over some underlying knowledge representation. While this allows the development of flexible, declarative programs, repeated inferencing triggered by queries to the agent's knowledge representation can result in poor performance. In this paper we present an approach to query caching for agent programming languages. Our approach is motivated by the observation that agents repeatedly perform queries against a database of beliefs and goals to select possible courses of action. Caching the results of previous queries (memoization) is therefore likely to be beneficial. We develop an abstract model of the performance of a logic-based BDI agent programming language. Using our model together with traces from typical agent programs, we quantify the possible performance improvements that can be achieved by memoization. Our results suggest that memoization has the potential to significantly increase the performance of logic-based agent platforms.