Abstract
Language agents repeatedly call models for recurring local operations. Traj2Rules learns short executable rules by linking success, failure, or unknown outcomes to specific action programs in previous trajectories. A generator proposes and revises rules using execution feedback within predefined domain interfaces. At deployment, a frozen rule library can execute a uniquely supported action before a model call, verify its effect, and reject or repair model proposals. With Qwen3.5-9B, success rates reached 69.65%, 54.44%, and 49.00% on ALFWorld, ScienceWorld, and WebShop. Paired tests supported gains of 10.00–11.44 percentage points over ReAct across the three domains, while model requests fell by 26.3–31.1%. Enumeration over the same interfaces recovered about three-fifths of the observed success-rate gain over ReAct. Fine-tuning increased mean probe coverage for the 9B generator from 40.6% to 57.4%. In the primary paired analysis, only WebShop showed a statistically significant gain over frozen AutoTool (AutoTool-F) without the additional registered checks (5.93 percentage points). When AutoTool-F used the same checks as Traj2Rules, only the WebShop gain was significant (4.87 percentage points, Holm-adjusted ). Across the three domains, the full method scored 0.33–0.75 percentage points higher than direct rule generation with the untuned 27B model. These comparisons did not establish a success-rate benefit from generator training.