01The short version
An AI agent is a program in which an AI model uses tools. It reads text, selects the next action and does that action. Claude Code, Codex and Claude Cowork are examples. An agent that can read your files and send email is useful. It is also a new type of risk, because text that it reads can change what it does.
Zero trust is the security design that fits this risk. Its rule is simple: nothing gets trust by default, and each request gets a check. For an agent, the rule becomes the sentence below.
Give the agent no trust by default. Put the limits outside the agent, in accounts and settings that the agent cannot change.
The reason is the central assumption of zero trust: assume a breach. Plan as if the agent already obeys an attacker, and as if one account of the team is already stolen. Then make sure that the damage stays small.
A small team does not need an enterprise security programme to apply this rule. A team of one person qualifies. It needs six controls, and most of them are settings in products that the team already pays for.
- Identity. Give each agent its own accounts. Do not lend it the accounts of an employee.
- Authentication. Protect each sign-in with a second factor. Keep each secret in a password manager.
- Access control. Give the agent only the access that its task needs. Start with read-only access.
- Isolation. Run the agent in a sandbox, and limit the websites that it can reach.
- Approval. Let a person approve each action that you cannot undo.
- Records and recovery. Keep records and backups in a place that the agent cannot change.
The size of the team changes only the method. One person applies the controls by habit and with personal settings. A larger team applies them with shared settings that one owner sends to all people.
02Why an agent needs its own rules
An agent is different from normal software in three ways.
An agent cannot reliably separate instructions from data. A normal program keeps its code apart from the data that it processes. An AI model reads all text as one stream. Thus a web page, an email or a PDF can contain a sentence that the agent obeys as an instruction. The name of this attack is prompt injection. The UK National Cyber Security Centre writes that such attacks "may never be totally mitigated" NCSC.
An agent uses each access that it can reach, and it acts in seconds. One documented case is from April 2026. A coding agent at the company PocketOS found an access key for the full hosting account in an unrelated file. With one request, the agent deleted the production database and the backups that were stored with it. The founder reported that this took 9 seconds founder's account. The hosting company later restored the data from separate backups.
People approve what the agent asks. Anthropic measured its own product: users accept 93% of the permission prompts in Claude Code Anthropic. A prompt that the user always accepts is not a control.
Think of the agent as a temporary worker who is fast and capable, but who believes each document that arrives. You give this worker a desk, a badge for one door and a supervisor. You do not give this worker your own password and the bank login.
03Zero trust in plain words
Older security designs trusted everything inside the office network. Zero trust removes that assumption. No person, device or program gets trust because of its location. The system checks each request: who makes it, and do the rules permit it?
Zero trust has three principles.
- Check each request. One sign-in in the morning is not sufficient for a sensitive action in the afternoon.
- Give the minimum. Each person and each program gets only the access that the current task needs.
- Assume a breach. Do not plan only to keep the attacker out. Plan as if the attacker is already in.
Assume a breach: the principle that changes the design
Most security advice tries to prevent the first failure. Zero trust accepts that the first failure will occur. One password is stolen. One computer has malicious software. One agent reads a hostile instruction and obeys it. The design question is then different: what can this one failure reach?
For an AI agent, this assumption is realistic. No product reliably stops an agent from obeying hostile text. Thus you must treat each agent as an agent that an attacker can steer at some time. One question tests each setup.
If this agent obeys an attacker at this moment, what can it read, what can it change, and where can it send data?
If the answer is "everything that I can reach", change the setup. Each control in this guide makes the answer smaller. The controls do not make the agent trustworthy. They make its failure affordable.
The reference document is NIST SP 800-207 from 2020 NIST. Three newer documents apply the design to AI agents CoSAI; Anthropic; BSI and ANSSI. They address large organisations, but they agree on one point that applies at each size. The AI model must not decide what is permitted. A rule outside the model makes that decision.
04The baseline: six controls outside the agent
1. Identity: the agent has its own accounts
Identity answers the question "who acts?". Many teams let the agent use the accounts of the employee who starts it. This is the shared identity in Figure 2. The agent can then do all that the employee can do, and the records do not separate the two.
Give the agent its own identity: its own mailbox, its own access key for the code host and its own payment card with a limit. Name one person as the owner of each agent. The owner knows what the agent does and can stop it.
2. Authentication: strong sign-in for people, stored keys for agents
Authentication is the proof of an identity. People prove it with a password and a second factor, for example a code from a telephone application. An agent proves it with a key, which is a long secret text.
For people, use company accounts for each AI product, and make the second factor mandatory. For agents, keep each key in a password manager. Do not put a key in a prompt, in a chat message or in a file of the project folder. An agent reads each file that it can reach, and it can repeat the key in its output. Prefer keys that stop working after hours or days. Keep the second factor with the person. Then the agent cannot complete a sensitive sign-in alone.
3. Access control: only what the task needs
Access control decides what an identity can do. Security people call the target "least privilege": the minimum access for the current task. For an agent this has a special reason. Nobody can list in advance what an agent will do, because the text that it reads influences its actions.
Start each agent with read-only access. Add write access for one named folder or one named repository when the task needs it. Keep three areas fully out of reach: production systems (the systems that your customers use), backups and bank accounts. A connector links the agent to another service, such as the mailbox or the file store. Keep one written list of the connectors that the team approved, because each connector gives the agent new abilities.
4. Isolation: a limited place to work
Isolation limits the place where the agent runs. A sandbox is an enclosed work area on a computer or in the cloud. Inside it, the agent can read and change only the permitted folders. It can connect only to the websites on an approved list.
The network limit is as important as the file limit. A tricked agent needs a connection to send your data to an attacker. If the sandbox blocks all websites that are not on the list, the data cannot leave.
5. Approval: a person does what cannot be undone
Some actions have effects that you cannot undo: an email to a customer, a payment, a deleted record, a published post, a release to production. A person must approve or do these actions.
Make the system enforce this rule. An instruction such as "always ask before you send" is only text, and injected text can override it. The reliable method is to remove the ability. The agent can write a draft, but its account has no permission to send. Keep the number of approvals small, because people accept frequent prompts without a look.
6. Records and recovery: know what occurred, and get back to a good state
After a problem, you must answer two questions: what did the agent do, and how do we repair it? A record that the agent writes about itself is weak evidence. Use the records that the AI provider and your other systems keep, such as the activity log of the mailbox or of the code host.
Recovery depends on backups that the keys of the agent cannot delete. The undo functions of agent software restore local files only. They do not bring back a sent email or a deleted cloud database. Do one restore test before you need it. Write down who can stop each agent and how to cancel each of its keys.
05The combination to avoid
One rule prevents most data thefts by prompt injection. A theft needs three abilities at the same time, and you can remove one of them.
The researcher Simon Willison described this combination Willison. Meta made it a design rule: an agent session gets a maximum of two of the three abilities Meta. If a task needs all three, a person approves each step.
Two examples show the rule in use. An agent that reads the support mailbox has private data and untrusted content. Thus it must not send email or open websites without approval. An agent that does research on the open web reads untrusted content and can send data out. Thus it must not have access to client files.
06Zero trust for the team, not only for the agent
The agent works with the accounts, the computers and the sign-ins of the team. If an attacker takes the account of the person who owns the agents, the attacker controls each agent and each setting in this guide. Thus the three principles apply to the people and the devices too.
Apply the test question to the team. If an attacker has the password of one person, or controls one computer, what can the attacker reach? A team of one person must ask this too.
| Measure | What to do | What it limits |
|---|---|---|
| Sign-in that resists phishing | A hardware security key (for example a YubiKey) or a passkey for the company login, the mailbox, the code host, the password manager and the bank. Two keys for each person. | A stolen password alone is of no use. The key answers only to the genuine website, and software cannot copy its secret. |
| One company login | Connect each product to the company login (single sign-on) where the plan permits it. | One strong sign-in protects all products. One switch removes the access of a person who leaves. |
| A separate administrator account | Do the daily work with an account that has no administrator rights. Use a second account for administration only. | A compromised daily account cannot change the security settings or the agents of other people. |
| Protected computers | Turn on disk encryption, automatic updates and the screen lock. Keep each secret in the password manager, not in a file. | A lost computer or an infected computer exposes less. |
| Two persons for money and for backups | A second person approves each payment above a set amount. The backups are under an account that is not used for daily work. | One compromised account cannot move money or delete all copies. |
| A plan for lost keys and for leavers | Write down who cancels which access. Do the procedure one time as a test. | The time in which a lost key or an old account stays usable. |
A basic hardware key, the Security Key NFC of Yubico, costs $29 Yubico. A passkey in the telephone or in the password manager has no cost, but a hardware key is the stronger of the two against malicious software. The US agency CISA "strongly urges all organizations to implement phishing-resistant MFA", which is this type of sign-in CISA. Google Workspace and GitHub organisations can make it mandatory Google; GitHub. Claude Team and ChatGPT Business cannot. Turn on "Require SSO" in these products, and the company login then protects them Anthropic; OpenAI.
A hardware key also limits the damage of an infected computer. Its secret stays inside the key and cannot be copied, and each use needs a touch. Thus software that steals passwords and key files gets no credential that works later or from a different computer. In August 2025, malicious versions of the package Nx told the AI coding tools on the computers of developers to search for keys in files Wiz. A secret on a hardware key is not in a file. One limit stays: malicious software can use a session that is already open. Thus you also need the protected computer and the sandbox.
07Example 1: a small development studio
The developers use Claude Code or Codex on client projects, and the code is on GitHub. The studio can be one freelance developer or a team. The setup below keeps the tools fast to use. Most steps are one-time settings.
- Use a team plan and company accounts. Claude Team and ChatGPT Business each cost $20 for each seat each month on annual billing. Both include single sign-on (one company login for all products), and both do not train on your data by default Claude pricing; OpenAI. Do not use the personal account of an employee for client code. Claude Team starts at two seats. If you work alone, a paid personal plan is an acceptable start: turn off the training setting and turn on the second factor.
- Turn on the sandbox on each computer. In Claude Code, the sandbox is off by default, so turn it on in a shared settings file (see the example below). Codex limits writes to the project folder and keeps the network off by default Claude Code; Codex.
- Give the agent its own key for GitHub. Use a GitHub App. It gives the agent a key that works for one hour, on named repositories only. The box "How the one-hour key works" at the end of this example explains the method. Do not give the agent the personal token of a developer.
- Keep secrets out of the project folder. Move the keys from
.envfiles into the password manager. Block the agent from the folders that hold keys. Put the SSH key for the code host on the hardware key GitHub. The file in the home folder is then of no use without the key. - Protect the main branch. The agent works on a branch, and a person reviews each change before the merge. A release to production needs the approval of a person. The agent has no key for production or for the backups.
- Wait one day before you install a new package version. Set
minimumReleaseAgein pnpm,min-release-agein npm orexclude-newerin uv. In 2026, malicious versions of the packages TanStack and LiteLLM were online for some hours before their removal TanStack. A waiting period of one day excludes such versions. - Review the files that steer the agent. The files
CLAUDE.md,AGENTS.mdand.mcp.jsonand the folder.claude/give instructions to the agent, and some of them can run code. Require a review for each change to them. Keep one list of the approved connectors. - Run unattended work away from the laptop. Use the cloud sessions of Claude Code or Codex, or a Docker Sandbox on the computer. A laptop holds too many other files and keys for an agent that nobody watches.
The settings file below is an example for Claude Code. It turns the sandbox on, stops the agent if the sandbox cannot start, and blocks the folders that hold keys.
{
"sandbox": {
"enabled": true,
"failIfUnavailable": true,
"allowUnsandboxedCommands": false,
"network": { "allowedDomains": ["github.com", "registry.npmjs.org"] },
"filesystem": { "denyRead": ["~/.ssh", "~/.aws"] }
},
"permissions": {
"disableBypassPermissionsMode": "disable",
"deny": ["Read(~/.ssh/**)", "Read(~/.aws/**)", "Read(./.env)", "Read(./.env.*)"]
}
}
On Claude Team, an owner can send this file to each developer from the organisation settings, with no device management Claude Code. A copy in the repository is only a default, because each developer can override it. If you work alone, put the same content in your user settings file, ~/.claude/settings.json. The sandbox covers shell commands, and the deny rules cover the file tools. Connectors that run on the computer are outside the sandbox, so approve each one before use.
How the one-hour key works
A GitHub App is a robot identity in your GitHub organisation. A person creates it one time, selects its rights (for example "read code" and "open a pull request") and installs it on the named repositories. The app has a private key, which is a file. This file stays in the password manager or in the build system. The agent does not get it.
At the start of work, a small helper program signs a request with the private key. The key does not leave the helper. GitHub checks the signature and gives back a token that works for one hour, on these repositories and with these rights only GitHub. The agent gets only this token. A stolen token is of no use after one hour. For longer work, the helper asks for a new token.
You do not write the helper. In GitHub Actions, the official action actions/create-github-app-token does this work GitHub. For a computer, the GitHub documentation has short scripts. The cloud sessions of Claude Code and Codex use the same method with a GitHub App of the vendor: you select the repositories, and at Claude Code the GitHub credentials do not enter the session Claude Code.
A fine-grained access token is the simpler alternative for one person. Limit it to the named repositories and set an expiry date. GitHub permits 1 to 366 days GitHub. The token acts with the name of the person, so the record does not separate the person from the agent.
08Example 2: marketing, finance and operations staff
These people are not developers. They use Claude Cowork or ChatGPT Work to read documents, prepare reports, draft campaigns and process invoices. These agents work in the files and the mailboxes of the company, so identity and approval are the most important controls here.
- Use a team plan and company accounts. The plans and prices are the same as in Example 1. A consumer plan can use your conversations for training if the setting permits it Anthropic. Thus it is not the correct plan for client data.
- Connect one work folder, not the full disk. Claude Cowork reaches local files only in the folders that the user connects Anthropic. Make one folder for each task and copy the necessary files into it. Do not use the computer use function for sensitive work. It is in beta, and the folder limit does not apply to it.
- Set each connector to read-only first. On Claude Team, an owner sets each connector tool to "Always allow", "Needs approval" or "Blocked" Anthropic. Block the tools that send, share and delete. In ChatGPT Business, an administrator permits read actions and write actions for each app OpenAI.
- Give the agent its own mailbox. A personal inbox holds private data and untrusted text together, and the Google Workspace connector of Claude includes tools that send and forward. Give the agent a separate address, and forward to it only the mail that it must process. The box below gives two options. The section after this example explains why the terms of the mail provider are part of the decision.
- Let the agent prepare, and let a person complete. The agent writes the draft, and a person sends it. The agent prepares the payment list, and a person pays in the banking application. Do not give an agent the bank login.
- Use a card with a limit if the agent must buy something. Make a virtual card with a low limit for each purpose. Revolut Business, for example, has limits for each card Revolut. In the United States, Privacy.com has cards that work at one merchant only, from $5 each month Privacy.com.
- Limit the browser agent. Claude in Chrome is in beta. An owner on Claude Team can permit or block websites for it Anthropic. Anthropic recommends a separate browser profile that has no access to banking or other sensitive accounts Anthropic.
- Check the permissions before you schedule a task. A scheduled task in Claude Cowork runs in the cloud with the connectors of the user, also when the computer is off. Each tool that is set to "Always allow" then runs with no person present Anthropic.
Two ways to give the agent a mailbox
AgentMail. This service gives mailboxes to agents, and its terms name that use as the purpose of the service AgentMail terms. Three mailboxes are free, and ten cost $20 each month AgentMail. It has lists of permitted senders and recipients for each mailbox. A key can be limited to one mailbox and to single actions AgentMail docs. Thus the agent can get a key that creates drafts but cannot send. It connects to Claude and ChatGPT as a connector.
A dedicated mailbox in Google Workspace or Microsoft 365. It costs about $7 each month in Google Workspace Google. The administrator console and the logs are the ones that you already know. It has no setting that permits drafts but blocks sending. Connect the agent only through the official connector of the provider, not through the web page. We found no Google rule for a mailbox that only an agent uses, so read the current terms before you create one.
One more step applies to assistants that search all company files, such as Microsoft 365 Copilot or Gemini in Google Workspace. These assistants show each file that the user is permitted to open. Correct the files that are shared too widely before you turn the assistant on Microsoft; Google.
09Select tools that accept agents
A tool must accept an agent in two ways. Technically, it must have an interface that an agent can use with a limited key: an API, a connector or a command-line tool. Legally, its terms of service must permit automated use. A tool that fails one of the two tests is a risk for the team, also when the agent can operate it today.
Service providers now write rules for agents. Three examples show the direction.
- Google Workspace. On 24 November 2026, Google announced that AI agents must use the connector servers of Google (the Workspace MCP servers) or the Workspace command-line tool to get Workspace data, and must not call the Workspace interfaces directly. Technical enforcement starts on 1 February 2027 Google. The related terms let Google suspend the access of a tool that does not comply Google. The Gmail policies forbid automation of the Gmail web page "in a manner that misleads or deceives users" Google.
- Microsoft. The Microsoft Services Agreement, in effect from 30 September 2026, applies its code of conduct to AI services that act autonomously. It forbids actions that go around access restrictions, and one penalty is the immediate closure of the account Microsoft.
- LinkedIn. The user agreement forbids "bots or other unauthorized automated methods" to access the service or to send messages LinkedIn.
The AI providers put the responsibility on you. Anthropic states that the user must respect the terms of each website, including limits on automated access, and stays responsible for each action of Claude in the browser Anthropic. OpenAI states that you are responsible for the actions that an agent takes for you OpenAI.
The risk is the loss of an account. When Google disables an account, the owner cannot sign in to Google services, and for some violations the owner cannot download the data Google. For a small team, the mailbox and the file store are in that account. Apply the assumption of this guide here too: if the provider blocks this account tomorrow, what stops?
Four rules keep the team on the safe side.
- Use the official path. Connect the agent through the path that the provider names for agents: an API, a connector or a command-line tool, with a key of its own. Do not let an agent operate the web page of a service with the login of a person when an official path is available.
- Prefer services made for agents. AgentMail for mail, a GitHub App for code and a card with a limit for payments are examples. Their terms and their controls expect an agent.
- Do not go around a block. A CAPTCHA, a rate limit or a message that refuses automated access is a "no". The agent stops, and a person decides. Anthropic forbids Claude in Chrome to bypass a CAPTCHA, and its usage policy forbids the use of Claude to go around the terms of other services Anthropic.
- Keep the agent away from the account that the company cannot lose. Give the agent a separate account. Keep an export of the important data outside the main account. Write the date of your last check of the terms in the list of approved connectors.
10A starter kit with prices
The table lists one possible set of tools. We tested no product for this guide. The statements come from the documentation of each vendor on 4 December 2026.
| Control | Tool | Public price | What it gives |
|---|---|---|---|
| Identity and authentication for people | Claude Team or ChatGPT Business | $20 for each seat each month, annual billing | Company accounts, single sign-on, no training on your data by default. |
| Sign-in for people | Hardware security keys, or passkeys | $29 for each basic key, one time. Passkeys: no cost | A sign-in that a false page cannot capture. Each person needs two keys. |
| Identity for the agent: mail | AgentMail, or a dedicated mailbox in Google Workspace | Free for 3 mailboxes, $20 each month for 10. Google: about $7 each month | A separate address. AgentMail is made for agents. It adds sender lists and keys that cannot send. |
| Identity for the agent: code | A GitHub App or a fine-grained access token | Included | Access to named repositories only. App tokens stop working after one hour. |
| Authentication for the agent | 1Password or Bitwarden | 1Password: $24.95 each month for 10 users. Bitwarden: $4 for each user | One place for all keys. 1Password for Claude fills a sign-in after a fingerprint approval, and the model does not see the password (Mac only). |
| Access control | The connector settings of the AI plan | Included | An owner blocks the tools that send, share and delete. |
| Isolation | The sandbox of Claude Code and Codex. Docker Sandboxes for unattended work | Included. Docker Sandboxes: free on your computer | File limits and an approved list of websites. |
| Approval | Branch protection on GitHub. Drafts in the mailbox. A card with a limit | Included. The card depends on your bank | A person merges, sends and pays. |
| Records and recovery | The activity logs of the mailbox, the code host and the bank. Your existing backup | Included | Records that the agent cannot change. The backup needs an account that the agent cannot use. |
The cost depends on the number of seats. As a calculation example, ten seats cost about $250 each month, and the AI plan is $200 of that amount. Two basic hardware keys for each person add $58 one time.
11What the baseline does not do
It limits damage, but it does not correct the agent. An agent can make a wrong decision inside its permitted access. Review its work as you review the work of a new employee.
Filters and automatic approval are a second layer only. Products that examine prompts for attacks do not stop an attacker who adjusts the attack. In one study, researchers adjusted their attacks to twelve published defences against prompt injection. For most of the defences, more than 90% of the attacks then succeeded arXiv 2510.09023.
The team plans have no full audit log. At Anthropic and at OpenAI, the audit log of the AI product itself needs the Enterprise plan. A small team uses the logs of the mailbox, the code host and the bank as its records.
It is not sufficient for high-risk work. If your agents handle health data, payment data or production systems of clients, you need more controls than this baseline. The security agencies of the Five Eyes countries advise a start with small pilots for low-risk tasks NCSC summary.
12The first 30 days
| When | What to do |
|---|---|
| Day 1 | Move each person to the team plan with a company account and a second factor. Write one page: the data that agents can use, the systems that they must not touch, and the owner of each agent. |
| Week 1 | Register two hardware keys for each person on the main accounts. Turn on the sandbox for developers. Set each connector to read-only. Create the mailbox and the keys of the agent. Move all keys into the password manager. |
| Month 1 | Restore one backup as a test. Write the list of approved connectors, with the date of the terms check. Read the records of one week. Cancel one agent key as an exercise, and confirm that the agent stops. |
13Sources and further reading
The handbook behind this guide is "Zero Trust for AI Agent Deployment" (MHL Academy, December 2026). It has the evidence, the limits and more than 400 sources. The handbook and the checklists are at academy.mhl42.ai.
- NIST, "Zero Trust Architecture", SP 800-207, 2020: csrc.nist.gov
- Coalition for Secure AI, "Zero Trust for AI Systems", September 2026: coalitionforsecureai.org
- Anthropic, "Zero Trust for AI Agents", May 2026: assets.claude.com
- BSI and ANSSI, "Design Principles for LLM-based Systems with Zero Trust", August 2025: bsi.bund.de
- UK NCSC, "Managing the cyber risk of agentic AI", August 2026: ncsc.gov.uk
- Five Eyes agencies, "Careful adoption of agentic AI services", May 2026: ncsc.govt.nz
- CISA, "Implementing Phishing-Resistant MFA", October 2022: cisa.gov
- Google, access rules for AI agents in Google Workspace, November 2026: workspaceupdates.googleblog.com
- Simon Willison, "The lethal trifecta for AI agents", June 2025: simonwillison.net
- Meta, "Agents Rule of Two", October 2025: ai.meta.com