FRENES
2 December 2026

AI Agents and Sensitive Data: What I Hand Over (and What I Keep)

An AI agent running 24/7 on your business is a wonderful thing, until the day you realize everything it can touch. Your emails, your API keys, your website, sometimes your accounting. I have had an agent publishing articles on its own on this site for months. Here is how I think about AI agent security, with simple rules I actually apply. Because AI agent security is not decided inside a tool, it is decided in the design of the workflow.

The essential summary

  • The main risk is not the AI itself: it is what you give it access to. An API key, an email password, SSH access: every access is a door.
  • You never hand over everything. I separate four levels of data: public, operational, confidential and vital. The last two never go to an agent.
  • Three moves cover 80% of AI agent security: dedicated accounts with minimal rights, secrets stored out of reach of the model, and a revocation plan ready before the first incident.
  • An agent that publishes drafts breaks nothing serious. An agent that holds your main inbox does. Design every workflow so that the worst mistake stays reversible.

My verdict in one sentence: you do not “secure” an AI agent after the fact, you design it from the start to touch as little as possible. If you keep one idea from this article, make it that one.

The real risk is not the AI, it is the key

When people talk about AI agents and sensitive data, the imagery drifts to science fiction: the AI that “decides” to do something bad. That scenario stays marginal. The real risk is far more mundane.

An AI agent works because it holds keys. A key to call the language model. A key to publish on your site. Sometimes a key to read your emails, run your social accounts or query a stats API. Each of those keys grants lasting power, with no human supervision at the moment of action.

The danger takes three concrete forms. First, the leak: a key copied into a file, a log or a shared screen. Second, the excess: an agent with rights far broader than its mission. Third, the error: no malice at all, just a workflow that loops and deletes or publishes anything.

These are classic engineering problems, not a technological mystery. That is the whole point of AI agent security: classic engineering problems. And the good news is that classic solutions work.

Map what your agent really touches: the first move of AI agent security

Before talking about tools, do a half-hour exercise. List every access your agent holds today. For each one, note three things: what it lets it do, what it lets it destroy, and whether it can be revoked in a minute.

On my own setup, a Hermes agent on a small VPS, the mapping looks something like this: a model access token, WordPress publishing credentials for my Hermes install on a VPS, keys for Search Console and email sending, SSH access to the server. Everything is documented in a single file, and each access has a written reason next to it.

That inventory sounds obvious. Yet most entrepreneurs who automate have never done it. Access piles up as needs arise, a token here, a password there, and nobody knows any more who can do what. This access map is the first tool of AI agent security. If you cannot write that list from memory, it is your first project.

The map also helps you spot dead access. A token for a service abandoned three months ago is an open door with no reason behind it. You revoke it and move on.

The four levels of data: what goes through, what does not

To decide what I hand over, I rank data in four levels. This is the core of my decision grid between AI agents and sensitive data.

LevelExamplesHand it to an agent?
PublicPublished content, data already onlineYes, with no strong constraint
OperationalDrafts, site stats, task queuesYes, with limited rights
ConfidentialPrivate emails, client identities, family documentsNo, human access only
VitalRoot passwords, payment keys, bank dataNever, in any form

The public level carries almost no risk: your agent writes an article about information that is already public, the worst case is mediocre content. The operational level calls for calibrated rights: the agent creates drafts but does not publish alone, it reads stats but does not touch the site settings.

The confidential level changes everything. A private email holds personal data, sometimes sensitive family or business attachments. As soon as content of that kind enters the context of a model, it leaves your perimeter of control. That is exactly what is at stake when you connect Gemini to your Drive with your real documents. I build no workflow where an agent reads a main inbox.

The vital level is not up for debate. No agent needs payment access or root passwords to do its job. If you believe a workflow requires it, the workflow is what needs rethinking, not the rule.

Three technical rules that do the real work

Rule 1: dedicated accounts with minimal rights

Every agent gets its own access, created for it, never your personal accounts. On WordPress, a dedicated user with the lowest role that still allows the mission. For an API, a narrow-scope token rather than an administrator key. For a service that allows it, read-only permissions.

The principle of least privilege is as old as computer security, and it remains the first reflex of AI agent security. An agent with a publish-only token cannot delete your site, even in the worst bug scenario.

Rule 2: secrets live in a file, never in the context

API keys must live in environment variables or a configuration file on your server. The language model, for its part, must be able to use the key without ever having read it in its context. A well-built agent calls a function that signs the request, it never recites the secret.

Why this is critical: anything that enters the context of a model can come back out in a reply, a log or a debug trace. If your key is in the context, it sits potentially on the path of a leak. The confidentiality of your data is decided right there first: the separation between the secret and the reasoning remains the basis of AI agent confidentiality.

In practice on my setup: an environment file on the VPS, loaded when the agent starts, never displayed in prompts. And a simple principle: if one day I have to paste a key into a conversation to make something work, the workflow is badly designed.

Rule 3: a revocation plan written before the first incident

