Mastering Budget Constraints in AI Agents: A Deep Dive