← Back to Blog
4 min read

One Agent, Many Users, No Leaks

AISecurityAutomation

I built an AI agent that reads two inboxes around the clock, acts on what needs doing, and answers me by text message and on a voice phone line. It was useful enough that other people wanted in. And the moment a second person could reach it, the whole thing changed shape.

An agent that serves one person is a tool. An agent that serves several is a building with rooms in it—and the only question that matters is whether anyone can walk through a wall.

The Problem Arrives With the Second User

With one user there is nothing to leak. The agent reads your mail, keeps your calendar, knows your business, and the worst it can do is embarrass you to yourself. Everything it can see, it's allowed to see.

Add a second person and every one of those assumptions quietly breaks. Now the agent holds two sets of inboxes, two calendars, two piles of private detail—and it's one system, built on one model, answering whoever happens to be texting it at the time. Nothing about that arrangement keeps my mail out of your reply. The separation isn't automatic. It has to be built, and then it has to be proven.

A Sandbox and a Set of Keys Per Person

So I don't hand the agent one brain and hope it keeps its users straight. Each person gets their own permissions and their own sandbox. The agent that answers you can only reach what's yours. The agent that answers me can only reach what's mine. They share code, not context.

That's the same instinct I carried out of years running IT in healthcare, where the rule was always least privilege: give every part of a system the least it needs and nothing more. A support request should never be able to open a record it has no business touching. An agent answering one user should never be able to read another user's inbox, no matter how the question is phrased. The design is boring on purpose. The boring version is the one that doesn't leak.

Don't Trust the Wall—Throw Things at It

Here's the part that's easy to skip. You build the isolation, you read back the code, it looks right, and you move on. That is exactly where the trouble hides.

I don't trust a wall because I built it. I trust it because I tried to break it and couldn't. So the isolation between users isn't assumed—it's verified by adversarial tests whose entire job is to get one user's agent to cough up another user's data. They ask sideways. They pretend to be someone they're not. They request a small favor that quietly crosses a line. If any of them gets through, that's not a surprising edge case—that's the test doing precisely what I built it to do, and the design going back to the bench.

This is the same move I make everywhere I let software run unattended. I don't review every action and hope. I build the check that would catch the failure, and I let it run forever. A wall you've attacked and watched hold is worth more than a wall you merely drew with a steady hand.

Isolation Is a Feature, Not an Afterthought

The tempting version of this project is to build the single-user agent, get it working, and bolt on multi-user support later when someone asks. That order is a trap. Isolation designed in from the start is a property of the system. Isolation added later is a patchwork of special cases you'll be maintaining—and apologizing for—for as long as the thing runs.

So I treated the wall between users as a first-class feature, the same as the inbox reading or the phone line. Not because two people is a lot of people. Because the first day there are two, there is finally something to protect, and the cost of getting it wrong isn't a bug report. It's handing one person another person's private life.

An agent that does your work has to be trusted with everything you'd tell an assistant. The moment it does that work for more than one person, the walls between them stop being an implementation detail and become the whole product. Build them first, attack them yourself, and watch them hold. Anything less isn't an assistant. It's a leak with a phone number.