Using an agent-based model, this paper revisits the merits for a central bank of announcing its inflation target. The model preserves the main transmission channels of monetary policy used in stochastic dynamic general equilibrium modelsnamely the consumption and the expectation channels, while allowing for agents' heterogeneity in both expectations and behavior. We find that, in a rather stable environment such as the Great Moderation period, announcing the target allows for the emergence of a loop between credibility and success: if the target is credible, inflation expectations remain anchored at the target, which helps stabilize inflation, and, in turn, reinforces the central bank's credibility. We then tune the degree of heterogeneity in agents' behavior and the individual learning process to introduce inflationary pressures, accompanied or not by uncertainty affecting the real transmission channel of monetary policy. Even if learning and heterogeneity would a priori lead to thinking favorably about transparency, we show that this virtuous circle is not robust, as transparency may expose the central bank to a risk of credibility loss. In this case, we discuss the potential benefits from partial announcements.