The main security risks of AI agents and the controls for each

Updated · 5 min read

An agent has more ways in than a chatbot

A chatbot only produces text. An agent reads from and writes to your systems, so an attacker or a simple mistake can reach it through every input it reads and every tool it can call. A security review of an agent should therefore cover the data sources, the tools, the permissions and the people who approve actions, not only the model.

Think of the agent as a new employee who reads everything in the shared inbox and can use every login you gave them. If that employee could be tricked, what would they do? Answer that question for each risk below.

Prompt injection from emails, web pages and documents

Prompt injection happens when text the agent reads contains instructions that it follows as if its owner had written them. A message might ask the agent to forward a file or to ignore its rules. This is one of the most important risks, and it deserves a guide of its own, so this section keeps to the essentials. The core controls are to treat all external content as data, give the agent no more permission than it needs, and require approval for any action that sends data out.

Data leaking through tool calls

Every tool call sends data somewhere. A search tool receives the query, a messaging tool receives the text, and an external API receives whatever fields the agent put in its request. A leak can happen when the agent includes a customer's details in a request to a service that should never see them, or when a result containing personal data is posted into a shared channel. Control the outbound path:

  • Send each tool only the fields it needs for the task.
  • Check which provider each tool sends data to, and where that provider processes it.
  • Block outbound destinations the agent has no reason to contact.
  • Require a person to approve any message that leaves your organisation.

Over-broad permissions

Agents are often given one shared service account with access to everything, because that is quicker to set up. It turns every mistake into a large one. Give each agent its own identity, with read access separated from write access and limited to the records of the process it supports. Remove standing access the agent no longer uses, and review permissions whenever its scope changes.

Secrets in prompts and in logs

API keys, passwords and tokens should never be written into a prompt, a shared document or the agent's instructions. A secret in a prompt is sent to the model provider and may later appear in your logs. Store secrets in a managed secrets store, load them into the tool at runtime and rotate them on a schedule. Scan prompts and logs for anything that looks like a key before you launch, and again after any change.

Plugins and third-party tools

Plugins, extensions and community connectors add code and access to your agent. A plugin can be compromised, updated with malicious code or simply poorly built. Treat each one as a supplier. Check who publishes it, which permissions it requests, when it was last updated and whether its code can be reviewed. Pin versions, install only from trusted sources, and remove what you do not use.

Keep a written list of every tool the agent can call. A tool that is not on the list is a risk nobody has reviewed.

How Hundred Seas helps

Hundred Seas is a product studio in Taipei that builds AI agents and AI CRM systems on Claude and on OpenAI models. We choose the model for each agent on cost, speed, quality and where the client's data has to stay, and where data is processed is one of the first questions to settle before any agent is built.

Work starts with a scope step of about one week at a fixed price, ending in a written plan, a clickable prototype and a firm quote. The build follows in weekly releases of working software, and a monthly run plan keeps the software running and up to date.

Questions

Can a malicious email make my AI agent leak data?
It can, if the agent reads the email and also has a way to send information out. That is why an agent that reads inboxes should not also hold broad sending permissions. Keep outbound actions behind an approval step, limit what the agent can reach, and test with hostile sample emails before going live.
Is the model provider itself a security risk?
Any provider that receives your data is part of your risk picture. Read each provider's current data terms, check where it processes data and whether your inputs are used for training under your plan, and confirm the answers on its official documentation. Then decide what data the agent may send at all.
What is the first security control to set up?
Give each agent its own identity with the fewest permissions it needs, and require human approval for any action that sends, pays or deletes. These two steps limit the damage from nearly every other failure. Logging comes next, so you can see what happened when something goes wrong.
Are plugins from public marketplaces safe to use?
Not automatically. Check the publisher, the permissions requested, the update history and whether the code can be reviewed. Prefer tools from vendors you already trust, pin versions, and test each update before it reaches live data.
Do I need a security review before launch?
Yes, for any agent that touches customer data, money or internal systems. The review should cover data sources, tools, permissions, secrets and approvals. Ask a qualified security specialist to check the design, and confirm any compliance requirement for your sector with the official regulator.

Have a project in mind?

Tell us what you want to build. We reply with a plan, not a sales call.

AboutThe main security risks of AI agents and the controls for each