AgenTRIM: Tool Risk Mitigation for Agentic AI
This work addresses the security risks—such as indirect prompt injection—and performance degradation arising from improper tool permission configurations in AI agents, which often manifest as overuse or underuse of tools. The authors propose AgenTRIM, a novel framework that formally characterizes the problem of tool-induced capability imbalance in agents for the first time. Without modifying the agent’s internal logic, AgenTRIM enables runtime risk detection and mitigation through offline interface reconstruction verification and online dynamic filtering based on the principle of least privilege. By integrating code and execution trace analysis, state-aware validation, and adaptive call filtering, the approach significantly reduces attack success rates on the AgentDojo benchmark while maintaining high task completion rates, demonstrating strong robustness against both descriptive attacks and explicit security policies.