AI agents and your files: what they can access and how to limit it
AI agents now read and edit files in Word, Excel, and cloud drives. Learn what they can see and how to limit it with permissions, folders, and file cleanup.
From chat windows to agents in your files
A chatbot only sees what you paste in. An agent can open, read, and change files itself. As of late 2026, this is normal in everyday office apps:
- Microsoft 365 Copilot Agent Mode is the default in Word, Excel, and PowerPoint for Microsoft 365 Copilot and Premium subscribers. It makes multi-step edits directly in your document and shows each step in a sidebar.
- Claude for Microsoft 365 add-ins can work across open Excel, Word, PowerPoint, and Outlook files in one conversation. Anthropic's docs say this cross-app mode needs a "Let Claude work across files" setting, which is on by default for Pro and Max plans and off by default for Team and Enterprise.
- ChatGPT's Office add-in works in Excel, Word, and PowerPoint, and can make changes in your spreadsheets and presentations.
- OpenAI Codex, first built for developers, is now also used by knowledge workers for reports, spreadsheets, and presentations, and can work with local files you give it.
That is a big productivity gain. It also means the question is no longer only "what did I paste?" but "what can this agent reach?"
What an agent can typically see
Access depends on the product, your plan, and your settings, but it usually comes from a few places:
- The open file, including all of its content: hidden sheets, comments, tracked changes, speaker notes, and document properties.
- Other open files, when cross-app or cross-file features are on.
- Connectors (sometimes called apps or integrations) to cloud drives, email, calendars, and business tools. A connector to your whole drive can search your whole drive.
- Files and folders you attach or point it to, such as a project folder.
A useful rule: assume the agent can read everything in any file, folder, or account you have connected, including the parts you have forgotten about.
Limit access in settings
- Review connectors. In each assistant's settings, look at which drives, mailboxes, and apps are connected. Disconnect any you don't use every week.
- Turn cross-file features on only when needed. If your assistant can work across all open files, close unrelated documents first, or turn the setting off.
- Check data controls. Look for settings on chat history, retention, and whether your content is used to improve models. Work accounts may have admin-set rules.
- Follow your employer's policy. Some organisations allow only approved assistants, or none at all for client data.
Use a separate working folder
The simplest control is physical separation. Make a folder called something like AI-workspace and put copies of only the files you want the agent to work on there. Point the agent or connector at that folder, not your whole drive or Documents folder.
Working on copies has a second benefit. Agents can make mistakes, including deleting content. OpenAI's own guidance for its PowerPoint add-in suggests duplicating important files first so you can go back.
Clean the file before the agent sees it
Even inside a safe folder, the file itself can carry more than you mean to share:
- Remove irrelevant pages. A 40-page PDF where you need help with 3 pages? Use Remove pages or Extract pages so the rest never reaches the agent. Both run in your browser.
- Check metadata. PDFs carry a title, author, subject, and keywords that may include names, client codes, or old project titles. Open the file in PDF metadata, clear any field you don't want shared, and save a new copy. This runs in your browser and doesn't change the visible pages.
- Send text, not the original. If the agent only needs the words, export them with PDF to text. That leaves out images, signatures, and anything hidden in the file's structure.
- In Office files, delete hidden sheets, old comments, and tracked changes you don't need before giving the file to an agent.
Keep some files out entirely
- Identity documents: Aadhaar, PAN, passport scans.
- Password lists, recovery codes, and one-time passwords, including in screenshots.
- Other people's medical, legal, or financial records.
- Anything under a confidentiality agreement your AI use isn't covered by.
For more on deciding what to share, see is it safe to upload documents to AI tools?
Check what the agent did
After an agent edits a file, review the changes before you send it anywhere. Use tracked changes in Word, the step-by-step sidebar where one exists, and version history in your cloud drive. Treat an agent like a fast new colleague: helpful, but you check their work before it goes out under your name.
FAQ
Can an AI agent read my whole Google Drive or OneDrive?
If you connect it to the whole drive, assume it can search it. Connect a dedicated folder instead, and remove connectors you don't use.
Does editing PDF metadata change the pages?
No. PDF metadata changes the title, author, subject, and keywords only. Clear a field before saving to remove it.
Is removing pages enough to protect sensitive information?
It removes those pages from the new file. Also check the remaining pages, the metadata, and the file name before sharing.