All writing
AISystemsKnowledgeSecurity

Your Company Brain Is a Permissions Problem

Everyone is building a company brain this year. Most guides treat permissions as one item on the list. In the one I built, permissions were the whole job.

Max KellyOctober 18, 20268 min read
Your Company Brain Is a Permissions Problem

I updated this post in November 2026 to cover the system I run now, MxMind and MxGateway.

"Company brain" is one of the phrases of the year.

Vectorize points out that "the term wasn't around two years ago." Box now has a tutorial for building one.

The guides tend to list permissions as one property among several.

Spinach's October write-up on what company brains still can't do puts the gap plainly:

Most company brain implementations today have one permission model: if an agent can query the corpus, it can query all of it.

I built one this summer. Permissions were not one item on the list. They were the job.

The demo skips one question

The requests I get sound the same. A founder wants a context folder that works across every AI tool they use. A team wants one place for everyone's workflows, so no agent has to be reminded of the house style again.

The demo version of this is easy now. Point a model at a pile of documents, add a chat box, and it will answer questions about your business by the end of the afternoon.

That demo skips the only question that matters once real people start using it.

What happens when someone asks about something they are not allowed to see?

What I built

My brain is two systems.

MxMind is the memory. It holds my notes, meeting transcripts, decisions and commitments, indexed so any agent can search them, plus a vault for my keys.

MxGateway is the front door. AI tools and agents connect through it, and each one gets its own grant.

It is my brain, not a team's. But every AI tool I connect is a different asker, so it has the same problem a company brain has.

Storing and searching everything was not the hard part.

Deciding what each tool was allowed to see and do, and proving the system kept those rules, was the hard part.

Every tool gets its own grant

This is the rule everything else hangs on.

A grant is one agent, in one place, acting for one person. Codex on one of my machines is one grant, and the same agent on another machine gets a second one. Each grant has an expiry and a profile, and the profile decides what it can touch:

  • an operator grant gets the full toolset, including my connected apps
  • a work grant gets the brain and my work accounts, and cannot reach my personal email or run programs against my apps
  • a reader grant can only read

MxMind re-reads the grant on every call. Revoke one, and its next tool call fails.

If you give a tool everything and ask it to be careful, you have already leaked. My personal email is sitting in the context window, and I am relying on the model's manners. A profile means the tool never gets the chance.

The same rule holds when the asker is a person. In the multiplayer version I built for teams this summer, the server gathers evidence under the asker's permissions before any model sees it. It filters before ranking, in both the keyword search and the vector search, so a document they cannot open never competes for a place in the context. Slack channel membership syncs into those permissions, removals included.

Signing in is not access

Chat apps like Claude cannot send a custom key, so they sign in to MxGateway with OAuth. The sign-in uses my passkey. There is no password to phish.

A sign-in alone carries no access. The first time an app signs in, it has to be bound to a grant, and from then on every call it makes is that grant's call. Revoking the grant ends the app's sessions, and its next sign-in has to be bound again.

Adding a passkey takes a one-time enrolment code that I set myself and remove afterwards, even from a signed-in browser. A stolen session cannot enrol its own.

The brain decides, and keeps the record

MxGateway checks who is calling. MxMind decides what they may do.

Every call it decides, allowed or refused, gets a row with the grant, the tool and the outcome. It never records the arguments or what came back.

The rows are signed and chained. Editing one or slipping one in breaks the chain. The head of the chain is posted outside the database every day, and once a week a full check walks it back to the start.

Keys the brain holds but cannot read

MxMind keeps my API keys, but the server cannot open them. Each key is sealed on my own device, to the machines allowed to read it, before it leaves. The server stores ciphertext.

No grant gets a key's value, not even an operator grant. The most any grant gets is the sealed file, and only my machines can open that.

Every answer points at a source

Search returns the passage and the note it came from, so every answer can name its source.

A cited answer can be checked quickly. An uncited answer has to be trusted, and trust is exactly what a new system has not earned yet.

Citations also tell you when the brain is guessing. If it cannot point at anything, that is your answer.

Keep the LLM out of the parts that must be exact

No model decides access. The checks are plain code.

Grants are data, so I can mint or revoke one without a deploy. What a profile may do lives in reviewed code, so widening a profile takes a reviewed change, not a setting. Minting a grant from my dashboard has to be signed with a key held in my browser, and every new grant, rotation and revocation sends me a notice.

That split makes the system easier to reason about. When something looks wrong, I know which side to look at. The deterministic side should never be wrong in a creative way.

Separate the memory from the agent

Any agent that speaks MCP can use the brain through MxGateway: Claude, Codex, Cursor, Grok Bot, Capy, Hermes, whatever comes next. None of them owns it.

I care about this more after the Fable shutdown. In June I wrote that companies should design for portability and avoid burying business logic inside one vendor's agent surface.

Company memory is the same. It should outlive whichever agent you like this quarter.

Prove it before anyone trusts it

Security changes to MxMind and MxGateway go to a second agent whose only job is to break them. It writes a failing test for each attack it tries, then gives a verdict, SHIP or FIX, against an exact commit. A FIX goes back for changes and comes back for another verdict.

It finds real things. One check proves that a work grant cannot reach my personal accounts. The reviewer showed that an app that was down during the check could hide a personal account, which would come back once the app reconnected. Now any app the check cannot see fails it, and the gateway refuses the binding until every check passes.

The vault's recovery key lives offline, never on a machine an agent touches. I ran the recovery drill when the vault went live: seal a test value to that key, then open it with the offline copy. A full backup of the brain has also been restored, cleanly, into an isolated database.

A lot of internal AI tools never get tests like these. They get a demo, an announcement, and a slow loss of trust the first time someone sees something they should not have.

What companies actually ask for

The security requirements are easy to say and hard to fake:

  • they own the infrastructure and the data
  • it sits behind their own sign-in
  • nobody unauthorised can reach the server directly
  • they can shut it down whenever they want
  • some categories of data never go in at all

None of that is exotic. It is also exactly what the afternoon demo skips.

It matches how we hand off every engagement anyway. At the end, the client owns the code, the infrastructure, and the runbooks.

Where I would start

If you want a company brain, build it in this order:

  1. List the sources and who owns each one.
  2. Write down who can see what today, and mirror that exactly.
  3. Decide what never goes in.
  4. Give every person and every tool its own grant, and make revoking one take effect on the next call.
  5. Make citations mandatory.
  6. Have a second agent try to break it, and run a restore drill.
  7. Then build the chat box.

The chat box is the part everyone pictures. It should be the last thing you build.

A brain that knows everything is easy now.

A brain that knows what each person and each tool is allowed to know is the product.