Prompt Injection and Unauthorized Tool Usage Detection In AI Agents With a Context-Aware Security Framework
AI agents with large language models (LLMs) can handle user requests, fetch external data, understand external tools' responses, and execute actions on external tools. These are features that enhance automation but also create security concerns. Malicious instructions in a user prompt, web page, document, or tool output can cause an agent to act in an inappropriate way, rather than following the user's intent [1] and [2]. This study introduces a straightforward security framework to mitigate the threat of prompt injection tampering on AI tools that are used by people. This study suggests a simple security framework for decreasing the risk of prompt injection affecting people using tools with AI. The framework consists of four functions: the collection of contexts, the analysis of context, the detection of prompt, and the validation of tools. The suspected trust and suspicious attributes of input elements and proposed tool requests are classified based on their content, and the original user goal is checked for relevance, for suspected influence from suspicious context, and for action sensitivity. The framework makes one of four decisions based on these checks: Allow, Monitor, Require Confirmation, and Block. The paper also provides a reproducible experimental methodology based on comparison with the approach without any security mechanism and with basic prompt filtering. At this point no experimental results are claimed. This contribution is a practical approach that maps context analysis and pre-execution validation of agent tool requests.
Authors
- Dr. Sandeep Kumar Soni
- Shivam Rai
- Kshama Rani Sahu
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-14
- DOI
- https://doi.org/10.5281/zenodo.22746625
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- article
- Field-Weighted Citation Impact
- 0.00