AgentPolicyForge is a framework that leverages executable environments to automatically construct policy benchmarks and iteratively train policy guards. It records the outcomes of real tool calls to decide whether they comply with predefined policies on tools, resources, and execution conditions.\ \ The framework first builds the PolicyGym dataset, covering ten policy families with 698 scenarios for training data generation and 254 human‑reviewed held‑out scenarios for testing. Every violating case uses an allowed tool, so the guard must inspect arguments, resources, and context rather than relying on tool identity alone.\ \ During iterative training, an attacker generates requests using retrieved attack strategies, and the guard is fine‑tuned on balanced, environment‑verified examples. Results show that even with a fixed archive, training markedly improves policy enforcement; updating the archive further reduces in‑domain attack success rates.\ \ Compared with pure policy prompting, the guard‑based configuration achieves a 40%–44% relative reduction in attack success on PolicyGym and incurs fewer benign rejections.\ \ Review