The question is not “will it happen?” but “what will I do in the ten minutes that follow?”. My AI agent security plan fits in three lines. Revoke the model token first, to cut the brain. Revoke third-party access next, following the map written earlier. Finally, inspect the logs to understand what happened.

I have already run that kind of check preventively: a VPS security audit with an open source model served as my dress rehearsal. What matters is having already located the revoke commands and URLs before the day you are stressed out.

To remember: dedicated accounts, secrets out of context, a revocation plan. Three moves, half a day of setup, and your AI agent security level is already beyond the vast majority of configurations I come across.

What I really hand over to my agent, in practice

Let us make this concrete with my real workflows on this site, running every task through the AI agent security filter. The agent suggests and writes articles, creates them as drafts, and waits for human approval. The worst error case produces a draft to rework, never a broken publication or a data loss. That is the model I recommend to any solopreneur starting out: AI agent security is worth what it makes irreversible.

Internal linking, stats analysis and keyword monitoring are mostly read tasks. The agent reads, suggests, writes text. Destructive actions, deleting content, changing settings, stay out of its perimeter. I run the whole thing as an editorial factory with a Master Node, where each agent only holds the keys of its own station.

Conversely, here is what I never give: my main email inbox, my banking access, my identity documents, and private family exchanges. These are not theoretical cases. A badly designed email automation is the kind of project I see fail regularly among the entrepreneurs I advise, simply because an agent had more access than it needed.

If you want to go further on delegation itself, I detailed what really works when you delegate to an AI agent, with the same guardrail logic applied to the work, not just to access.

And what does all of this cost?

One point many people forget: AI agent security also has a budget dimension, and it is rather reassuring. Dedicated accounts, environment files, token rotations: all of that is free or nearly free. The real bill for a 24/7 agent comes from the model, the VPS and the call volume, not from the protective measures.

In other words, there is no trade-off to make between budget and security. The right reflexes here cost nothing, they just ask for discipline the moment you create each new workflow.

The last word

An AI agent is an excellent collaborator with one precise flaw: it does not know caution, it knows instructions. AI agent security is simply your way of limiting the keys to the castle. Your job as a solopreneur is not to trust it, it is to design a system where trust is not necessary.

Four levels of data, three technical rules, one revocation plan. Half a day of work, applied once, protects you for years of automation. And if you are starting your first agent this week, do it with those guardrails from version one: rebuilding them later always costs more. The guide to running an AI agent on a VPS shows the exact setup I use, guardrails included.

Frequently asked questions about AI agent security

Can I give my passwords to an AI agent?

No. A personal password grants rights that are too broad and have no scope limit, which wrecks any logic of AI agent security. Use dedicated API tokens with minimal permissions, or accounts dedicated to the agent with the lowest possible role. If a service offers no API and no limited token, that is a signal: this workflow is not mature enough for automation.

What data should you never give to an AI agent?

Three categories. Your vital access: banking, payment, root passwords. The confidentiality of private exchanges also falls in this zone. Your confidential data: private emails, identity documents, personal exchanges. And third-party data you have no right to hold, such as personal customer information. Once that data sits in the context of a model, you no longer control its lifecycle.

Can an AI agent leak my information in its replies?

Yes, it is possible by construction. The context of a model can come back out partially in a reply, in a log or in a debug trace. The remedy is not to “be careful” but to never place secrets in the context: API keys in environment variables, sensitive data out of reach of the agent. That is the central principle of AI agent confidentiality.

How do I secure my agent’s API keys?

Store them in an environment file on your server, loaded at startup, never written into a prompt. Use narrow-scope tokens rather than administration keys. Document every key in an access map, and revoke the ones that are no longer used. Finally, check that you know how to revoke each key in under a minute.

What should I do if my AI agent has been compromised?

In order: revoke the model token to cut its capacity to act, revoke third-party access following your map, then examine the logs to measure what was touched. If the agent had minimal rights from the start, the perimeter to inspect stays small. That is exactly why you apply least privilege before the incident, not after.

Should I run a local model to protect my data?

It is a legitimate option for cases where no data may leave your machine. A local LLM reduces the exposure surface towards third-party servers, at the cost of less comfort and less power. For most solopreneur workflows, limited tokens and well-filtered data are more than enough. I reserve local models for the truly sensitive cases.

Laurent, AI Sherpa et créateur YouTube. Diplômé Audencia Business School et Master Sciences de l’Éducation, je propose un écosystème dont le but est de devenir un professionnel augmenté par l’IA, sans subir. Toujours professeur et père de famille expatrié, je partage mon parcours avec transparence pour vous aider à tirer le meilleur de ces nouveaux outils.
Laurent
Fondateur, MintAvocado
Envie d’en apprendre plus ?
Pour aller plus loin sur Mintavocado.com
  • 2 December 2026

    NotebookLM: 9 PRO Techniques You’re Ignoring (2026)

  • 2 December 2026

    Perplexity + NotebookLM: the complete 2026 workflow

  • 30 November 2026

    Cloudflare free tier 2026: what it really allows

Leave a Reply

Your email address will not be published. Required fields are marked *