
AI agent security starts with a simple question. What can the agent do if it gets a request wrong? Limit the files it can read, keep new work private by default, and make a person review any change to a shared system. Put those rules in the tools that do the work.
Map the path from a file to an action
Start with one job, such as reading product brochures and drafting a short summary. List where the agent gets its request, what files it can read and where a draft can go. Name the people and apps that can edit each source. Then list what each tool can read, write or send.
Files, web pages and tool results can contain text meant for other readers. Keep that text separate from the task and treat it as data. A model can still make the wrong choice, so the app must check each proposed action on its own. OWASP’s prompt injection guide describes why these checks matter.
Set AI agent security rules where tools run
Give the read tool access to the brochure folder alone. Give the write tool access to one drafts folder. Keep account keys in the tool or app, and check the signed-in user’s access before each call. Use the tool permissions matrix to write down what the agent can do for each job. OWASP’s guidance on excessive agency covers tool scope and user approval.
Before a write, show the reviewer the exact draft and its target. Ask for a new choice if either one changes. A denial or an expired request should leave the shared file as it was. For context on how those choices show up in a coding tool, see our Claude Code guide.
A local AI agent security check with sample files
We ran six checks on November 17, 2026, with sample files and a rule-based test. We used a brochure with a plain text marker and a separate drafts folder. An allowed read returned the marker as text and left each file as it was. A write outside the allowed folder stayed blocked, even with a sample approval.
A denied write did not make a draft. If a draft was already there, a denial left it intact. An expired choice also stopped the write. With a valid approval, only the text shown for review went to the named file. We checked paths, file contents and last edit times before and after each step.
These checks show what the local rules did with the sample files. They do not test a model, the identity of a real reviewer, or the access granted to a live tool. You can start with our beginner agent project and then run the same checks with the accounts you plan to use.
Use this checklist before the first live run
| Check | Who checks it | What to record |
| Source files | Workflow owner | Where source text enters and how it is kept apart from the task. |
| Access | Tool owner | What the signed-in user can do and what a blocked request left untouched. |
| Approval | Reviewer | The draft and target shown for review, plus what happened after yes, no or timeout. |
| Stop and recover | Operator | Who can pause work, stop queued calls and disconnect a tool. |
Save the answers with the test date and name someone to fix each open issue. Keep logs where the agent cannot edit them. Set a clear stop rule and check that it stops work still in the queue. The UK National Cyber Security Centre’s guidance covers oversight and what to do if an agent acts in an unexpected way.
A model that runs on your PC can still use tools that reach other systems. If you run the model on your own gear, map those tools as part of your AI agent security review. The architecture guide shows where the checks sit between the model and the tools. Our Local AI guide explains how to tell which steps run on your device.
Read also
Popular news

Good Morning AI | Anthropic slips, Claude reviews code and Tidal sets a cutoff

AI stocks slide again as Nvidia falls and Ambarella sinks 20.6%

GTA 6 on PC at 10 FPS? Inside the AI-Assisted Race to Port It

Tencent opens the AI models behind WeChat’s product search

Google’s Humanity’s First Exam Tests AI Reliability


